[vlc-devel] [PATCH 1/5] contrib: lua: autodetect lua >= 5.1

Alexandre Janniaux ajanni at videolabs.io
Mon Apr 6 15:56:00 CEST 2020


When building on ArchLinux currently, the contrib was built even if
lua5.3 is installed. As at least Archlinux and Debian are exposing both
a luaX.Y.pc and lua.pc file for the latest supported version of lua,
detecting that the system version is correct through lua.pc should
also ensure that the latest compatible version is installed and used
instead.

The other checks are still needed as you can for example install lua5.2
(which will expose a lua5.2.pc file but no lua.pc file) without having
to install lua (5.3).
---
 contrib/src/lua/rules.mak | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index d0ce491c91..bf5671572c 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -27,6 +27,9 @@ endif
 # Feel free to add autodetection if you need to...
 PKGS += lua luac
 PKGS_ALL += luac
+ifeq ($(call need_pkg,"lua >= 5.1"),)
+PKGS_FOUND += lua luac
+endif
 ifeq ($(call need_pkg,"lua5.2"),)
 PKGS_FOUND += lua luac
 endif
-- 
2.26.0



More information about the vlc-devel mailing list