correct edje pkg-config generation for luaold

Currently, edje.pc gets its lua Requires from the -Dlua-interpreter argument.
If -Dlua-interpreter=lua, an unversioned lua entry ends up in Requires, which
cannot always be satisifed.  The evas filters meson.build handles this case by
generating a version-specific entry.  This patch copies that logic into the top
level meson.build, and passes the result to the edje subproject.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10965
This commit is contained in:
Ross Vandegrift 2019-12-25 04:33:53 +00:00 committed by Marcel Hollerbach
parent 595a066a64
commit 2e854ce7ed
3 changed files with 35 additions and 43 deletions

View File

@ -254,6 +254,39 @@ ecore_evas_wayland_engine_include_dir = []
evas_static_list = []
luaold_interpreters = [
['lua', ['>=5.1.0','<5.3.0']],
['lua51', ['>=5.1.0','<5.2.0']],
['lua-5.1', ['>=5.1.0','<5.2.0']],
['lua5.1', ['>=5.1.0','<5.2.0']],
['lua52', ['>=5.2.0','<5.3.0']],
['lua-5.2', ['>=5.2.0','<5.3.0']],
['lua5.2', ['>=5.2.0','<5.3.0']],
]
lua_pc_name = ''
if get_option('lua-interpreter') == 'lua'
foreach l : luaold_interpreters
lua = dependency(l[0], version: l[1], required:false)
lua_pc_name = l[0]
if lua.found() == true
break
endif
endforeach
else
lua = dependency(get_option('lua-interpreter'))
lua_pc_name = 'luajit'
endif
if sys_osx == true and get_option('lua-interpreter') == 'luajit'
# 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
lua = declare_dependency(
include_directories: include_directories(lua.get_pkgconfig_variable('includedir')),
link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), '-l'+lua.get_pkgconfig_variable('libname')]
)
endif
subprojects = [
# name | option | mod | lib | bin | bench | tests | examples | pkg-config options | name of static libs
['evil' ,[] , false, true, false, false, false, false, [], []],
@ -293,7 +326,7 @@ subprojects = [
['efreet' ,[] , false, false, true, false, false, false, ['eina', 'efl', 'eo'], []],
['ecore_imf_evas' ,[] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
['ephysics' ,['physics'] , false, true, false, false, false, false, ['eina', 'efl', 'eo'], []],
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', get_option('lua-interpreter')], []],
['edje' ,[] , false, true, true, false, true, true, ['evas', 'eo', 'efl', lua_pc_name], []],
['emotion' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], []],
['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []],
['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []],

View File

@ -1,16 +1,5 @@
elua_deps = [eina, eo, efl, ecore, ecore_file, intl]
if sys_osx == true
# 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
luajit = dependency('luajit')
lua = declare_dependency(
include_directories: include_directories(luajit.get_pkgconfig_variable('includedir')),
link_args: ['-L'+luajit.get_pkgconfig_variable('libdir'), '-l'+luajit.get_pkgconfig_variable('libname')]
)
elua_pub_deps = [lua]
else
elua_pub_deps = [dependency('luajit')]
endif
elua_pub_deps = [lua]
elua_src = ['elua.c', 'io.c', 'cache.c']
elua_header_src = ['Elua.h']

View File

@ -7,34 +7,4 @@ evas_src += files([
'evas_filter_utils.c',
])
luaold_interpreters = [
['lua', ['>=5.1.0','<5.3.0']],
['lua51', ['>=5.1.0','<5.2.0']],
['lua-5.1', ['>=5.1.0','<5.2.0']],
['lua5.1', ['>=5.1.0','<5.2.0']],
['lua52', ['>=5.2.0','<5.3.0']],
['lua-5.2', ['>=5.2.0','<5.3.0']],
['lua5.2', ['>=5.2.0','<5.3.0']],
]
if get_option('lua-interpreter') == 'lua'
config_h.set('ENABLE_LUA_OLD', '1')
foreach l : luaold_interpreters
lua = dependency(l[0], version: l[1], required:false)
if lua.found() == true
break
endif
endforeach
else
lua = dependency(get_option('lua-interpreter'))
endif
if sys_osx == true and get_option('lua-interpreter') == 'luajit'
# 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
lua = declare_dependency(
include_directories: include_directories(lua.get_pkgconfig_variable('includedir')),
link_args: ['-L'+lua.get_pkgconfig_variable('libdir'), '-l'+lua.get_pkgconfig_variable('libname')]
)
endif
evas_deps += lua