Source: w3m
Version: 0.5.3-26
User: heml...@debian.org
Usertags: rebootstrap

Hi,

w3m fails to cross build from source for a number of reasons. Most
immediately, configure is run without --host and thus configures for the
build architecture. Even though configure has code for detecting the
name of pkg-config, it still falls back to calling it directly causing
it to miss libraries such as imlib2. I am attaching a patch for these
issues. Even after applying it, the build fails due to executing
./mknames. Since mknames is executed during build and not installed into
any package, it should be compiled with the build architecture compiler.
For this to work, it needs to stop #including things such as config.h
however. Also object files such as Str.o need to be built for both
architectures. I haven't figured out the details yet, so my patch is
only a partial solution. Hope it helps whomever is looking into cross
compiling w3m at a later time.

Helmut
diff --minimal -Nru w3m-0.5.3/debian/changelog w3m-0.5.3/debian/changelog
--- w3m-0.5.3/debian/changelog  2015-12-01 16:36:41.000000000 +0100
+++ w3m-0.5.3/debian/changelog  2016-01-25 21:14:20.000000000 +0100
@@ -1,3 +1,12 @@
+w3m (0.5.3-26.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Partially fix FTCBFS (addresses: #-1)
+    + Pass --host to configure
+    + export PKG_CONFIG
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 25 Jan 2016 20:57:02 +0100
+
 w3m (0.5.3-26) unstable; urgency=medium
 
   * Update 020_debian.patch to v0.5.3+git20151119
diff --minimal -Nru w3m-0.5.3/debian/rules w3m-0.5.3/debian/rules
--- w3m-0.5.3/debian/rules      2015-11-22 19:08:46.000000000 +0100
+++ w3m-0.5.3/debian/rules      2016-01-25 21:15:24.000000000 +0100
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
+
 #export DH_VERBOSE=1
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
@@ -28,6 +30,11 @@
        --enable-image=$(DEVS) \
        --enable-m17n --enable-unicode --enable-nls
 
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+confargs += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+export PKG_CONFIG=$(DEB_HOST_GNU_TYPE)-pkg-config
+endif
+
 builddir := .
 
 build-indep:

Reply via email to