]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
build: Don't replace prefix in .pc file if relocation is disabled
authorSimon McVittie <smcv@collabora.com>
Mon, 27 Jun 2022 14:14:18 +0000 (15:14 +0100)
committerSimon McVittie <smcv@collabora.com>
Wed, 13 Jul 2022 19:36:13 +0000 (20:36 +0100)
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>
meson_post_install.py

index 78133103a917ec1afc2e09f18f3ef7b8093eb10e..22f0539acafca4d0121dccc592c336e8db3a858c 100755 (executable)
@@ -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')
     )