On Wed, Apr 26, 2023 at 04:15:44PM +0100, Stuart Henderson wrote:
> On 2023/04/25 09:55, Luca Di Gregorio wrote:
> > Hi, I see that vlc doesn't have the telnet interface:
> > 
> > # vlc -vvv -I telnet
> > VLC media player 3.0.18 Vetinari (revision 3.0.13-8-g41878ff4f2)
> > ...
> > main interface debug: looking for interface module matching "telnet": 13
> >    candidates
> > main interface debug: no interface modules matched
> > ...
> > 
> > Do you think that it's possible to have a new executable of vlc
> > with the telnet interface available?
> 
> It can be done like this. I have no idea whether the maintainer
> (cc'd) would like to do that or not though, it will add a bit of
> extra work at port update time if the PLISTs need updating.

Something like this is fine with me.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/x11/vlc/Makefile,v
retrieving revision 1.262
diff -u -p -u -p -r1.262 Makefile
--- Makefile    24 Apr 2023 11:42:50 -0000      1.262
+++ Makefile    27 Apr 2023 22:48:50 -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,11 @@ AUTOCONF_VERSION= 2.69
 AUTOMAKE_VERSION= 1.16
 AUTORECONF=    ./bootstrap
 
-MODULES=       x11/qt5
+MODULES=       lang/lua \
+               x11/qt5
+
+MODLUA_SA=     Yes
+MODLUA_RUNDEP= No
 
 COMPILER=      base-clang ports-gcc
 
@@ -145,7 +149,6 @@ CONFIGURE_ARGS+=--disable-a52 \
                --disable-libva \
                --disable-linsys \
                --disable-live555 \
-               --disable-lua \
                --disable-mad \
                --disable-mfx \
                --disable-microdns \
@@ -188,7 +191,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: /home/cvs/ports/x11/vlc/patches/patch-configure_ac,v
retrieving revision 1.43
diff -u -p -u -p -r1.43 patch-configure_ac
--- patches/patch-configure_ac  25 Nov 2022 11:52:17 -0000      1.43
+++ patches/patch-configure_ac  25 Apr 2023 08:45:33 -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,34 @@ 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,12 +1647,12 @@ 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, lua51,
+     [ have_lua=yes ],
+     [
+     AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead])
+ 
+-    PKG_CHECK_MODULES(LUA, lua5.1,
++    PKG_CHECK_MODULES(LUA, lua51,
+       [ have_lua=yes ],
+       [
+       AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
+@@ -1681,9 +1664,9 @@ then
+           AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
+             [],
+             [ have_lua=no ] )
+-          AC_CHECK_LIB(  lua5.2 , luaL_newstate,
++          AC_CHECK_LIB(  lua52 , luaL_newstate,
+             [LUA_LIBS="-llua5.2"],
+-          AC_CHECK_LIB( lua5.1 , luaL_newstate,
++          AC_CHECK_LIB( lua51 , luaL_newstate,
+             [LUA_LIBS="-llua5.1"],
+             AC_CHECK_LIB( lua51 , luaL_newstate,
+               [LUA_LIBS="-llua51"],
Index: pkg/PLIST-main
===================================================================
RCS file: /home/cvs/ports/x11/vlc/pkg/PLIST-main,v
retrieving revision 1.51
diff -u -p -u -p -r1.51 PLIST-main
--- pkg/PLIST-main      25 Nov 2022 11:52:17 -0000      1.51
+++ pkg/PLIST-main      25 Apr 2023 08:39:14 -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/

Reply via email to