Package: readline5
Version: 5.2-3
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: crossbuilt

In line with the other cross-building support bugs:
http://lists.debian.org/debian-devel/2007/11/msg00116.html

This patch is necessary to allow readline5 to cross-build in Debian.

Thanks.

*** ../crossbuild.diff
--- readline5-5.2.debian/debian/rules 
+++ readline5-5.2.emdebian/debian/rules 
@@ -11,12 +11,16 @@
 DEB_HOST_ARCH_OS       ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 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))
+CROSS=$(DEB_HOST_GNU_TYPE)-gcc
+else
+CROSS=gcc
+endif
 distribution := $(shell lsb_release -is)
 
 ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/i386/powerpc/sparc/s390/))
   build64 = yes
-  CC64 = gcc -m64
+  CC64 = $(CROSS) -m64
   gencontrol_flags = -- \
        '-Vdevxx:Depends=libc6-dev-$(ARCH64)'
   ifeq ($(DEB_HOST_ARCH),i386)
@@ -39,7 +43,7 @@
 
 ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/amd64/ppc64/))
   build32 = yes
-  CC32 = gcc -m32
+  CC32 = $(CROSS) -m32
   lib32dir = lib32
   lib32devdir = usr/lib32
   gencontrol_flags = -- \
@@ -63,7 +67,7 @@
 else
   CC_LINK_FLAGS = -Wl,
 endif
-CC     = gcc
+CC     = $(CROSS)
 
 SHELL  = bash
 


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Attachment: signature.asc
Description: Digital signature

Reply via email to