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>
#
# 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')
)