[pacman-dev] [PATCH] meson: make -uninstalled.pc correct

Eli Schwartz eschwartz at archlinux.org
Mon Apr 19 03:25:13 UTC 2021


This pkg-config file is automatically created in the meson-uninstalled/
directory of the build tree, and points to the built artifacts there. If
this directory is added to PKG_CONFIG_PATH, it will be preferred over an
installed copy.

Making this work properly means it becomes trivially possible to build a
private copy of libalpm, and then compile other projects using it rather
than the system copy.

Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---

I've been using this in combination with some custom patches to pyalpm
(to actually use pkg-config), to generate statically linked pyalpm
wheels that don't break every time the pacman-git ABI breaks.

 meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meson.build b/meson.build
index 579ff2ed8..7b833571f 100644
--- a/meson.build
+++ b/meson.build
@@ -319,6 +319,7 @@ libalpm = library(
   'alpm',
   version : libalpm_version,
   objects: libalpm_a.extract_all_objects(recursive: true),
+  include_directories : includes,
   dependencies : alpm_deps,
   install : true)
 
-- 
2.31.1


More information about the pacman-dev mailing list