Package: nano
Version: 2.0.6-2
Severity: minor
Tags: patch
User: [EMAIL PROTECTED]
Usertags: crossbuilt

--- Please enter the report below this line. ---

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 nano to cross-build in Debian.

This occurs because the cross building tools have been rewritten to
support CC_FOR_BUILD for packages that compile internal build tools 
and therefore the tools no longer explicitly override the MAKEFLAGS.

The patch also fixes the previous support that switched HOST with
BUILD, causing the normal Debian build to actually use a cross-compiler
(and a cross build - in my case - to try to build for amd64 on arm
instead of for arm on amd64).

Thanks.


--- nano.old/debian/rules       2007-11-13 23:46:25.000000000 +0000
+++ nano-2.0.6/debian/rules     2007-11-13 23:44:42.000000000 +0000
@@ -10,6 +10,11 @@
 DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
 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))
+confflags= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+else
+confflags= --build $(DEB_BUILD_GNU_TYPE)
+endif
 
 CFLAGS  = -Wall -g
 CFTINY  = -Wall -g -Os -fomit-frame-pointer
@@ -28,9 +33,7 @@
 COMMON_CONFIG := --cache-file=$(CURDIR)/config.cache \
                        --prefix=/usr --mandir=\$${prefix}/share/man \
                        --infodir=\$${prefix}/share/info --srcdir='..' \
-                       --sysconfdir=/etc \
-                       --host $(DEB_BUILD_GNU_TYPE) \
-                       --build $(DEB_HOST_GNU_TYPE)
+                       --sysconfdir=/etc $(confflags)
 
 build: patch-stamp build-stamp
 build-stamp: build-arch


--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.22-2-amd64

Debian Release: lenny/sid
  500 unstable        www.linux.codehelp.co.uk 
  500 unstable        www.emdebian.org 
  500 unstable        ftp.uk.debian.org 

--- Package information. ---
Depends           (Version) | Installed
===========================-+-===========
libc6            (>= 2.5-5) | 2.6.1-6
libncursesw5     (>= 5.4-5) | 5.6+20071013-1




-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpik1BcO8z2o.pgp
Description: PGP signature

Reply via email to