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 libcap to cross-build in Debian - in
addition to the existing patch from this bug report and follows the
recommendation in autotools-dev.


--- libcap-1.10.debian/debian/rules 
+++ libcap-1.10.emdebian/debian/rules 
@@ -7,6 +7,14 @@
 
 # This is the debhelper compatability version to use.
 export DH_COMPAT=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 CC_FOR_BUILD=gcc
+else
+CROSS=CC_FOR_BUILD=gcc
+endif
 
 # shared library versions, option 1
 version=1.10
@@ -28,7 +36,7 @@
        dh_testdir
 
        # Add here commands to compile the package.
-       $(MAKE)
+       $(MAKE) $(CROSS)
 
        touch build-stamp
 
@@ -49,7 +57,7 @@
        dh_installdirs
 
        # Add here commands to install the package into debian/tmp.
-       $(MAKE) install DESTDIR=`pwd`/debian/tmp
+       $(MAKE) $(CROSS) install DESTDIR=`pwd`/debian/tmp
 
 
 # Build architecture-independent files here.

-- 

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

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to