]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
pkg-config-native: pick additional search paths from $EXTRA_NATIVE_PKGCONFIG_PATH
authorAlexander Kanavin <alex@linutronix.de>
Wed, 4 Dec 2024 06:48:51 +0000 (07:48 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 5 Dec 2024 17:00:53 +0000 (17:00 +0000)
This was prompted by working on librsvg update: the new meson-driven
version wants to query values from .pc files residing in its own
build directory, and modifies PKG_CONFIG_PATH accordingly.

When using the pkg-config-native wrapper such modifications
have no effect, and we have to pass them in manually
from the recipe via EXTRA_NATIVE_PKGCONFIG_PATH variable.

This variable is already defined (with an empty value) and
appended to PKG_CONFIG_PATH export in the native class, so this
simply extends its use to the wrapper.

(Appending to PKG_CONFIG_PATH in the wrapper, instead of resetting it,
is not an option as that can lead to contamination with the cross values).

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/pkgconf/pkgconf/pkg-config-native.in
meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in

index 9ed30a0d800a4eb827feea82993a53e37114361a..fd5ab6b1fabfd1942b33cf3b3c50122eed5c7890 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-PKG_CONFIG_PATH="@PATH_NATIVE@"
+PKG_CONFIG_PATH="$EXTRA_NATIVE_PKGCONFIG_PATH@PATH_NATIVE@"
 unset PKG_CONFIG_SYSROOT_DIR
 
 pkg-config "$@"
index a9324de4cf3ca1947c176348962af4a8fc8ec539..d4bb4f8c06f8af3f3360b3f731db26f5b04248bc 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-export PKG_CONFIG_PATH="@PATH_NATIVE@"
+export PKG_CONFIG_PATH="$EXTRA_NATIVE_PKGCONFIG_PATH@PATH_NATIVE@"
 export PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
 unset PKG_CONFIG_SYSROOT_DIR