]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/pkgconfig: move assignments
authorRoss Burton <ross.burton@arm.com>
Thu, 26 Feb 2026 13:45:00 +0000 (13:45 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Mar 2026 17:36:54 +0000 (17:36 +0000)
Move the pkg-config-specific assignments (PKG_CONFIG_LIBDIR, etc) out of
bitbake.conf and into pkgconfig.bbclass.

Note that the assignments now have to be ?= so that recipes such as
gdb-cross-canadian-* can build. This is because previously the assignment
order of PKG_CONFIG_PATH was:

1) bitbake.conf
2) cross-canadian.bbclass

But with this new layout it is:

1) cross-canadian.bbclass
2) pkgconfig.bbclass

If pkgconfig does a hard assign then it replaces any assignments that
have happened already.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/pkgconfig.bbclass
meta/conf/bitbake.conf

index ea91338d345440daab2bcd8d970258ff3eed946b..98b6342013594f178d9120fa5b6aeb16435ed2be 100644 (file)
@@ -6,10 +6,10 @@
 
 DEPENDS:prepend = "pkgconfig-native "
 
-export PKG_CONFIG_DIR
-export PKG_CONFIG_PATH
-export PKG_CONFIG_LIBDIR
-export PKG_CONFIG_SYSROOT_DIR
-export PKG_CONFIG_DISABLE_UNINSTALLED
-export PKG_CONFIG_SYSTEM_LIBRARY_PATH
-export PKG_CONFIG_SYSTEM_INCLUDE_PATH
+export PKG_CONFIG_DIR ?= "${STAGING_DIR_HOST}${libdir}/pkgconfig"
+export PKG_CONFIG_PATH ?= "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig"
+export PKG_CONFIG_LIBDIR ?= "${PKG_CONFIG_DIR}"
+export PKG_CONFIG_SYSROOT_DIR ?= "${STAGING_DIR_HOST}"
+export PKG_CONFIG_DISABLE_UNINSTALLED ?= "yes"
+export PKG_CONFIG_SYSTEM_LIBRARY_PATH ?= "${base_libdir}:${libdir}"
+export PKG_CONFIG_SYSTEM_INCLUDE_PATH ?= "${includedir}"
index b26709d16503db3957b813ae8917995ccaa01c9b..f21e8f8918b3814d4e92a3b0ba7f177accaffbce 100644 (file)
@@ -768,14 +768,6 @@ BUILDCFG_NEEDEDVARS[type] = "list"
 
 # Other
 
-PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
-PKG_CONFIG_PATH = "${PKG_CONFIG_DIR}:${STAGING_DATADIR}/pkgconfig"
-PKG_CONFIG_LIBDIR = "${PKG_CONFIG_DIR}"
-PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
-PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
-PKG_CONFIG_SYSTEM_LIBRARY_PATH = "${base_libdir}:${libdir}"
-PKG_CONFIG_SYSTEM_INCLUDE_PATH = "${includedir}"
-
 # Don't allow git to chdir up past WORKDIR or TMPDIR so that it doesn't detect the OE
 # repository when building a recipe.
 export GIT_CEILING_DIRECTORIES = "${WORKDIR}:${TMPDIR}"