Package: libgsm
Version: 1.0.12-1
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 libgsm to cross-build in Debian,
following recommendations from autotools-dev.


*** ../crossbuild.diff
--- libgsm-1.0.12.debian/debian/rules 
+++ libgsm-1.0.12.emdebian/debian/rules 
@@ -3,6 +3,13 @@
 include /usr/share/dpatch/dpatch.make
 
 .PHONY: build clean binary binary-indep binary-arch
+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
 
 ifeq ($(DEB_HOST_ARCH),arm)
 MULTYPE=''
@@ -13,7 +20,7 @@
 build: build-stamp
 build-stamp: patch-stamp
        dh_testdir
-       $(MAKE) CCFLAGS='-c -g -O2 -fPIC -Wall -D_GNU_SOURCE -D_REENTRANT 
-DNeedFunctionPrototypes=1 -DWAV49' MULHACK=$(MULTYPE) all
+       $(MAKE) $(CROSS) CCFLAGS='-c -g -O2 -fPIC -Wall -D_GNU_SOURCE 
-D_REENTRANT -DNeedFunctionPrototypes=1 -DWAV49' MULHACK=$(MULTYPE) all
        touch build-stamp
 
 clean: unpatch
@@ -28,7 +35,7 @@
        dh_clean -k
        dh_installdirs
        mkdir -p debian/tmp/usr/lib debian/tmp/usr/bin
-       $(MAKE) INSTALL_ROOT=debian/tmp/usr 
GSM_INSTALL_INC=debian/libgsm1-dev/usr/include/gsm 
GSM_INSTALL_MAN=debian/libgsm1-dev/usr/share/man/man3 
TOAST_INSTALL_MAN=debian/libgsm-tools/usr/share/man/man1 install
+       $(MAKE) $(CROSS) INSTALL_ROOT=debian/tmp/usr 
GSM_INSTALL_INC=debian/libgsm1-dev/usr/include/gsm 
GSM_INSTALL_MAN=debian/libgsm1-dev/usr/share/man/man3 
TOAST_INSTALL_MAN=debian/libgsm-tools/usr/share/man/man1 install
        ln -s gsm/gsm.h debian/libgsm1-dev/usr/include/gsm.h
        cp inc/*.h debian/libgsm1-dev/usr/include/gsm
        mv lib/*so debian/libgsm1-dev/usr/lib


-- 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