summaryrefslogtreecommitdiff
path: root/meson_post_install.py
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-06-27 15:14:18 +0100
committerSimon McVittie <smcv@collabora.com>2022-07-13 20:36:13 +0100
commitabef7950816d423b3b65fcf36bfa0cf0e36c4ebf (patch)
treeb44ced91438aa7df4f8ac21604a9303aff3dea15 /meson_post_install.py
parent47deeb4a9e0cf3f00770c5244596c9ae6ad4fe2b (diff)
downloaddbus-abef7950816d423b3b65fcf36bfa0cf0e36c4ebf.tar.gz
build: Don't replace prefix in .pc file if relocation is disabled
Replacing the prefix with a path relative to ${pcfiledir} can be harmful if the number of path components between the prefix and the ${libdir} is not what we expect, in particular on Debian-derived systems where the ${libdir} is normally lib/x86_64-linux-gnu or similar. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'meson_post_install.py')
-rwxr-xr-xmeson_post_install.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meson_post_install.py b/meson_post_install.py
index 78133103..22f0539a 100755
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -80,6 +80,9 @@ def post_install_relocation():
#
# TODO: Meson >=0.63 has a new feature, -Dpkgconfig.relocatable=true.
+ if not relocation:
+ return
+
pc_filepath = next(
v for (k,v) in introspection['installed'].items() if k.endswith('.pc')
)