Package: blt
Version: 2.4z-4.2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu natty ubuntu-patch
Hi there,
Please consider the attached patch from Peter Pearse
<[email protected]> which adds support for cross-compilation to the
blt package by passing the necessary options to configure.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
[email protected] [email protected]
=== modified file 'debian/rules'
--- debian/rules 2009-12-04 09:28:09 +0000
+++ debian/rules 2011-03-02 02:38:48 +0000
@@ -4,15 +4,25 @@
# This has to be exported to make some magic below work.
export DH_OPTIONS
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
# useful variables
v = 2.4
dtmp = $(shell pwd)/debian/tmp
-CONFIGURE = ./configure --prefix=/usr/ --mandir=/usr/share/man \
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ CONFIGURE = CC=$(DEB_HOST_GNU_TYPE)-gcc
+endif
+
+CONFIGURE += ./configure --prefix=/usr/ --mandir=/usr/share/man \
--with-cflags="-O2 -g -D_REENTRANT"
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ CONFIGURE += --host $(DEB_HOST_GNU_TYPE) --build $(DEB_BUILD_GNU_TYPE)
+endif
+
# Now, the build targets...
build: build-stamp