From abef7950816d423b3b65fcf36bfa0cf0e36c4ebf Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 27 Jun 2022 15:14:18 +0100 Subject: [PATCH] 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 --- meson_post_install.py | 3 +++ 1 file changed, 3 insertions(+) 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') ) -- 2.47.3