Package: irssi Version: 0.8.13-2 Severity: minor Tags: patch Hi!
While building irssi, 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
>From a19308dada3db8290066dba25f5cf50d65b245e5 Mon Sep 17 00:00:00 2001 From: Kumar Appaiah <aku...@debian.org> Date: Mon, 20 Jul 2009 20:12:42 -0500 Subject: [PATCH] Check if we actually are cross compiling. Specifying both the --build and --host options to configure is needed only when cross compiling, which causes the proper <arch>-<machine>-gnu-gcc compiler to be used (like x86_64-linux-gnu-gcc). Therefore, we check if we are cross compiling (i.e., whether the host machine and target machine are of different types). If they are different, both options are passed to the configure script. Else, only the --build option is passed, which results in the correct compiler (gcc) being used. Signed-off-by: Kumar Appaiah <aku...@debian.org> --- debian/rules | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/debian/rules b/debian/rules index d5841ad..898f41c 100755 --- a/debian/rules +++ b/debian/rules @@ -9,6 +9,12 @@ # Uncomment this to turn on verbose mode. #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 + include /usr/share/quilt/quilt.make # These are used for cross-compiling and for saving the configure script @@ -28,7 +34,7 @@ endif config.status: patch configure dh_testdir # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + CFLAGS="$(CFLAGS)" ./configure $(CROSS) \ --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info \ --sysconfdir=/etc \ --without-servertest --enable-ipv6 --with-bot --with-proxy \ -- 1.5.6.5