Source: cjk
Version: 4.8.4+git20170127-1
Tags: patch
User: [email protected]
Usertags: rebootstrap

cjk fails to cross build from source, because it generally uses build
architecture tools. It fails to pass --host to ./configure and it fails
to use cross compilers with make.

The debian packaging patches the Makefile to call ./configure there and
that makes cross building hard, because the parameter for --host is
unknown there. Thus my attached patch moves the relevant build
instructions into debian/rules and indirects them through
dh_auto_configure and dh_auto_build to let debhelper pass the cross
toolchains. After doing so, cjk cross builds. Please consider applying
the attached patch or a variant of it that ensures --host is passed to
./configure and CC is passed to make.

Helmut
diff --minimal -Nru cjk-4.8.4+git20170127/debian/changelog 
cjk-4.8.4+git20170127/debian/changelog
--- cjk-4.8.4+git20170127/debian/changelog      2017-09-15 13:37:31.000000000 
+0200
+++ cjk-4.8.4+git20170127/debian/changelog      2017-09-16 09:26:35.000000000 
+0200
@@ -1,3 +1,12 @@
+cjk (4.8.4+git20170127-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Remove manual patching and unpatching in a 3.0 (quilt) package.
+    + Let dh_auto_configure and dh_auto_build pass cross flags.
+
+ -- Helmut Grohne <[email protected]>  Sat, 16 Sep 2017 09:26:35 +0200
+
 cjk (4.8.4+git20170127-1) unstable; urgency=low
 
   [ Danai SAE-HAN (韓達耐) ]
diff --minimal -Nru cjk-4.8.4+git20170127/debian/rules 
cjk-4.8.4+git20170127/debian/rules
--- cjk-4.8.4+git20170127/debian/rules  2017-09-12 01:21:44.000000000 +0200
+++ cjk-4.8.4+git20170127/debian/rules  2017-09-16 09:26:35.000000000 +0200
@@ -11,7 +11,7 @@
 
 SHELL = /bin/sh
 
-include /usr/share/quilt/quilt.make
+include /usr/share/dpkg/buildflags.mk
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -44,7 +44,12 @@
        dh_update_autotools_config
 
        # Add here commands to compile the package.
-       $(MAKE)
+       CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
+              dh_auto_configure --sourcedirectory=utils/hbf2gf -- \
+               --with-kpathsea-lib=/usr/lib \
+               --with-kpathsea-include=/usr/include
+       dh_auto_build --sourcedirectory=utils/hbf2gf
+       dh_auto_build
 
        touch build-arch-stamp
 
@@ -78,7 +83,7 @@
 build-stamp:
        touch build-stamp
 
-clean: unpatch
+clean:
 #      dh_testdir doc/CJKutf8.txt examples/CJKbabel.tex
        dh_testroot
        rm -f build-stamp build-indep-stamp build-arch-stamp

Reply via email to