On 2023/04/30 11:53, Antoine Jacoutot wrote: > > + if test "${enable_lua}" != "no" > > + then > > +- PKG_CHECK_MODULES(LUA, lua5.2, > > ++ PKG_CHECK_MODULES(LUA, lua51, > > Can we use SUBST_CMD to prevent hardcoding?
I don't see anything wrong with hardcoding here? I think MODLUA_VERSION should reflect what the port wants, it's not like SHARED_LIBS. On 2023/05/09 02:29, Brad Smith wrote: > On 2023-05-01 5:36 a.m., Stuart Henderson wrote: > > Any particular reason to use 5.1 instead of 5.2? (They're all EoL except > > 5.4, but 5.1 is much longer since EoL). > Just that is what the default is, MODLUA_DEFAULT_VERSION. I don't think this is meant to be prescriptive any more than say AUTOCONF_VERSION, just that it's what most things used when the module was added. We haven't run into problems with ports pulling in multiple lua versions via lib deps. (I have a diff to add lua5.X pkg-config files to the lua ports to test sometime but the i386 builders are unhappy atm, also the include directories are non-standard too and also need patches in various ports, so it would be good to clean up that whole lot at once). How about this diff for vlc? Compared to your previous: - uses the lua version which upstream prefers - brings back UPDATE_PLIST_ARGS from my earlier one to avoid the a52/a${MODLUA_VERSION} that is subst'ed in PLIST-main with 5.2 - uses the minimum necessary configure.ac patch to handle lua52.pc. Index: Makefile =================================================================== RCS file: /cvs/ports/x11/vlc/Makefile,v retrieving revision 1.262 diff -u -p -r1.262 Makefile --- Makefile 24 Apr 2023 11:42:50 -0000 1.262 +++ Makefile 10 May 2023 08:26:06 -0000 @@ -5,7 +5,7 @@ V= 3.0.18 DISTNAME= vlc-${V} PKGNAME-main= ${DISTNAME} PKGNAME-jack= vlc-jack-${V} -REVISION-main= 1 +REVISION-main= 2 CATEGORIES= x11 MASTER_SITES= https://download.videolan.org/pub/videolan/vlc/${V}/ EXTRACT_SUFX= .tar.xz @@ -43,7 +43,7 @@ WANTLIB-main= EGL GL ICE Qt5Core Qt5Gui vpx webp x264 x265 xcb xcb-composite xcb-dri2 xcb-dri3 \ xcb-glx xcb-keysyms xcb-present xcb-randr xcb-render \ xcb-shm xcb-sync xcb-xfixes xcb-xv xml2 xshmfence \ - xvidcore z zstd ${WANTLIB-common} + xvidcore z zstd ${WANTLIB-common} ${MODLUA_WANTLIB} # v4l2 is dlopen'd WANTLIB-main+= v4l2 @@ -53,7 +53,13 @@ AUTOCONF_VERSION= 2.69 AUTOMAKE_VERSION= 1.16 AUTORECONF= ./bootstrap -MODULES= x11/qt5 +MODULES= lang/lua \ + x11/qt5 + +MODLUA_VERSION= 5.2 +MODLUA_SA= Yes +MODLUA_RUNDEP= No +UPDATE_PLIST_ARGS+= -i MODLUA_DEP_VERSION COMPILER= base-clang ports-gcc @@ -145,7 +151,6 @@ CONFIGURE_ARGS+=--disable-a52 \ --disable-libva \ --disable-linsys \ --disable-live555 \ - --disable-lua \ --disable-mad \ --disable-mfx \ --disable-microdns \ @@ -188,7 +193,8 @@ CONFIGURE_ENV+= BUILDCC="${CC}" \ LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib" \ LIBS_libvlccore="-lexecinfo" \ PKG_CONFIG_PATH="${LOCALBASE}/lib/qt5/pkgconfig" \ - RCC="${LOCALBASE}/bin/rcc-qt5" + RCC="${LOCALBASE}/bin/rcc-qt5" \ + LUAC="${LOCALBASE}/bin/luac${MODLUA_DEP_VERSION}" PSEUDO_FLAVORS= no_jack FLAVOR?= Index: patches/patch-configure_ac =================================================================== RCS file: /cvs/ports/x11/vlc/patches/patch-configure_ac,v retrieving revision 1.43 diff -u -p -r1.43 patch-configure_ac --- patches/patch-configure_ac 25 Nov 2022 11:52:17 -0000 1.43 +++ patches/patch-configure_ac 10 May 2023 08:26:06 -0000 @@ -11,11 +11,10 @@ Index: configure.ac ;; netbsd*) SYS=netbsd -@@ -1122,22 +1121,6 @@ AC_ARG_ENABLE(optimizations, - +@@ -1123,22 +1122,6 @@ AC_ARG_ENABLE(optimizations, dnl Check for various optimization flags AS_IF([test "${enable_optimizations}" != "no"], [ -- + - dnl -O3 only in production builds - AS_IF([test "${enable_debug}" = "no"], [ - VLC_SAVE_FLAGS @@ -31,6 +30,16 @@ Index: configure.ac - ]) - AS_IF([test "${ac_cv_c_o3}" = "no"], [VLC_RESTORE_FLAGS]) - ]) - +- dnl Check for fast maths AX_APPEND_COMPILE_FLAGS([-fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range], [CFLAGS]) + AX_APPEND_COMPILE_FLAGS([-fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range], [CXXFLAGS]) +@@ -1664,7 +1647,7 @@ AC_ARG_ENABLE(lua, + [disable LUA scripting support (default enabled)])]) + if test "${enable_lua}" != "no" + then +- PKG_CHECK_MODULES(LUA, lua5.2, ++ PKG_CHECK_MODULES(LUA, lua52, + [ have_lua=yes ], + [ + AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead]) Index: pkg/PLIST-main =================================================================== RCS file: /cvs/ports/x11/vlc/pkg/PLIST-main,v retrieving revision 1.51 diff -u -p -r1.51 PLIST-main --- pkg/PLIST-main 25 Nov 2022 11:52:17 -0000 1.51 +++ pkg/PLIST-main 10 May 2023 08:26:06 -0000 @@ -115,6 +115,52 @@ lib/pkgconfig/libvlc.pc lib/pkgconfig/vlc-plugin.pc lib/vlc/ @lib lib/vlc/libvlc_xcb_events.so.${LIBvlc_xcb_events_VERSION} +lib/vlc/lua/ +lib/vlc/lua/extensions/ +lib/vlc/lua/extensions/VLSub.luac +lib/vlc/lua/intf/ +lib/vlc/lua/intf/cli.luac +lib/vlc/lua/intf/dummy.luac +lib/vlc/lua/intf/dumpmeta.luac +lib/vlc/lua/intf/http.luac +lib/vlc/lua/intf/luac.luac +lib/vlc/lua/intf/modules/ +lib/vlc/lua/intf/modules/host.luac +lib/vlc/lua/intf/modules/httprequests.luac +lib/vlc/lua/intf/telnet.luac +lib/vlc/lua/meta/ +lib/vlc/lua/meta/art/ +lib/vlc/lua/meta/art/00_musicbrainz.luac +lib/vlc/lua/meta/art/01_googleimage.luac +lib/vlc/lua/meta/art/02_frenchtv.luac +lib/vlc/lua/meta/art/03_lastfm.luac +lib/vlc/lua/meta/reader/ +lib/vlc/lua/meta/reader/filename.luac +lib/vlc/lua/modules/ +lib/vlc/lua/modules/common.luac +lib/vlc/lua/modules/dkjson.luac +lib/vlc/lua/modules/sandbox.luac +lib/vlc/lua/modules/simplexml.luac +lib/vlc/lua/playlist/ +lib/vlc/lua/playlist/anevia_streams.luac +lib/vlc/lua/playlist/anevia_xml.luac +lib/vlc/lua/playlist/appletrailers.luac +lib/vlc/lua/playlist/bbc_co_uk.luac +lib/vlc/lua/playlist/cue.luac +lib/vlc/lua/playlist/dailymotion.luac +lib/vlc/lua/playlist/jamendo.luac +lib/vlc/lua/playlist/koreus.luac +lib/vlc/lua/playlist/liveleak.luac +lib/vlc/lua/playlist/newgrounds.luac +lib/vlc/lua/playlist/rockbox_fm_presets.luac +lib/vlc/lua/playlist/soundcloud.luac +lib/vlc/lua/playlist/twitch.luac +lib/vlc/lua/playlist/vimeo.luac +lib/vlc/lua/playlist/vocaroo.luac +lib/vlc/lua/playlist/youtube.luac +lib/vlc/lua/sd/ +lib/vlc/lua/sd/icecast.luac +lib/vlc/lua/sd/jamendo.luac lib/vlc/plugins/ lib/vlc/plugins/access/ @so lib/vlc/plugins/access/libaccess_concat_plugin.so @@ -291,6 +337,8 @@ lib/vlc/plugins/logger/ @so lib/vlc/plugins/logger/libconsole_logger_plugin.so @so lib/vlc/plugins/logger/libfile_logger_plugin.so @so lib/vlc/plugins/logger/libsyslog_plugin.so +lib/vlc/plugins/lua/ +@so lib/vlc/plugins/lua/liblua_plugin.so lib/vlc/plugins/meta_engine/ @so lib/vlc/plugins/meta_engine/libfolder_plugin.so @so lib/vlc/plugins/meta_engine/libtaglib_plugin.so @@ -487,6 +535,34 @@ share/doc/vlc/libvlc/libvlc_DVD_ripper.c share/doc/vlc/libvlc/vlc-thumb.c share/doc/vlc/libvlc/win_player.c share/doc/vlc/libvlc/wx_player.cpp +share/doc/vlc/lua/ +share/doc/vlc/lua/README.txt +share/doc/vlc/lua/extensions/ +share/doc/vlc/lua/extensions/README.txt +share/doc/vlc/lua/http/ +share/doc/vlc/lua/http/requests/ +share/doc/vlc/lua/http/requests/README.txt +share/doc/vlc/lua/intf/ +share/doc/vlc/lua/intf/README.txt +share/doc/vlc/lua/intf/dumpmeta.lua +share/doc/vlc/lua/meta/ +share/doc/vlc/lua/meta/README.txt +share/doc/vlc/lua/meta/art/ +share/doc/vlc/lua/meta/art/01_googleimage.lua +share/doc/vlc/lua/meta/art/README.txt +share/doc/vlc/lua/meta/fetcher/ +share/doc/vlc/lua/meta/fetcher/README.txt +share/doc/vlc/lua/meta/reader/ +share/doc/vlc/lua/meta/reader/README.txt +share/doc/vlc/lua/meta/reader/filename.lua +share/doc/vlc/lua/playlist/ +share/doc/vlc/lua/playlist/README.txt +share/doc/vlc/lua/playlist/liveleak.lua +share/doc/vlc/lua/playlist/youtube.lua +share/doc/vlc/lua/sd/ +share/doc/vlc/lua/sd/README.txt +share/doc/vlc/lua/sd/icast.lua +share/doc/vlc/lua/sd/icecast.lua share/icons/hicolor/128x128/apps/vlc-kb.png share/icons/hicolor/128x128/apps/vlc-xmas.png share/icons/hicolor/128x128/apps/vlc.png @@ -621,6 +697,74 @@ share/locale/zu/LC_MESSAGES/vlc.mo share/metainfo/ share/metainfo/vlc.appdata.xml share/vlc/ +share/vlc/lua/ +share/vlc/lua/http/ +share/vlc/lua/http/css/ +share/vlc/lua/http/css/main.css +share/vlc/lua/http/css/mobile.css +share/vlc/lua/http/css/ui-lightness/ +share/vlc/lua/http/css/ui-lightness/images/ +share/vlc/lua/http/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +share/vlc/lua/http/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +share/vlc/lua/http/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +share/vlc/lua/http/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +share/vlc/lua/http/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +share/vlc/lua/http/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +share/vlc/lua/http/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +share/vlc/lua/http/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +share/vlc/lua/http/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +share/vlc/lua/http/css/ui-lightness/images/ui-icons_222222_256x240.png +share/vlc/lua/http/css/ui-lightness/images/ui-icons_228ef1_256x240.png +share/vlc/lua/http/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +share/vlc/lua/http/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +share/vlc/lua/http/css/ui-lightness/images/ui-icons_ffffff_256x240.png +share/vlc/lua/http/css/ui-lightness/jquery-ui-1.8.13.custom.css +share/vlc/lua/http/custom.lua +share/vlc/lua/http/dialogs/ +share/vlc/lua/http/dialogs/batch_window.html +share/vlc/lua/http/dialogs/browse_window.html +share/vlc/lua/http/dialogs/create_stream.html +share/vlc/lua/http/dialogs/equalizer_window.html +share/vlc/lua/http/dialogs/error_window.html +share/vlc/lua/http/dialogs/mosaic_window.html +share/vlc/lua/http/dialogs/offset_window.html +share/vlc/lua/http/dialogs/stream_config_window.html +share/vlc/lua/http/dialogs/stream_window.html +share/vlc/lua/http/favicon.ico +share/vlc/lua/http/images/ +share/vlc/lua/http/images/Audio-48.png +share/vlc/lua/http/images/Back-48.png +share/vlc/lua/http/images/Folder-48.png +share/vlc/lua/http/images/Other-48.png +share/vlc/lua/http/images/Video-48.png +share/vlc/lua/http/images/buttons.png +share/vlc/lua/http/images/speaker-32.png +share/vlc/lua/http/images/vlc-48.png +share/vlc/lua/http/images/vlc16x16.png +share/vlc/lua/http/index.html +share/vlc/lua/http/js/ +share/vlc/lua/http/js/common.js +share/vlc/lua/http/js/controllers.js +share/vlc/lua/http/js/jquery.jstree.js +share/vlc/lua/http/js/ui.js +share/vlc/lua/http/mobile.html +share/vlc/lua/http/mobile_browse.html +share/vlc/lua/http/mobile_equalizer.html +share/vlc/lua/http/mobile_view.html +share/vlc/lua/http/requests/ +share/vlc/lua/http/requests/README.txt +share/vlc/lua/http/requests/browse.json +share/vlc/lua/http/requests/browse.xml +share/vlc/lua/http/requests/playlist.json +share/vlc/lua/http/requests/playlist.xml +share/vlc/lua/http/requests/playlist_jstree.xml +share/vlc/lua/http/requests/status.json +share/vlc/lua/http/requests/status.xml +share/vlc/lua/http/requests/vlm.xml +share/vlc/lua/http/requests/vlm_cmd.xml +share/vlc/lua/http/view.html +share/vlc/lua/http/vlm.html +share/vlc/lua/http/vlm_export.html share/vlc/skins2/ share/vlc/skins2/default.vlt share/vlc/skins2/fonts/