tags 316664 + patch
thanks

On 05/07/02 12:55 -0700, Daniel Schepler said ...
> 
> Changing debian/rules to use DEB_HOST_ARCH_OS instead of
> DEB_HOST_GNU_SYSTEM fixes this.

The attached patch takes care of this.  It uses Colin Watson's tip for
compatibility with the older version of dpkg as well.

Giridhar

-- 
Y Giridhar Appaji Nag | http://www.appaji.net/
diff -Nur icon-9.4.2.orig/debian/rules icon-9.4.2/debian/rules
--- icon-9.4.2.orig/debian/rules        2005-08-07 00:15:25.000000000 +0530
+++ icon-9.4.2/debian/rules     2005-08-07 00:15:55.000000000 +0530
@@ -3,43 +3,58 @@
 # Do we make rt.a into an ELF library?
 # Do we make iconx link with xpm.so?
 
-DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
-DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
+DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
+
+# Take account of old dpkg-architecture output.
+
+ifeq ($(DEB_HOST_ARCH_CPU),)
+  DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+  ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
+    DEB_HOST_ARCH_CPU := amd64
+  endif
+endif
+ifeq ($(DEB_HOST_ARCH_OS),)
+  DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture 
-qDEB_HOST_GNU_SYSTEM))
+  ifeq ($(DEB_HOST_ARCH_OS),gnu)
+    DEB_HOST_ARCH_OS := hurd
+  endif
+endif
 
 CFLAGS_OPT = -O2
 
-ifeq "$(DEB_HOST_GNU_CPU)" "alpha"
+ifeq "$(DEB_HOST_ARCH_CPU)" "alpha"
 CFLAGS_OPT = -O0
 endif
-ifeq "$(DEB_HOST_GNU_CPU)" "hppa"
+ifeq "$(DEB_HOST_ARCH_CPU)" "hppa"
 CFLAGS_OPT = -O0
 endif
-ifeq "$(DEB_HOST_GNU_CPU)" "ia64"
+ifeq "$(DEB_HOST_ARCH_CPU)" "ia64"
 CFLAGS_OPT = -O0
 endif
-ifeq "$(DEB_HOST_GNU_CPU)" "mips"
+ifeq "$(DEB_HOST_ARCH_CPU)" "mips"
 CFLAGS_OPT = -O0
 endif
-ifeq "$(DEB_HOST_GNU_CPU)" "mipsel"
+ifeq "$(DEB_HOST_ARCH_CPU)" "mipsel"
 CFLAGS_OPT = -O0
 endif
-ifeq "$(DEB_HOST_GNU_CPU)" "powerpc"
+ifeq "$(DEB_HOST_ARCH_CPU)" "powerpc"
 CFLAGS_OPT = -O0
 endif
-ifeq "$(DEB_HOST_GNU_CPU)" "s390"
+ifeq "$(DEB_HOST_ARCH_CPU)" "s390"
 CFLAGS_OPT = -O0
 endif
-ifeq "$(DEB_HOST_GNU_CPU)" "sparc"
+ifeq "$(DEB_HOST_ARCH_CPU)" "sparc"
 CFLAGS_OPT = -O0
 endif
-ifeq "$(DEB_HOST_GNU_CPU)" "x86_64"
+ifeq "$(DEB_HOST_ARCH_CPU)" "x86_64"
 CFLAGS_OPT = -O0
 endif
 
-ifneq (, $(filter $(DEB_HOST_GNU_SYSTEM), linux kfreebsd-gnu knetbsd-gnu))
+ifneq (, $(filter $(DEB_HOST_ARCH_OS), linux kfreebsd-gnu knetbsd-gnu))
 system = linux
 else
-system = $(DEB_HOST_GNU_SYSTEM)
+system = $(DEB_HOST_ARCH_OS)
 endif
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))

Reply via email to