From: Simon McVittie Date: Mon, 27 Jun 2022 14:14:18 +0000 (+0100) Subject: build: Don't replace prefix in .pc file if relocation is disabled X-Git-Tag: dbus-1.15.0~32^2~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abef7950816d423b3b65fcf36bfa0cf0e36c4ebf;p=thirdparty%2Fdbus.git 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 --- diff --git a/meson_post_install.py b/meson_post_install.py index 78133103a..22f0539ac 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') )