[pkg-wpa-devel] Bug#836074: wpa FTCBFS: uses build architecture pkg-config

Helmut Grohne helmut at subdivi.de
Tue Aug 30 12:47:51 UTC 2016


Source: wpa
Version: 2.5-2+v2.4-2
User: helmutg at debian.org
Usertags: rebootstrap

wpa fails to cross build from source. The first cause is that it uses
the build architecture pkg-config. Using the triplet prefixed tool
alleviates that problem, which is what the attached patch does.

It then uses the build architecture compiler for building
wpa_supplicant/wpa_gui-qt4. I don't have sufficient knowledge on qmake
to fix this now, so I do not address this problem in my patch.
Furthermore, I think that it should be fixed in debhelper's qmake
buildsystem instead of wpa itself.

Can you apply the patch even though it doesn't fix the build? That'd
simplify figuring out how to make qmake work for cross building
(exporting QMAKE_CC doesn't do the trick).

Note that I slightly changed the method for setting CC, such that clang
based native builds also work.

Helmut
-------------- next part --------------
diff --minimal -Nru wpa-2.5-2+v2.4/debian/changelog wpa-2.5-2+v2.4/debian/changelog
--- wpa-2.5-2+v2.4/debian/changelog	2016-08-09 20:12:11.000000000 +0200
+++ wpa-2.5-2+v2.4/debian/changelog	2016-08-30 14:37:10.000000000 +0200
@@ -1,3 +1,10 @@
+wpa (2.5-2+v2.4-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Address FTCBFS: Set PKG_CONFIG.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Tue, 30 Aug 2016 14:19:27 +0200
+
 wpa (2.5-2+v2.4-2) unstable; urgency=medium
 
   * Apply patches from upstream to unbreak dedicated P2P Device support
diff --minimal -Nru wpa-2.5-2+v2.4/debian/patches/01_use_pkg-config_for_pcsc-lite_module.patch wpa-2.5-2+v2.4/debian/patches/01_use_pkg-config_for_pcsc-lite_module.patch
--- wpa-2.5-2+v2.4/debian/patches/01_use_pkg-config_for_pcsc-lite_module.patch	2016-08-09 19:50:18.000000000 +0200
+++ wpa-2.5-2+v2.4/debian/patches/01_use_pkg-config_for_pcsc-lite_module.patch	2016-08-30 14:23:15.000000000 +0200
@@ -10,7 +10,7 @@
  #LIBS += -lwinscard
  else
 -LIBS += -lpcsclite -lpthread
-+LIBS += $(shell pkg-config --libs libpcsclite)
++LIBS += $(shell $(PKG_CONFIG) --libs libpcsclite)
  endif
  endif
  
diff --minimal -Nru wpa-2.5-2+v2.4/debian/rules wpa-2.5-2+v2.4/debian/rules
--- wpa-2.5-2+v2.4/debian/rules	2016-07-28 20:42:47.000000000 +0200
+++ wpa-2.5-2+v2.4/debian/rules	2016-08-30 14:36:38.000000000 +0200
@@ -15,13 +15,13 @@
 BINDIR    = /sbin
 V = 1
 
-DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE  := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+ifeq ($(origin CC),default)
 	CC=$(DEB_HOST_GNU_TYPE)-gcc
 endif
+PKG_CONFIG ?= $(DEB_HOST_GNU_TYPE)-pkg-config
 
-export CC BINDIR V
+export CC BINDIR V PKG_CONFIG
 
 DEB_HOST_ARCH_OS              ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 HOSTAPD_DOT_CONFIG            := debian/config/hostapd/$(DEB_HOST_ARCH_OS)


More information about the Pkg-wpa-devel mailing list