From fcb3c4108212daba34455502a543559fe5056381 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 28 Dec 2021 17:16:42 -0500 Subject: [PATCH 1/2] meson: lower the minimum buildsystem requirements No features of 0.54 are being used, so 0.50 should be perfectly fine. This drops the minimum requirement down to a version available in the latest Ubuntu LTS (20.04), which only has 0.53 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 87544c7f..e1244ac1 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project('lite-xl', ['c'], version : '2.0.3', license : 'MIT', - meson_version : '>= 0.54', + meson_version : '>= 0.50', default_options : ['c_std=gnu11'] ) From 7a961c8c8e10e8b7accbe0dfed48afa8f1f30e8f Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 28 Dec 2021 17:20:23 -0500 Subject: [PATCH 2/2] meson: lower the minimum buildsystem requirements even more Only a couple trivial features from meson ~0.50 were being used, and none of them are really needed: - configure_file() with the install kwarg has always defaulted to inferring its value from whether an install_dir was defined. This is fine, we don't need to set `install: true` in that case. The kwarg was only even added to meson 0.50 for consistency and to allow conditionally overriding the file to not install, even when install_dir is set. This project does not need that feature. - path building could historically be done with the join_paths() function. Recent versions of meson (0.49) added cosmetic sugar in the form of string operator overloading to allow using the division operator on two strings. By removing this and using the backwards compatible form, we can support older versions of meson. - sdl2 dependency lookup with hardcoded config-tool method is very opinionated about the correct way to look up sdl2, but meson can try multiple methods if you permit it, and there is no reason to think that config-tool is the only one that returns correct results. By removing these features, the minimum can be dropped all the way down to a version that is available on the oldest supported versions of Ubuntu (18.04), Debian (oldoldstable / Stretch) and anywhere else of consequence. --- meson.build | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index e1244ac1..44be29da 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project('lite-xl', ['c'], version : '2.0.3', license : 'MIT', - meson_version : '>= 0.50', + meson_version : '>= 0.42', default_options : ['c_std=gnu11'] ) @@ -52,7 +52,7 @@ if not get_option('source-only') ) pcre2_dep = dependency('libpcre2-8') freetype_dep = dependency('freetype2') - sdl_dep = dependency('sdl2', method: 'config-tool') + sdl_dep = dependency('sdl2') lite_deps = [lua_dep, sdl_dep, freetype_dep, pcre2_dep, libm, libdl, threads_dep] endif #=============================================================================== @@ -94,17 +94,16 @@ endif install_data('licenses/licenses.md', install_dir : lite_docdir) -install_subdir('data' / 'core' , install_dir : lite_datadir, exclude_files : 'start.lua') +install_subdir('data/core' , install_dir : lite_datadir, exclude_files : 'start.lua') foreach data_module : ['fonts', 'plugins', 'colors'] - install_subdir('data' / data_module , install_dir : lite_datadir) + install_subdir(join_paths('data', data_module), install_dir : lite_datadir) endforeach configure_file( input : 'data/core/start.lua', output : 'start.lua', configuration : conf_data, - install : true, - install_dir : lite_datadir / 'core', + install_dir : join_paths(lite_datadir, 'core'), ) if not get_option('source-only')