Use Lua wrap by default (#1481)
Debian and all its derivatives ship a broken Lua 5.4 that is missing some symbols. To work around broken distros and make development and distribution easier use the wrap by default and add an option to use the system version.
This commit is contained in:
parent
3f3b4d52b4
commit
3993d689fb
13
meson.build
13
meson.build
|
@ -4,8 +4,7 @@ project('lite-xl',
|
||||||
license : 'MIT',
|
license : 'MIT',
|
||||||
meson_version : '>= 0.56',
|
meson_version : '>= 0.56',
|
||||||
default_options : [
|
default_options : [
|
||||||
'c_std=gnu11',
|
'c_std=gnu11'
|
||||||
'wrap_mode=nofallback'
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -84,11 +83,10 @@ if not get_option('source-only')
|
||||||
'lua', # Fedora
|
'lua', # Fedora
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if get_option('use_system_lua')
|
||||||
foreach lua : lua_names
|
foreach lua : lua_names
|
||||||
last_lua = (lua == lua_names[-1] or get_option('wrap_mode') == 'forcefallback')
|
last_lua = (lua == lua_names[-1] or get_option('wrap_mode') == 'forcefallback')
|
||||||
lua_dep = dependency(lua, fallback: last_lua ? ['lua', 'lua_dep'] : [], required : false,
|
lua_dep = dependency(lua, required : false,
|
||||||
version: '>= 5.4',
|
|
||||||
default_options: default_fallback_options + ['default_library=static', 'line_editing=false', 'interpreter=false']
|
|
||||||
)
|
)
|
||||||
if lua_dep.found()
|
if lua_dep.found()
|
||||||
break
|
break
|
||||||
|
@ -101,6 +99,11 @@ if not get_option('source-only')
|
||||||
lua_dep = cc.find_library('lua', required : true)
|
lua_dep = cc.find_library('lua', required : true)
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
else
|
||||||
|
lua_dep = dependency('', fallback: ['lua', 'lua_dep'], required : true,
|
||||||
|
default_options: default_fallback_options + ['default_library=static', 'line_editing=false', 'interpreter=false']
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
pcre2_dep = dependency('libpcre2-8', fallback: ['pcre2', 'libpcre2_8'],
|
pcre2_dep = dependency('libpcre2-8', fallback: ['pcre2', 'libpcre2_8'],
|
||||||
default_options: default_fallback_options + ['default_library=static', 'grep=false', 'test=false']
|
default_options: default_fallback_options + ['default_library=static', 'grep=false', 'test=false']
|
||||||
|
|
|
@ -4,3 +4,4 @@ option('portable', type : 'boolean', value : false, description: 'Portable insta
|
||||||
option('renderer', type : 'boolean', value : false, description: 'Use SDL renderer')
|
option('renderer', type : 'boolean', value : false, description: 'Use SDL renderer')
|
||||||
option('dirmonitor_backend', type : 'combo', value : '', choices : ['', 'inotify', 'fsevents', 'kqueue', 'win32', 'dummy'], description: 'define what dirmonitor backend to use')
|
option('dirmonitor_backend', type : 'combo', value : '', choices : ['', 'inotify', 'fsevents', 'kqueue', 'win32', 'dummy'], description: 'define what dirmonitor backend to use')
|
||||||
option('arch_tuple', type : 'string', value : '', description: 'Specify a custom architecture tuple')
|
option('arch_tuple', type : 'string', value : '', description: 'Specify a custom architecture tuple')
|
||||||
|
option('use_system_lua', type : 'boolean', value : false, description: 'Prefer System Lua over a the meson wrap')
|
||||||
|
|
Loading…
Reference in New Issue