diff -ur libpeas-1.30.0/loaders/lua5.1/meson.build libpeas-1.30.0.new/loaders/lua5.1/meson.build --- libpeas-1.30.0/loaders/lua5.1/meson.build 2021-03-19 21:24:38.792421600 -0300 +++ libpeas-1.30.0.new/loaders/lua5.1/meson.build 2021-07-01 17:01:43.185470314 -0300 @@ -1,39 +1,39 @@ -lua51_loader_name = 'lua51loader' +lua_loader_name = 'lualoader' -lua51_lgi_version = lua51_lgi_dep.version() -lua51_lgi_version_arr = lua51_lgi_version.split('.') -lua51_lgi_version_major = lua51_lgi_version_arr[0].to_int() -lua51_lgi_version_minor = lua51_lgi_version_arr[1].to_int() -lua51_lgi_version_micro = lua51_lgi_version_arr[2].to_int() +lua_lgi_version = lua_lgi_dep.version() +lua_lgi_version_arr = lua_lgi_version.split('.') +lua_lgi_version_major = lua_lgi_version_arr[0].to_int() +lua_lgi_version_minor = lua_lgi_version_arr[1].to_int() +lua_lgi_version_micro = lua_lgi_version_arr[2].to_int() -lua51_loader_c = files( +lua_loader_c = files( 'peas-lua-internal.c', 'peas-lua-utils.c', 'peas-plugin-loader-lua.c', ) -subdir('resources') # Declares 'lua51_loader_res' +subdir('resources') # Declares 'lua_loader_res' -lua51_loader_deps = [ +lua_loader_deps = [ libpeas_dep, - lua51_dep, - lua51_lgi_dep, + lua_dep, + lua_lgi_dep, luajit_dep, ] -lua51_loader_c_args = [ +lua_loader_c_args = [ '-DHAVE_CONFIG_H', - '-DLGI_MAJOR_VERSION=@0@'.format(lua51_lgi_version_major), - '-DLGI_MINOR_VERSION=@0@'.format(lua51_lgi_version_minor), - '-DLGI_MICRO_VERSION=@0@'.format(lua51_lgi_version_micro), + '-DLGI_MAJOR_VERSION=@0@'.format(lua_lgi_version_major), + '-DLGI_MINOR_VERSION=@0@'.format(lua_lgi_version_minor), + '-DLGI_MICRO_VERSION=@0@'.format(lua_lgi_version_micro), ] -lua51_loader_sha = shared_module( - lua51_loader_name, - lua51_loader_c + lua51_loader_res, +lua_loader_sha = shared_module( + lua_loader_name, + lua_loader_c + lua_loader_res, include_directories: rootdir, - dependencies: lua51_loader_deps, - c_args: lua51_loader_c_args, + dependencies: lua_loader_deps, + c_args: lua_loader_c_args, install: true, install_dir: join_paths( pkglibdir, diff -ur libpeas-1.30.0/loaders/lua5.1/resources/meson.build libpeas-1.30.0.new/loaders/lua5.1/resources/meson.build --- libpeas-1.30.0/loaders/lua5.1/resources/meson.build 2021-03-19 21:24:38.793421700 -0300 +++ libpeas-1.30.0.new/loaders/lua5.1/resources/meson.build 2021-07-01 17:07:37.886494127 -0300 @@ -1,4 +1,4 @@ -lua51_loader_res = gnome.compile_resources( +lua_loader_res = gnome.compile_resources( 'peas-lua-resources', 'peas-lua.gresource.xml', export: true, diff -ur libpeas-1.30.0/loaders/meson.build libpeas-1.30.0.new/loaders/meson.build --- libpeas-1.30.0/loaders/meson.build 2021-03-19 21:24:38.793421700 -0300 +++ libpeas-1.30.0.new/loaders/meson.build 2021-07-01 17:00:19.665464707 -0300 @@ -1,4 +1,4 @@ -if build_lua51_loader == true +if build_lua_loader == true subdir('lua5.1') endif diff -ur libpeas-1.30.0/meson.build libpeas-1.30.0.new/meson.build --- libpeas-1.30.0/meson.build 2021-03-19 21:24:38.795421600 -0300 +++ libpeas-1.30.0.new/meson.build 2021-07-01 16:59:23.066460907 -0300 @@ -135,42 +135,42 @@ endif pygobject_dep = dependency('pygobject-3.0', version: pygobject_req, required: false) -lua51_dep = dependency('lua51', version: lua_req, required: false) -if not lua51_dep.found() - lua51_dep = dependency('lua-5.1', version: lua_req, required: false) +lua_dep = dependency('lua', version: lua_req, required: false) +if not lua_dep.found() + lua_dep = dependency('lua', version: lua_req, required: false) endif luajit_dep = dependency('luajit', version: luajit_req, required: false) lua_lgi_found = false lua_lgi_ver = 'not found' -lua51_prg = find_program('lua5.1', required: false) -if not lua51_prg.found() - lua51_prg = find_program('lua51', required: false) +lua_prg = find_program('lua', required: false) +if not lua_prg.found() + lua_prg = find_program('lua', required: false) endif luajit_prg = find_program('luajit', required: false) xmllint_prg = find_program('xmllint', required: false) if cc.get_id() == 'msvc' if luajit_prg.found() - # luajit has lua51.lib as its import library - lua_names = ['lua51'] + # luajit has lua.lib as its import library + lua_names = ['lua'] else - lua_names = ['lua53', 'lua52', 'lua51'] + lua_names = ['lua53', 'lua52', 'lua'] endif lua_headers = ['lua.h', 'lualib.h', 'lauxlib.h'] # On Windows, the lua program may be named as lua.exe foreach lua: lua_names + ['lua'] - if not lua51_prg.found() and not luajit_prg.found() - lua51_prg = find_program(lua, required: false) + if not lua_prg.found() and not luajit_prg.found() + lua_prg = find_program(lua, required: false) endif - if lua51_prg.found() + if lua_prg.found() if lua != 'lua' - lua51_dep = cc.find_library(lua, has_headers: lua_headers, required: false) + lua_dep = cc.find_library(lua, has_headers: lua_headers, required: false) endif endif endforeach - if not lua51_dep.found() and not luajit_dep.found() + if not lua_dep.found() and not luajit_dep.found() foreach lualib: lua_names if luajit_prg.found() if not luajit_dep.found() @@ -178,9 +178,9 @@ endif endif - if lua51_prg.found() - if not lua51_dep.found() - lua51_dep = cc.find_library(lualib, has_headers: lua_headers, required: false) + if lua_prg.found() + if not lua_dep.found() + lua_dep = cc.find_library(lualib, has_headers: lua_headers, required: false) endif endif endforeach @@ -189,7 +189,7 @@ lua_found = false -if (luajit_dep.found() and luajit_prg.found()) or (lua51_dep.found() and lua51_prg.found()) +if (luajit_dep.found() and luajit_prg.found()) or (lua_dep.found() and lua_prg.found()) lua_found = true endif @@ -197,13 +197,13 @@ if luajit_prg.found() lua_prg = luajit_prg else - lua_prg = lua51_prg + lua_prg = lua_prg endif lua_lgi_check = run_command(lua_prg, ['-e', 'print(require("lgi")._VERSION)']) if lua_lgi_check.returncode() == 0 lua_lgi_ver = lua_lgi_check.stdout().strip() if lua_lgi_ver.version_compare(lua_lgi_req) - lua51_lgi_dep = declare_dependency(version: lua_lgi_ver) + lua_lgi_dep = declare_dependency(version: lua_lgi_ver) lua_lgi_found = true endif endif @@ -284,10 +284,10 @@ generate_gir = false endif -build_lua51_loader = get_option('lua51') -lua51_found = (luajit_dep.found() or lua51_dep.found()) and lua_lgi_found -if build_lua51_loader and not lua51_found - build_lua51_loader = false +build_lua_loader = get_option('lua') +lua_found = (luajit_dep.found() or lua_dep.found()) and lua_lgi_found +if build_lua_loader and not lua_found + build_lua_loader = false endif build_python2_loader = get_option('python2') @@ -333,7 +333,7 @@ ' Glade catalog: @0@'.format(install_glade_catalog), ' GTK+ widgetry: @0@'.format(build_gtk_widgetry), ' Introspection: @0@'.format(generate_gir), - ' Lua 5.1 support: @0@'.format(build_lua51_loader), + ' Lua 5.1 support: @0@'.format(build_lua_loader), ' Python 2 support: @0@'.format(build_python2_loader), ' Python 3 support: @0@'.format(build_python3_loader), '', diff -ur libpeas-1.30.0/meson_options.txt libpeas-1.30.0.new/meson_options.txt --- libpeas-1.30.0/meson_options.txt 2021-03-19 21:24:38.795421600 -0300 +++ libpeas-1.30.0.new/meson_options.txt 2021-07-01 16:53:42.004438010 -0300 @@ -1,4 +1,4 @@ -option('lua51', +option('lua', type: 'boolean', value: true, description: 'Enable Lua 5.1 support (requires lua-lgi)') diff -ur libpeas-1.30.0/peas-demo/plugins/meson.build libpeas-1.30.0.new/peas-demo/plugins/meson.build --- libpeas-1.30.0/peas-demo/plugins/meson.build 2021-03-19 21:24:38.796421800 -0300 +++ libpeas-1.30.0.new/peas-demo/plugins/meson.build 2021-07-01 17:04:28.632481421 -0300 @@ -1,6 +1,6 @@ subdir('helloworld') -if build_lua51_loader == true +if build_lua_loader == true subdir('luahello') endif diff -ur libpeas-1.30.0/tests/libpeas/meson.build libpeas-1.30.0.new/tests/libpeas/meson.build --- libpeas-1.30.0/tests/libpeas/meson.build 2021-03-19 21:24:38.805421600 -0300 +++ libpeas-1.30.0.new/tests/libpeas/meson.build 2021-07-01 17:05:39.608486186 -0300 @@ -8,8 +8,8 @@ libpeas_tests_c_args = ['-UG_DISABLE_ASSERT', '-UG_DISABLE_CAST_CHECKS'] -if build_lua51_loader == true - libpeas_tests_sources += [['extension-lua', [lua51_dep, luajit_dep]]] +if build_lua_loader == true + libpeas_tests_sources += [['extension-lua', [lua_dep, luajit_dep]]] endif if build_python3_loader == true diff -ur libpeas-1.30.0/tests/libpeas/plugins/meson.build libpeas-1.30.0.new/tests/libpeas/plugins/meson.build --- libpeas-1.30.0/tests/libpeas/plugins/meson.build 2021-03-19 21:24:38.806421800 -0300 +++ libpeas-1.30.0.new/tests/libpeas/plugins/meson.build 2021-07-01 17:09:15.934500709 -0300 @@ -24,7 +24,7 @@ subdir('embedded') subdir('extension-c') -if build_lua51_loader == true +if build_lua_loader == true subdir('extension-lua') endif