summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2020-06-06 19:09:21 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2020-06-06 19:28:26 +0200
commitc3a1060b94ae9df82e8406b481e8bd5fe5741df5 (patch)
treeecdbdd44fa4e58e9f415549dcf77873787e54c58
parent628268a102dde3b94b74f1652c6a5e56c2810cb6 (diff)
build: disable elua by default, plus nicer detection
Elua is now disabled by default. There are some other changes: 1) Elua scripts are only installed if Elua is enabled 2) Lua bindings are only installed if Elua is enabled 3) Elua with interpreter is clearly experimental and will message
-rwxr-xr-x.ci/ci-configure.sh4
-rw-r--r--meson.build17
-rw-r--r--meson_options.txt4
-rw-r--r--src/bindings/meson.build4
-rw-r--r--src/lib/elua/meson.build5
-rw-r--r--src/scripts/meson.build5
6 files changed, 29 insertions, 10 deletions
diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh
index d2454e548c..bd429aea16 100755
--- a/.ci/ci-configure.sh
+++ b/.ci/ci-configure.sh
@@ -19,7 +19,7 @@ if [ "$DISTRO" != "" ] ; then
19 -Ddebug-threads=true -Dglib=true -Dg-mainloop=true -Dxpresent=true -Dxinput22=true \ 19 -Ddebug-threads=true -Dglib=true -Dg-mainloop=true -Dxpresent=true -Dxinput22=true \
20 -Devas-loaders-disabler=json -Decore-imf-loaders-disabler= \ 20 -Devas-loaders-disabler=json -Decore-imf-loaders-disabler= \
21 -Dharfbuzz=true -Dpixman=true -Dhyphen=true -Defl-one=true \ 21 -Dharfbuzz=true -Dpixman=true -Dhyphen=true -Defl-one=true \
22 -Dvnc-server=true -Dbindings=lua,cxx,mono -Delogind=false -Dinstall-eo-files=true -Dphysics=true" 22 -Dvnc-server=true -Delua=true -Dbindings=lua,cxx,mono -Delogind=false -Dinstall-eo-files=true -Dphysics=true"
23 23
24 # Enabled png, jpeg evas loader for in tree edje file builds 24 # Enabled png, jpeg evas loader for in tree edje file builds
25 DISABLED_LINUX_COPTS=" -Daudio=false -Davahi=false -Dx11=false -Dphysics=false -Deeze=false \ 25 DISABLED_LINUX_COPTS=" -Daudio=false -Davahi=false -Dx11=false -Dphysics=false -Deeze=false \
@@ -30,7 +30,7 @@ if [ "$DISTRO" != "" ] ; then
30 -Decore-imf-loaders-disabler=xim,ibus,scim \ 30 -Decore-imf-loaders-disabler=xim,ibus,scim \
31 -Dfribidi=false -Dfontconfig=false \ 31 -Dfribidi=false -Dfontconfig=false \
32 -Dedje-sound-and-video=false -Dembedded-lz4=false -Dlibmount=false -Dv4l2=false \ 32 -Dedje-sound-and-video=false -Dembedded-lz4=false -Dlibmount=false -Dv4l2=false \
33 -Delua=true -Dnls=false -Dbindings= -Dlua-interpreter=luajit -Dnative-arch-optimization=false" 33 -Delua=false -Dnls=false -Dbindings= -Dlua-interpreter=luajit -Dnative-arch-optimization=false"
34 #evas_filter_parser.c:(.text+0xc59): undefined reference to `lua_getglobal' with interpreter lua 34 #evas_filter_parser.c:(.text+0xc59): undefined reference to `lua_getglobal' with interpreter lua
35 35
36 RELEASE_READY_LINUX_COPTS=" --buildtype=release" 36 RELEASE_READY_LINUX_COPTS=" --buildtype=release"
diff --git a/meson.build b/meson.build
index 3585eabdef..f820761ade 100644
--- a/meson.build
+++ b/meson.build
@@ -270,6 +270,7 @@ luaold_interpreters = [
270] 270]
271 271
272lua_pc_name = '' 272lua_pc_name = ''
273have_elua = get_option('elua')
273 274
274if get_option('lua-interpreter') == 'lua' 275if get_option('lua-interpreter') == 'lua'
275 config_h.set('ENABLE_LUA_OLD', '1') 276 config_h.set('ENABLE_LUA_OLD', '1')
@@ -280,13 +281,27 @@ if get_option('lua-interpreter') == 'lua'
280 break 281 break
281 endif 282 endif
282 endforeach 283 endforeach
284 if not lua.found()
285 error('Lua not found')
286 endif
287 if have_elua
288 luaver_min = cc.compute_int('LUA_VERSION_NUM - 500',
289 prefix: '#include <lua.h>', dependencies: lua
290 )
291 lua_ffi = dependency('cffi-lua-5.@0@'.format(luaver_min), required: false)
292 if not lua_ffi.found()
293 error('Elua with interpreter is experimental, disable it or install cffi-lua...')
294 else
295 message('Using experimental Elua with interpreter support...')
296 endif
297 endif
283else 298else
284 lua = dependency(get_option('lua-interpreter')) 299 lua = dependency(get_option('lua-interpreter'))
285 lua_pc_name = 'luajit' 300 lua_pc_name = 'luajit'
286endif 301endif
287 302
288if sys_osx == true and get_option('lua-interpreter') == 'luajit' 303if sys_osx == true and get_option('lua-interpreter') == 'luajit'
289# luajit on macro is broken, this means we need to generate our own dependency with our arguments, a library later still needs to link to luajit for the pagesize argument thingy 304# luajit on macos is broken, this means we need to generate our own dependency with our arguments, a library later still needs to link to luajit for the pagesize argument thingy
290 lua = declare_dependency( 305 lua = declare_dependency(
291 include_directories: include_directories(lua.get_pkgconfig_variable('includedir')), 306 include_directories: include_directories(lua.get_pkgconfig_variable('includedir')),
292 link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), '-l'+lua.get_pkgconfig_variable('libname')] 307 link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), '-l'+lua.get_pkgconfig_variable('libname')]
diff --git a/meson_options.txt b/meson_options.txt
index 6b2464a03a..432a8b3bcf 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -262,7 +262,7 @@ option('v4l2',
262 262
263option('elua', 263option('elua',
264 type : 'boolean', 264 type : 'boolean',
265 value : true, 265 value : false,
266 description : 'Lua launcher binary support in efl' 266 description : 'Lua launcher binary support in efl'
267) 267)
268 268
@@ -287,7 +287,7 @@ option('nls',
287option('bindings', 287option('bindings',
288 type : 'array', 288 type : 'array',
289 choices : ['lua', 'cxx', 'mono'], 289 choices : ['lua', 'cxx', 'mono'],
290 value : ['lua', 'cxx'], 290 value : ['cxx'],
291 description : 'Which auto-generated language bindings for efl to enable', 291 description : 'Which auto-generated language bindings for efl to enable',
292) 292)
293 293
diff --git a/src/bindings/meson.build b/src/bindings/meson.build
index 61027d3743..d7d7cba8be 100644
--- a/src/bindings/meson.build
+++ b/src/bindings/meson.build
@@ -18,6 +18,10 @@ if (bindings.contains('cxx') == false and bindings.contains('mono'))
18 ) 18 )
19endif 19endif
20 20
21if bindings.contains('lua') and not have_elua
22 error('Elua is necessary for Lua bindings')
23endif
24
21foreach binding : bindings_order 25foreach binding : bindings_order
22 if bindings.contains(binding) 26 if bindings.contains(binding)
23 subdir(join_paths( binding)) 27 subdir(join_paths( binding))
diff --git a/src/lib/elua/meson.build b/src/lib/elua/meson.build
index 15b66aefdb..66bd9454b9 100644
--- a/src/lib/elua/meson.build
+++ b/src/lib/elua/meson.build
@@ -2,10 +2,7 @@ elua_deps = [eina, eo, efl, ecore, ecore_file, intl]
2elua_pub_deps = [lua] 2elua_pub_deps = [lua]
3 3
4if get_option('lua-interpreter') == 'lua' 4if get_option('lua-interpreter') == 'lua'
5 luaver_min = cc.compute_int('LUA_VERSION_NUM - 500', 5 elua_deps += lua_ffi
6 prefix: '#include <lua.h>', dependencies: lua
7 )
8 elua_deps += dependency('cffi-lua-5.@0@'.format(luaver_min))
9endif 6endif
10 7
11elua_src = ['elua.c', 'io.c', 'cache.c'] 8elua_src = ['elua.c', 'io.c', 'cache.c']
diff --git a/src/scripts/meson.build b/src/scripts/meson.build
index 6057ad788a..48713158b0 100644
--- a/src/scripts/meson.build
+++ b/src/scripts/meson.build
@@ -1,2 +1,5 @@
1subdir('eo') 1subdir('eo')
2subdir('elua') 2
3if have_elua
4 subdir('elua')
5endif