This is an updated patch for an NMU for cross-build support.

The main body of the patch (which only concerns debian/rules) is
the autotools-dev recommendation for cross-build support.

The additional part is simply not to call the test targets when
cross-building and allow native builds to proceed with an assumed 'all'
target.

I propose to upload this NMU to delayed/7 in the next couple of days.

I've tested the patch with the existing Debian package with no other
changes. I've also, naturally, tested that the patched package does
cross-build.

Please let me know if you would prefer to upload this fix yourself.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

diff -u mawk-1.3.3/debian/changelog mawk-1.3.3/debian/changelog
--- mawk-1.3.3/debian/changelog
+++ mawk-1.3.3/debian/changelog
@@ -1,3 +1,11 @@
+mawk (1.3.3-14.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Implement autotools-dev recommendations for cross-build
+    support and disable test when cross-building. (Closes: #285418)
+
+ -- Neil Williams <codeh...@debian.org>  Wed, 27 May 2009 20:25:45 +0100
+
 mawk (1.3.3-14) unstable; urgency=low
 
   * Build-Conflict with byacc, as the current version doesn't appear to be
diff -u mawk-1.3.3/debian/rules mawk-1.3.3/debian/rules
--- mawk-1.3.3/debian/rules
+++ mawk-1.3.3/debian/rules
@@ -14,13 +14,21 @@
 install_script=install -m 755
 install_binary=install -m 755 -s
 
+DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CC=$(DEB_HOST_GNU_TYPE)-gcc
+# disable tests
+CROSS=mawk
+endif
+
 include /usr/share/dpatch/dpatch.make
 
 build: patch-stamp
 	$(checkdir)
 	chmod 755 configure test/mawktest test/fpe_test
 	./configure
-	$(MAKE) CC="$(CC)" CFLAGS="-g -Wall -O2" LDFLAGS="$(LDFLAGS)"
+	$(MAKE) CC="$(CC)" CFLAGS="-g -Wall -O2" LDFLAGS="$(LDFLAGS)" $(CROSS)
 	touch build
 
 clean: clean-patched unpatch

Attachment: pgpePfWDWk1SS.pgp
Description: PGP signature

Reply via email to