meson: Prevent broken lua plug-ins

See: https://gitlab.gnome.org/GNOME/gimp/-/issues/11876

For 3.0 we will support only Lua 5.1, since we need to figure out how
much of the Lua 5.1 API is compatible with newer versions (Lua minor
versions aren't like Python minor versions, there is API breakage so
plug-ins would be completely unreliable, this commit prevent this).

Also, change some files to not force luajit since it isn't mandatory.
This commit is contained in:
Bruno 2024-08-06 18:11:38 -03:00 committed by Jehan
parent f5d14a5d66
commit 7037297526
3 changed files with 5 additions and 5 deletions

View File

@ -291,7 +291,7 @@ help in that regard:
"gegl:matting-levin" GEGL operation for alternative matting engine
Python @PYTHON3_REQUIRED_VERSION@ and PyGObject for Python 3 plug-ins
GJS for Javascript plug-ins
LuaJIT and LGI for Lua plug-ins
Lua 5.1 (or LuaJIT) and LGI for Lua plug-ins
dot for "Show Image Graph" (unstable branches)
xdg-desktop-portal implemented for your desktop for various D-Bus API (screenshot, color-picking…)

View File

@ -1,4 +1,4 @@
#!/usr/bin/env luajit
#!/usr/bin/env lua
-- GIMP - The GNU Image Manipulation Program
-- Copyright (C) 1995 Spencer Kimball and Peter Mattis

View File

@ -1117,12 +1117,12 @@ endif
## Lua
have_lua = false
# At time of writing, lua-lgi works with Lua 5.1, 5.2, 5.3, 5.4 and LuaJIT2. On
# most platforms, we use luajit.
# At time of writing, lua-lgi works with Lua 5.1, 5.2, 5.3 and LuaJIT2, but we
# support only Lua 5.1 API. See: https://gitlab.gnome.org/GNOME/gimp/-/issues/11876
if get_option('lua').allowed()
have_lua_lgi = false
foreach lua_bin : [ 'luajit', 'lua5.1', 'lua5.2', 'lua5.3', 'lua5.4', 'lua' ]
foreach lua_bin : [ 'luajit', 'lua5.1', 'lua' ]
lua = find_program(lua_bin, required: false)
if lua.found() and meson.can_run_host_binaries()