aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2022-03-06 16:06:39 +1000
committerAllan McRae <allan@archlinux.org>2022-03-06 16:26:34 +1000
commitc89f42f17b60e24d978664673eb135e352279e89 (patch)
treeea20640eecb8cdf3af3c9d1e6a64ad99293075ff
parent3a39eff15e23b8c718b4d8edcc4d8f281775e180 (diff)
meson: do not use meson.source_root() and meson.build_root()
Using meson.source_root() and meson.build_root() are deprectated in meson-0.56. Using current_source_dir() or current_build_dir() (which have been available in all Meson versions) would require manually adding "../" in some places. Instead, use project_source_root() and project_build_root() and require meson-0.56. Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--meson.build14
-rw-r--r--scripts/meson.build2
-rw-r--r--test/pacman/meson.build2
3 files changed, 9 insertions, 9 deletions
diff --git a/meson.build b/meson.build
index b8e64127..b7cca865 100644
--- a/meson.build
+++ b/meson.build
@@ -8,7 +8,7 @@ project('pacman',
'sysconfdir=/etc',
'localstatedir=/var',
],
- meson_version : '>= 0.55')
+ meson_version : '>= 0.56')
libalpm_version = '13.0.1'
@@ -29,7 +29,7 @@ PKGDATADIR = join_paths(PREFIX, DATAROOTDIR, meson.project_name())
PYTHON = import('python').find_installation('python3')
LDCONFIG = get_option('ldconfig')
-MESON_MAKE_SYMLINK = join_paths(meson.source_root(), 'build-aux/meson-make-symlink.sh')
+MESON_MAKE_SYMLINK = join_paths(meson.project_source_root(), 'build-aux/meson-make-symlink.sh')
BASH = find_program('bash4', 'bash')
if BASH.found()
@@ -382,7 +382,7 @@ foreach wrapper : script_wrappers
# directory. Use configure_file instead of a custom_target to ensure that
# permissions on the input script wrapper are preserved.
configure_file(
- input : join_paths(meson.source_root(), 'build-aux', 'script-wrapper.sh.in'),
+ input : join_paths(meson.project_source_root(), 'build-aux', 'script-wrapper.sh.in'),
output : wrapper[0],
configuration : cdata)
endforeach
@@ -416,10 +416,10 @@ foreach path : [
endforeach
TEST_ENV = environment()
-TEST_ENV.set('PMTEST_SCRIPTLIB_DIR', join_paths(meson.source_root(), 'scripts/library/'))
-TEST_ENV.set('PMTEST_LIBMAKEPKG_DIR', join_paths(meson.build_root(), 'scripts/libmakepkg/'))
-TEST_ENV.set('PMTEST_UTIL_DIR', meson.build_root() + '/')
-TEST_ENV.set('PMTEST_SCRIPT_DIR', join_paths(meson.build_root(), 'scripts/'))
+TEST_ENV.set('PMTEST_SCRIPTLIB_DIR', join_paths(meson.project_source_root(), 'scripts/library/'))
+TEST_ENV.set('PMTEST_LIBMAKEPKG_DIR', join_paths(meson.project_build_root(), 'scripts/libmakepkg/'))
+TEST_ENV.set('PMTEST_UTIL_DIR', meson.project_build_root() + '/')
+TEST_ENV.set('PMTEST_SCRIPT_DIR', join_paths(meson.project_build_root(), 'scripts/'))
subdir('test/pacman')
subdir('test/scripts')
diff --git a/scripts/meson.build b/scripts/meson.build
index d2466523..e5b9ff4a 100644
--- a/scripts/meson.build
+++ b/scripts/meson.build
@@ -10,7 +10,7 @@ scripts = [
]
SCRIPT_EDITOR = find_program(configure_file(
- input : join_paths(meson.source_root(), 'build-aux/edit-script.sh.in'),
+ input : join_paths(meson.project_source_root(), 'build-aux/edit-script.sh.in'),
output : 'edit-script.sh',
configuration : substs))
diff --git a/test/pacman/meson.build b/test/pacman/meson.build
index ecab75b2..7ebdd98e 100644
--- a/test/pacman/meson.build
+++ b/test/pacman/meson.build
@@ -354,7 +354,7 @@ foreach input : pacman_tests
args = [
join_paths(meson.current_source_dir(), 'pactest.py'),
'--scriptlet-shell', get_option('scriptlet-shell'),
- '--bindir', meson.build_root(),
+ '--bindir', meson.project_build_root(),
'--ldconfig', LDCONFIG,
'--verbose',
join_paths(meson.current_source_dir(), input)