Source: zygrib
Version: 8.0.1+dfsg.1-2
Tags: patch
User: [email protected]
Usertags: rebootstrap

zygrib fails to cross build from source, because it runs qmake for the
build architecture. The easiest way of running qmake in the right way is
asking dh_auto_configure to do it. In this case, it's not as trivial as
the top level Makefile is used to run qmake. The attached patch
implements it nonetheless and makes zygrib cross buildable.

I note that both debian/rules and Makefile contain policy 4.6 violations
by chaining commands with ";". Doing so is considered a serious bug. My
patch just fixes the most relevant ones as well.

Helmut
diff --minimal -Nru zygrib-8.0.1+dfsg.1/debian/changelog 
zygrib-8.0.1+dfsg.1/debian/changelog
--- zygrib-8.0.1+dfsg.1/debian/changelog        2018-07-28 17:05:57.000000000 
+0200
+++ zygrib-8.0.1+dfsg.1/debian/changelog        2018-08-14 05:51:29.000000000 
+0200
@@ -1,3 +1,11 @@
+zygrib (8.0.1+dfsg.1-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Let dh_auto_configure run qmake. (Closes: #-1)
+  * Fix policy 4.6 violation: Do not chaing build commands with ";"
+
+ -- Helmut Grohne <[email protected]>  Tue, 14 Aug 2018 05:51:29 +0200
+
 zygrib (8.0.1+dfsg.1-2) unstable; urgency=medium
 
   * Standards-Version: 4.1.5; no changes required
diff --minimal -Nru zygrib-8.0.1+dfsg.1/debian/rules 
zygrib-8.0.1+dfsg.1/debian/rules
--- zygrib-8.0.1+dfsg.1/debian/rules    2018-07-28 17:05:52.000000000 +0200
+++ zygrib-8.0.1+dfsg.1/debian/rules    2018-08-14 05:51:29.000000000 +0200
@@ -11,11 +11,15 @@
 
 CFLAGS += -fPIC
 
+override_dh_auto_configure:
+       dh_auto_configure --sourcedirectory=src
+
 override_dh_auto_build:
-       cd src ; qmake -o Makefile zyGrib.pro; $(MAKE) INSTALLDIR=$(INSTDIR)
+       dh_auto_build --sourcedirectory=src -- INSTALLDIR=$(INSTDIR)
        mkdir -p grib
-
        
 override_dh_auto_clean:
-       dh_auto_clean
+       rm -rf zyGrib zyGrib.app src/zyGrib src/release/zyGrib.exe
+       dh_auto_configure --sourcedirectory=src
+       dh_auto_clean --sourcedirectory=src
        rm -rf  src/objs/* src/zyGrib src/Makefile src/qwt-6.0.1 src/.qmake*

Reply via email to