summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/cabal-wrapper16
-rw-r--r--debian/changelog2
-rw-r--r--debian/control1
-rwxr-xr-xdebian/rules3
4 files changed, 20 insertions, 2 deletions
diff --git a/debian/cabal-wrapper b/debian/cabal-wrapper
new file mode 100755
index 000000000..e0623f79f
--- /dev/null
+++ b/debian/cabal-wrapper
@@ -0,0 +1,16 @@
+#!/bin/sh
+# It would be more usual to use:
+# export CABAL=./Setup
+# But Setup currently has a very bad dependency resolver, and very bad
+# debugging output, and tends to eat all memory and die on small buildds.
+#
+# This should be revisited once Debian has a newer ghc than 7.6.3,
+# and hopefully gets the improved dependency resolver from cabal.
+set -e
+
+# Avoid cabal writing to HOME, and avoid local cabal settings
+# influencing the build.
+HOME=$(mktemp -d)
+export HOME
+
+cabal "$@"
diff --git a/debian/changelog b/debian/changelog
index 41228c5b7..18a9898c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
git-annex (5.20140920) UNRELEASED; urgency=medium
* Depend on new enough git for --no-gpg-sign to work. Closes: #762446
+ * Work around failure to build on mips by using cabal, not Setup,
+ to build in debian/rules.
-- Joey Hess <joeyh@debian.org> Mon, 22 Sep 2014 13:50:00 -0400
diff --git a/debian/control b/debian/control
index 91747c417..b2f7d8cca 100644
--- a/debian/control
+++ b/debian/control
@@ -4,6 +4,7 @@ Priority: optional
Build-Depends:
debhelper (>= 9),
ghc (>= 7.4),
+ cabal-install,
libghc-mtl-dev (>= 2.1.1),
libghc-missingh-dev,
libghc-data-default-dev,
diff --git a/debian/rules b/debian/rules
index 3a0511fa6..7c8f8a560 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,6 @@
#!/usr/bin/make -f
-# Avoid using cabal, as it writes to $HOME
-export CABAL=./Setup
+export CABAL=debian/cabal-wrapper
# Do use the changelog's version number, rather than making one up.
export RELEASE_BUILD=1