Package: libedit
Version: 2.11~20080614
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: crossbuilt

This simple patch is part of the crossbuild support for libedit -
another issue related to actually locating the shared libraries is
handled by an internal workaround in emdebian-tools so although this
patch helps, it is not a complete solution for cross-building libedit
with dpkg-buildpackage -a. To do that, pmake needs to become more
cross-build aware and handle the -L/usr/arm-linux-gnu/lib/ prefix when
trying to link the cross-built binaries.

The patch has been tested with a normal Debian native build and has no
effect on the package.


*** ../crossbuild.diff
--- libedit-2.11~20080614.debian/debian/rules 
+++ libedit-2.11~20080614.emdebian/debian/rules 
@@ -26,6 +26,9 @@
 
 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 LD=$(DEB_HOST_GNU_TYPE)-ld
+endif
 
 # Workaround for pmake fussiness
 ifeq (mips-linux,$(DEB_HOST_GNU_TYPE))
@@ -38,7 +41,7 @@
 build-stamp:
        dh_testdir
        chmod 755 libedit/makelist      # workaround a bug in upstream source
-       cd libedit && pmake ${PMAKE_ARGS}
+       cd libedit && $(CROSS) pmake ${PMAKE_ARGS}
        touch build-stamp
 
 clean: unpatch


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

Kernel: Linux 2.6.25-2-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