wpa_supplicant: adjust make environment for pkg-config call
PATCH 1/1 wpa_supplicant: adjust make environment for pkg-config call
In case that wpa_supplicant is configured with DBus interface, it calls pkg-config to find the dbus headers and libraries. Adjust the make environment so that it will use the right pkg-config search paths.
--- package/wpa_supplicant/wpa_supplicant.mk | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
package/wpa_supplicant/wpa_supplicant.mk +4 -1
@@ -19,7 +19,10 @@ ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_OPENSSL),y) WPA_SUPPLICANT_DEPENDENCIES += openssl endif ifeq ($(BR2_PACKAGE_DBUS),y) - WPA_SUPPLICANT_DEPENDENCIES += dbus + WPA_SUPPLICANT_DEPENDENCIES += host-pkgconfig dbus + WPA_SUPPLICANT_MAKE_ENV = \ + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" endif $(eval $(call AUTOTARGETS,package,wpa_supplicant))
Signature · 1 line
1.6.0.4
PATCH 1/1 wpa_supplicant: adjust make environment for pkg-config call
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Hi,
Sven> In case that wpa_supplicant is configured with DBus interface, Sven> it calls pkg-config to find the dbus headers and libraries. Sven> Adjust the make environment so that it will use the right Sven> pkg-config search paths.
Sven> ifeq ($(BR2_PACKAGE_DBUS),y)
Sven> - WPA_SUPPLICANT_DEPENDENCIES += dbus
Sven> + WPA_SUPPLICANT_DEPENDENCIES += host-pkgconfig dbus
Sven> + WPA_SUPPLICANT_MAKE_ENV = \
Sven> + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
Sven> + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
Won't this pick up /usr/bin/pkg-config instead of the one in HOST_DIR? I would prefer to simply use TARGET_CONFIGURE_OPTS here so the path gets set and we only have the pkgconfig magic one place.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 wpa_supplicant: adjust make environment for pkg-config call
Quoted 16 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Hi,
Sven> In case that
wpa_supplicantis configured with DBus interface, Sven> it calls pkg-config to find the dbus headers and libraries. Sven> Adjust the make environment so that it will use the right Sven> pkg-config search paths.Sven> ifeq ($(BR2_PACKAGE_DBUS),y)
Sven> -WPA_SUPPLICANT_DEPENDENCIES+= dbus
Sven> +WPA_SUPPLICANT_DEPENDENCIES+= host-pkgconfig dbus
Sven> +WPA_SUPPLICANT_MAKE_ENV= \
Sven> + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
Sven> + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
Quoted 3 lines
Won't this pick up
/usr/bin/pkg-configinstead of the one inHOST_DIR? I would prefer to simply useTARGET_CONFIGURE_OPTShere so the path gets set and we only have the pkgconfig magic one place.
The PATH is already set. Here's the relevant line from our log (with this change applied):
PATH="/tmp/build/build/toolchain_build_arm/bin:/tmp/build/build/build_arm/host_dir/bin:/tmp/build/build/build_arm/host_dir/usr/bin:/tmp/build/build/build_arm/staging_dir/bin:/tmp/build/build/build_arm/staging_dir/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/games" PKG_CONFIG_SYSROOT_DIR="/tmp/build/build/build_arm/staging_dir" PKG_CONFIG_PATH="/tmp/build/build/build_arm/staging_dir/usr/lib/pkgconfig" /usr/bin/make -j4 -C /tmp/build/build/build_arm/wpa_supplicant-0.6.9/wpa_supplicant
But if you can come up with a cleaner solution, then please go ahead and commit it instead of my patch.
Sven
PATCH 1/1 wpa_supplicant: adjust make environment for pkg-config call
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Hi,
Quoted 3 lines
Quoted 3 lines
Won't this pick up
/usr/bin/pkg-configinstead of the one inHOST_DIR? I would prefer to simply useTARGET_CONFIGURE_OPTShere so the path gets set and we only have the pkgconfig magic one place.
Sven> The PATH is already set. Here's the relevant line from our log (with Sven> this change applied):
Sven> PATH="/tmp/build/build/toolchain_build_arm/bin:/tmp/build/build/build_arm/host_dir/bin:/tmp/build/build/build_arm/host_dir/usr/bin:/tmp/build/build/build_arm/staging_dir/bin:/tmp/build/build/build_arm/staging_dir/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/games" PKG_CONFIG_SYSROOT_DIR="/tmp/build/build/build_arm/staging_dir" PKG_CONFIG_PATH="/tmp/build/build/build_arm/staging_dir/usr/lib/pkgconfig" /usr/bin/make -j4 -C /tmp/build/build/build_arm/wpa_supplicant-0.6.9/wpa_supplicant
Ahh yes, Makefile.autotools.in has:
PATH=$(TARGET_PATH) $($(PKG)_MAKE_ENV) $($(PKG)_MAKE) $($(PKG)_MAKE_OPT) -C $(@D)/$($(PKG)_SUBDIR)
Sven> But if you can come up with a cleaner solution, then please go ahead and Sven> commit it instead of my patch.
No - With that out of the way, then I think your patch is fine.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 wpa_supplicant: adjust make environment for pkg-config call
In reply to Sven NeumannQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Sven> In case that wpa_supplicant is configured with DBus interface, Sven> it calls pkg-config to find the dbus headers and libraries. Sven> Adjust the make environment so that it will use the right Sven> pkg-config search paths.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard