Source: dvi2ps
Version: 5.1j-1.2
Tags: patch
User: [email protected]
Usertags: rebootstrap

dvi2ps fails to cross build from source. The first issue is that it
configures for the build architecture. Letting dh_auto_configure pass
--host fixes this part. Then debian/Makefile.tools uses the build
architecture compiler. Letting dh_auto_build pass cross tools fixes that
part. Then debian/rules uses install -s to install, which uses the build
architecture strip. Dropping the -s flag fixes that as dh_strip will
take care of stripping. Dropping the -s flag also partially fixes
#436778. The attached patch implements all of that and makes dvi2ps
cross buildable. Please consider applying it.

Helmut
diff --minimal -Nru dvi2ps-5.1j/debian/changelog dvi2ps-5.1j/debian/changelog
--- dvi2ps-5.1j/debian/changelog        2014-10-14 23:40:23.000000000 +0200
+++ dvi2ps-5.1j/debian/changelog        2018-06-16 21:44:31.000000000 +0200
@@ -1,3 +1,13 @@
+dvi2ps (5.1j-1.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_configure pass --host to ./configure.
+    + Let dh_auto_build pass cross tools to debian/Makefile.tools.
+    + Do not strip at install time.
+
+ -- Helmut Grohne <[email protected]>  Sat, 16 Jun 2018 21:44:31 +0200
+
 dvi2ps (5.1j-1.2) unstable; urgency=medium
 
   * NMU
diff --minimal -Nru dvi2ps-5.1j/debian/control dvi2ps-5.1j/debian/control
--- dvi2ps-5.1j/debian/control  2014-10-14 23:40:23.000000000 +0200
+++ dvi2ps-5.1j/debian/control  2018-06-16 21:44:28.000000000 +0200
@@ -2,7 +2,7 @@
 Section: tex
 Priority: optional
 Maintainer: OHURA Makoto <[email protected]>
-Build-Depends: debhelper (>= 5.0.0), nkf, libkpathsea-dev, vflib3-dev, 
libfreetype6-dev, autotools-dev
+Build-Depends: debhelper (>= 7), nkf, libkpathsea-dev, vflib3-dev, 
libfreetype6-dev, autotools-dev
 Standards-Version: 3.8.4
 
 Package: dvi2ps
diff --minimal -Nru dvi2ps-5.1j/debian/rules dvi2ps-5.1j/debian/rules
--- dvi2ps-5.1j/debian/rules    2014-10-14 23:40:23.000000000 +0200
+++ dvi2ps-5.1j/debian/rules    2018-06-16 21:44:31.000000000 +0200
@@ -28,7 +28,7 @@
        dh_testdir
        dh_autotools-dev_updateconfig
        # Add here commands to configure the package.
-       ./configure --prefix=/usr --with-dvi2pslib=/usr/lib/dvi2ps
+       dh_auto_configure -- --with-dvi2pslib=/usr/lib/dvi2ps
 
        touch configure-stamp
 
@@ -45,7 +45,7 @@
        $(MAKE) PREFIX=/usr MFMODE=ljfour \
                CCFLAGS='-g -O -DPOSIX -DSYSV -DANSI -Wall'
        $(MAKE) lprdvi newlib CCFLAGS='-g -O -DPOSIX -DSYSV -DANSI -Wall'
-       (cd tools ; $(MAKE) -f ../debian/Makefile.tools)
+       dh_auto_build --buildsystem=makefile --sourcedirectory=tools -- -f 
../debian/Makefile.tools
 
        find lib -type d -name 'CVS' |xargs rm -rf
        touch build-stamp
@@ -78,8 +78,8 @@
 #      make install-lprdvi DESTDIR=debian/dvi2ps
        install -m 755 lprdvi debian/dvi2ps/usr/bin
        install -m 644 tools/lprdvi.conf debian/dvi2ps/etc/texmf/dvi2ps
-       install -c -s -m 755 tools/nup debian/dvi2ps/usr/bin
-       install -c -s -m 755 tools/texfix debian/dvi2ps/usr/bin/texfix
+       install -c -m 755 tools/nup debian/dvi2ps/usr/bin
+       install -c -m 755 tools/texfix debian/dvi2ps/usr/bin/texfix
        #-install -m 644 lib/PS600J \
        #               debian/dvi2ps/etc/texmf/dvi2ps/fontdesc
        install -m 644 debian/fontdesc $(ETCD)/fontdesc

Reply via email to