Package: krb5
Version: 1.6.dfsg.3~beta1-2
Severity: wishlist
Tags: patch
User: [EMAIL PROTECTED]
Usertags: crossbuilt

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 krb5 to cross-build in Debian,
following recommendations in autotools-dev. The cache file is handled
externally.

Thanks.


*** ../crossbuild.diff
--- krb5-1.6.dfsg.3~beta1.debian/debian/rules 
+++ krb5-1.6.dfsg.3~beta1.emdebian/debian/rules 
@@ -7,6 +7,14 @@
 
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
+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= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) \
+       --cache-file=$(DEB_HOST_GNU_TYPE).cache
+else
+CROSS= --build $(DEB_BUILD_GNU_TYPE)
+endif
 
 CCOPTS=-g 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -35,10 +43,11 @@
        find src -name configure -print | xargs touch
        find src \( -name \*hin -o -name \*.h.in -o -name \*.stmp \) -print \
                | xargs touch
+       [ ! -f $(DEB_HOST_GNU_TYPE).cache ] || cp $(DEB_HOST_GNU_TYPE).cache 
build/
        cd build && ../src/configure --prefix=/usr --enable-shared  \
                --with-system-et --with-system-ss --enable-fakeka 
--without-ldap \
                CFLAGS="$(CCOPTS) -D_REENTRANT " --localstatedir=/etc \
-               --mandir=/usr/share/man --without-tcl
+               --mandir=/usr/share/man --without-tcl $(CROSS)
        touch configure-stamp
 
 # Build the info pages in a separate directory, since otherwise we'll


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

Kernel: Linux 2.6.24-1-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