Skip to main content
Topic: Fix for lua53 to work with vlc (Read 608 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Fix for lua53 to work with vlc

This is taken from the original lua-5.3 PKGBUILD. For some reason the cflags weren't incorporated into lua53.
Apply in the packages repo:
Code: [Select]
diff --git a/lua53/trunk/PKGBUILD b/lua53/trunk/PKGBUILD
index b2732f60c..1748f0f14 100644
--- a/lua53/trunk/PKGBUILD
+++ b/lua53/trunk/PKGBUILD
@@ -34,7 +34,7 @@ prepare() {
 build() {
   cd lua-$pkgver
 
-  make MYCFLAGS="$CFLAGS -fPIC" MYLDFLAGS="$LDFLAGS" linux
+  make MYCFLAGS="$CFLAGS -fPIC -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" MYLDFLAGS="$LDFLAGS" linux
 }
 
 package() {
Then vlc can be patched too (not tested because I use a custom VLC build. lua53_compat.patch will have to be reapplied, of course).
Inside packages-media:
Code: [Select]
diff --git a/vlc/trunk/PKGBUILD b/vlc/trunk/PKGBUILD
index bf85400..b9b8036 100644
--- a/vlc/trunk/PKGBUILD
+++ b/vlc/trunk/PKGBUILD
@@ -13,7 +13,7 @@ pkgdesc='Multi-platform MPEG, VCD/DVD, and DivX player'
 url='https://www.videolan.org/vlc/'
 arch=('x86_64')
 license=('LGPL2.1' 'GPL2')
-depends=('a52dec' 'libdvbpsi' 'libxpm' 'libdca' 'libproxy' 'lua52' 'libidn'
+depends=('a52dec' 'libdvbpsi' 'libxpm' 'libdca' 'libproxy' 'lua53' 'libidn'
          'libmatroska' 'taglib' 'libmpcdec' 'ffmpeg' 'faad2' 'libupnp' 'libmad'
          'libmpeg2' 'xcb-util-keysyms' 'libtar' 'libxinerama' 'libsecret'
          'libarchive' 'qt5-base' 'qt5-x11extras' 'qt5-svg' 'freetype2'
@@ -55,7 +55,7 @@ optdepends=('avahi: service discovery using bonjour protocol'
             'mpg123: mpg123 codec'
             'protobuf: chromecast streaming'
             'libmicrodns: mDNS services discovery (chromecast etc)'
-            'lua52-socket: http interface'
+            'lua53-socket: http interface'
             'live-media: RTSP input'
             'libdvdread: DVD input module'
             'libdvdnav: DVD with navigation input module'
@@ -97,11 +97,13 @@ replaces=('vlc-plugin')
 options=('!emptydirs')
 source=(https://download.videolan.org/${pkgname}/${_vlcver}/${pkgname}-${_vlcver}${_vlcfixupver}.tar.xz{,.asc}
         update-vlc-plugin-cache.hook
-        qt_5_15.patch)
+        qt_5_15.patch
+        lua53_compat.patch)
 sha512sums=('8ce1e2f11aabf847dc5c55cf21ce6d7c0419a1051b5f4795e36cd060eab82d5056e44b4c070b80af56744e6aa841ef538386d08bc3b397a444e7258b2ba3f76b'
             'SKIP'
             'b247510ffeadfd439a5dadd170c91900b6cdb05b5ca00d38b1a17c720ffe5a9f75a32e0cb1af5ebefdf1c23c5acc53513ed983a736e8fa30dd8fad237ef49dd3'
-            '43446257248461e7e6c237dbc63d58b994f4ce527573ff67437e3bade6ffb752aad94de19309c9cdca5f513e5c42f9d0c8b1db36198af6d41e18d3634c08761f')
+            '43446257248461e7e6c237dbc63d58b994f4ce527573ff67437e3bade6ffb752aad94de19309c9cdca5f513e5c42f9d0c8b1db36198af6d41e18d3634c08761f'
+            '33cda373aa1fb3ee19a78748e2687f2b93c8662c9fda62ecd122a2e649df8edaceb54dda3991bc38c80737945a143a9e65baa2743a483bb737bb94cd590dc25f')
 validpgpkeys=('65F7C6B4206BD057A7EB73787180713BE58D1ADC') # VideoLAN Release Signing Key
 
 prepare() {
@@ -126,8 +128,8 @@ build() {
   export CFLAGS+=" -I/usr/include/samba-4.0"
   export CPPFLAGS+=" -I/usr/include/samba-4.0"
   export CXXFLAGS+=" -std=c++11"
-  export LUAC=/usr/bin/luac5.2
-  export LUA_LIBS="$(pkg-config --libs lua5.2)"
+  export LUAC=/usr/bin/luac5.3
+  export LUA_LIBS="$(pkg-config --libs lua5.3)"
   export RCC=/usr/bin/rcc-qt5
 
   ./configure \
Unfortunately, lua-5.4 cannot be fixed this way, apparently.

 

Re: Fix for lua53 to work with vlc

Reply #1
Currently Arch's version is also on lua52, which means once they change it, we will as well. We try to keep close to Arch minus changes we must make, 99% of the time is removal of sysd stuff.