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

Steve Lhomme robux4 at ycbcr.xyz
Mon Nov 16 07:56:06 CET 2020


On 2020-11-14 16:30, Alexandre Janniaux wrote:
> 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).
> 
> It is worth noticing that being able to use lua >= 5.1 doesn't mean any
> version of lua >= 5.1 would be compatible. The source code is completely
> compliant to those version and native builds will have no issues with
> using a more recent version, but cross-compilation environment for 32bit
> environment from a 64bit one won't and need the appropriate version to
> be installed.

I think that's the whole point. We only want to compile with Lua 5.2. If 
Lua 8.12 is available on the system we are not going to use it properly.

> ---
>   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 491353b484..c64eb6299d 100644
> --- a/contrib/src/lua/rules.mak
> +++ b/contrib/src/lua/rules.mak
> @@ -28,6 +28,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.29.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list