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 <[email protected]>
---
 meta/classes-recipe/pkgconfig.bbclass | 14 +++++++-------
 meta/conf/bitbake.conf                |  8 --------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/meta/classes-recipe/pkgconfig.bbclass 
b/meta/classes-recipe/pkgconfig.bbclass
index ea91338d345..98b63420135 100644
--- a/meta/classes-recipe/pkgconfig.bbclass
+++ b/meta/classes-recipe/pkgconfig.bbclass
@@ -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}"
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index aa6b5bbf9a0..194fa5246d2 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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}"
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#232025): 
https://lists.openembedded.org/g/openembedded-core/message/232025
Mute This Topic: https://lists.openembedded.org/mt/118011871/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to