summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2019-11-12 01:34:30 -0500
committerAllan McRae <allan@archlinux.org>2019-11-26 10:49:57 +1000
commit49a8e90bc78c17600eb4903ba00be26341df9161 (patch)
tree355273950891ab3af5fac440aa3a7efa38299cae /meson.build
parent349c22d043290ccd0cce9f30981f5415e295442a (diff)
downloadpacman-49a8e90bc78c17600eb4903ba00be26341df9161.tar.gz
pacman-49a8e90bc78c17600eb4903ba00be26341df9161.zip
meson: make non-symlink scripts install for real, and use a better wrapper
We now generate the scripts using their real name, install them using meson's builtin facility instead of an install_script, and generate the wrapper scripts in the root of the build directory, instead of a subdirectory. This gets us closer to resolving FS#64394. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build16
1 files changed, 15 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 2c9185a6..572526b2 100644
--- a/meson.build
+++ b/meson.build
@@ -32,7 +32,6 @@ SED = find_program('sed')
DU = find_program('du')
LDCONFIG = get_option('ldconfig')
MESON_MAKE_SYMLINK = join_paths(meson.source_root(), 'build-aux/meson-make-symlink.sh')
-MESON_INSTALL_SCRIPT = join_paths(meson.source_root(), 'build-aux/meson-install-script.sh')
BASH = find_program('bash4', 'bash')
if BASH.found()
@@ -366,6 +365,21 @@ executable(
install : true,
)
+foreach wrapper : script_wrappers
+ cdata = configuration_data()
+ cdata.set_quoted('BASH', BASH.path())
+ cdata.set_quoted('BUILDDIR', wrapper[2])
+ cdata.set_quoted('REAL_PROGPATH', wrapper[1].full_path())
+
+ # Create a wrapper script that bootstraps the real script within the build
+ # 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'),
+ output : wrapper[0],
+ configuration : cdata)
+endforeach
+
configure_file(
input : 'etc/makepkg.conf.in',
output : 'makepkg.conf',