Package: bsdmainutils
Version: 6.1.8
Severity: wishlist
Tags: patch

bsdmainutils needs a simple patch to support cross-building by detecting
the cross environment in debian/rules and passing a modified $(CC) to
$(MAKE).

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.

Thanks.


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

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

Versions of packages bsdmainutils depends on:
ii  bsdutils                  1:2.13-10      Basic utilities from 4.4BSD-Lite
ii  debianutils               2.27           Miscellaneous utilities specific t
ii  libc6                     2.6.1-6        GNU C Library: Shared libraries
ii  libncurses5               5.6+20071013-1 Shared libraries for terminal hand

bsdmainutils recommends no packages.

-- no debconf information
--- bsdmainutils.old/debian/rules	2006-11-23 20:10:25.000000000 +0000
+++ bsdmainutils-6.1.8/debian/rules	2007-11-07 15:32:38.000000000 +0000
@@ -2,6 +2,14 @@
 
 SHELL+= -e
 #export DH_VERBOSE=1
+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 += "CC=$(DEB_HOST_GNU_TYPE)-gcc"
+else
+	CROSS +=
+endif
 
 # support noopt; nostrip is handled dh_strip
 CFLAGS = -g
@@ -13,7 +21,7 @@
 build: build-stamp
 build-stamp:
 	dh_testdir
-	$(MAKE)
+	$(MAKE) $(CROSS)
 	touch build-stamp
 
 clean:

Reply via email to