On 2023-04-26 11:15 a.m., 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.

I don't mind adding it to the main package.

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    26 Apr 2023 15:12:15 -0000
@@ -1,11 +1,13 @@
  COMMENT-main= VideoLAN client; multimedia player
  COMMENT-jack= JACK audio output module for VLC
+COMMENT-lua=   Lua support for VLC, including telnet module
V= 3.0.18
  DISTNAME=     vlc-${V}
  PKGNAME-main= ${DISTNAME}
  PKGNAME-jack= vlc-jack-${V}
-REVISION-main= 1
+PKGNAME-lua=   vlc-lua-${V}
+REVISION-main= 2
  CATEGORIES=   x11
  MASTER_SITES= https://download.videolan.org/pub/videolan/vlc/${V}/
  EXTRACT_SUFX= .tar.xz
@@ -49,6 +51,8 @@ WANTLIB-main+=        v4l2
WANTLIB-jack= db execinfo jack vlccore ${WANTLIB-common} +WANTLIB-lua= ${MODLUA_WANTLIB}
+
  AUTOCONF_VERSION= 2.69
  AUTOMAKE_VERSION= 1.16
  AUTORECONF=   ./bootstrap
@@ -101,6 +105,8 @@ LIB_DEPENDS-main= ${MODQT5_LIB_DEPENDS}
                x11/gtk+3
  LIB_DEPENDS-jack= ${BUILD_PKGPATH} \
                audio/jack
+RUN_DEPENDS-lua= ${BUILD_PKGPATH}
+LIB_DEPENDS-lua= ${MODLUA_LIB_DEPENDS}
  BUILD_DEPENDS=        ${MODGNU_AUTOCONF_DEPENDS} \
                ${MODGNU_AUTOMAKE_DEPENDS} \
                archivers/gtar \
@@ -145,7 +151,6 @@ CONFIGURE_ARGS+=--disable-a52 \
                --disable-libva \
                --disable-linsys \
                --disable-live555 \
-               --disable-lua \
                --disable-mad \
                --disable-mfx \
                --disable-microdns \
@@ -190,19 +195,27 @@ CONFIGURE_ENV+=   BUILDCC="${CC}" \
                PKG_CONFIG_PATH="${LOCALBASE}/lib/qt5/pkgconfig" \
                RCC="${LOCALBASE}/bin/rcc-qt5"
-PSEUDO_FLAVORS= no_jack
+PSEUDO_FLAVORS=        no_jack no_lua
  FLAVOR?=
-MULTI_PACKAGES= -main
-
-.if !${FLAVOR:Mno_jack}
-MULTI_PACKAGES+=-jack
-.endif
+MULTI_PACKAGES=        -main -jack -lua
.include <bsd.port.arch.mk> .if !${BUILD_PACKAGES:M-jack}
  CONFIGURE_ARGS+=--disable-jack
+.endif
+
+.if !${BUILD_PACKAGES:M-lua}
+CONFIGURE_ARGS+= --disable-lua
+.else
+CONFIGURE_ENV+=        LUAC="luac${MODLUA_DEP_VERSION}"
+MODULES+=      lang/lua
+MODLUA_VERSION=        5.2
+MODLUA_SA=     Yes
+MODLUA_RUNDEP= No
+CONFIGURE_ARGS+= --enable-lua
+UPDATE_PLIST_ARGS+= -i MODLUA_DEP_VERSION
  .endif
.if ${MACHINE_ARCH} == "amd64"
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  26 Apr 2023 15:12:15 -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/DESCR-lua
===================================================================
RCS file: pkg/DESCR-lua
diff -N pkg/DESCR-lua
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/DESCR-lua       26 Apr 2023 15:12:15 -0000
@@ -0,0 +1,2 @@
+Lua support for VLC. Functionality includes telnet and http servers
+and service discovery.
Index: pkg/PLIST-lua
===================================================================
RCS file: pkg/PLIST-lua
diff -N pkg/PLIST-lua
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PLIST-lua       26 Apr 2023 15:12:15 -0000
@@ -0,0 +1,144 @@
+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/lua/
+@so lib/vlc/plugins/lua/liblua_plugin.so
+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/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


Reply via email to