summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/control2
-rw-r--r--debian/patches/00list1
-rwxr-xr-xdebian/patches/01_arch_fallback.dpatch40
-rwxr-xr-xdebian/rules6
4 files changed, 46 insertions, 3 deletions
diff --git a/debian/control b/debian/control
index e5600840ff..48f7fb79b8 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Mono Group <pkg-mono-group@lists.alioth.debian.org>
Uploaders: Eduard Bloch <blade@debian.org>, Teófilo Ruiz Suárez <teo@debian.org>
Standards-Version: 3.6.1
-Build-Depends: debhelper (>> 3.0.0), libglib2.0-dev, bison, automake1.7 | automake, libtool
+Build-Depends: debhelper (>> 3.0.0), libglib2.0-dev, bison, automake1.7 | automake, libtool, dpatch
Build-Conflicts: libmint-dev
Package: mono-common
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000000..f0290107e8
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1 @@
+01_arch_fallback
diff --git a/debian/patches/01_arch_fallback.dpatch b/debian/patches/01_arch_fallback.dpatch
new file mode 100755
index 0000000000..b71050598f
--- /dev/null
+++ b/debian/patches/01_arch_fallback.dpatch
@@ -0,0 +1,40 @@
+#! /bin/sh -e
+## 01_arch_fallback.dpatch by Eduard Bloch <blade@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Using dpkg-architecture output to declare names of unsupported arches
+
+if [ $# -lt 1 ]; then
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+ -patch) patch -p1 ${patch_opts} < $0;;
+ -unpatch) patch -R -p1 ${patch_opts} < $0;;
+ *)
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+diff -urNad /home/inet/debian/dev/build-area/mono-0.30.1/configure.in mono-0.30.1/configure.in
+--- /home/inet/debian/dev/build-area/mono-0.30.1/configure.in 2004-02-13 02:24:03.000000000 +0100
++++ mono-0.30.1/configure.in 2004-02-24 18:32:35.000000000 +0100
+@@ -845,6 +845,11 @@
+ arch_target=s390;
+ ACCESS_UNALIGNED="no"
+ ;;
++ *)
++ arch_target=`dpkg-architecture -qDEB_HOST_ARCH`
++ TARGET=`echo $arch_target | tr a-z A-Z`
++ ACCESS_UNALIGNED="no"
++ ;;
+ esac
+
+ if test ${TARGET} = ARM; then
diff --git a/debian/rules b/debian/rules
index 2d1b6a3b26..8664eba965 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,8 @@
#export DH_VERBOSE=1
export DH_COMPAT=3
+include /usr/share/dpatch/dpatch.make
+
# Use ./configure if configure exists, ./autogen.sh if not.
# If neither exist, exit with an error.
CONFCMD:=$(shell test -x configure && echo "configure" || echo "")
@@ -13,7 +15,7 @@ endif
VERSION = $(shell dpkg-parsechangelog | grep ^Vers | cut -d\ -f2)
-build: build-stamp
+build: patch build-stamp
build-stamp:
dh_testdir
# refresh autotools crap
@@ -28,7 +30,7 @@ build-stamp:
$(CC) -o cli-wrapper debian/cli-wrapper.c `pkg-config glib-2.0 --cflags --libs`
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp