From: Quentin Glidic <sardemff7+...@sardemff7.net>

If libdir is an absolute path (which means it’s outside of prefix) we
would wrongly add the prefix to it in the install script. Just pass the
correct libdir from Meson directly thanks to join_paths() magic.

Signed-off-by: Quentin Glidic <sardemff7+...@sardemff7.net>
---
Just found this one while doing patch 2, I didn’t actually test it.

 meson.build                             | 2 +-
 src/libinput-restore-selinux-context.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 9b0fa246..6c5b9a84 100644
--- a/meson.build
+++ b/meson.build
@@ -225,7 +225,7 @@ pkgconfig.generate(
 # Restore the SELinux context for the libinput.so.a.b.c on install
 # meson bug https://github.com/mesonbuild/meson/issues/1967
 meson.add_install_script('src/libinput-restore-selinux-context.sh',
-                        get_option('libdir'),
+                        join_paths(get_option('prefix'), get_option('libdir')),
                         lib_libinput.full_path())
 
 ############ documentation ############
diff --git a/src/libinput-restore-selinux-context.sh 
b/src/libinput-restore-selinux-context.sh
index 3b1c555b..606b5b08 100644
--- a/src/libinput-restore-selinux-context.sh
+++ b/src/libinput-restore-selinux-context.sh
@@ -7,6 +7,6 @@ libdir="$1"
 sofile=$(basename "$2")
 
 if command -v restorecon >/dev/null; then
-       echo "Restoring SELinux context on 
$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
-       restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
+       echo "Restoring SELinux context on ${DESTDIR}${libdir}/${sofile}"
+       restorecon "${DESTDIR}${libdir}/${sofile}"
 fi
-- 
2.15.0

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to