Package: mcabber
Version: 0.9.9-0.1
Severity: minor
Tags: patch

While building mcabber, you specify both the --build and --host
options to configure. This, while not incorrect, is unneeded in
non-cross compilation scenarios, since it is sufficient to specify
just --build when not cross compiling.

The attached patch detects whether the package is being cross
compiled, and adapts accordingly.

HTH.

Kumar
diff -Nru --exclude changelog mcabber-0.9.9/debian/rules mcabber-0.9.9/debian/rules
--- mcabber-0.9.9/debian/rules	2009-07-21 18:34:12.000000000 -0500
+++ mcabber-0.9.9/debian/rules	2009-07-21 18:34:12.000000000 -0500
@@ -4,6 +4,12 @@
 
 #export DH_VERBOSE=1
 
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+else
+CROSS= --build $(DEB_BUILD_GNU_TYPE)
+endif
+
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
@@ -18,7 +24,7 @@
 
 config.status: patch
 	dh_testdir
-	CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-gpgme --enable-aspell --enable-otr
+	CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-gpgme --enable-aspell --enable-otr
 
 build: build-stamp
 

Reply via email to