summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-10-30 15:10:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-10-30 15:10:10 -0400
commit23da029b75417fc6acac795204e2579b13011ab0 (patch)
tree375a98f1151ff0eaba6ba58c290583943c0e7676
parent83715949c95be7f50e6ec07e3a7356b2b1f7cad1 (diff)
Support building with Debian stable's ghc.
-rw-r--r--Backend.hs1
-rw-r--r--Makefile2
-rw-r--r--Portability.hs9
-rw-r--r--Remotes.hs1
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/building_on_lenny.mdwn3
6 files changed, 16 insertions, 1 deletions
diff --git a/Backend.hs b/Backend.hs
index b7c52ddec..59df37fc4 100644
--- a/Backend.hs
+++ b/Backend.hs
@@ -39,6 +39,7 @@ import qualified Annex
import Utility
import Types
import qualified TypeInternals as Internals
+import Portability
{- List of backends in the order to try them when storing a new key. -}
list :: Annex [Backend]
diff --git a/Makefile b/Makefile
index 921eb7067..3ffa29e3b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ all: git-annex docs
git-annex:
mkdir -p build
- ghc -odir build -hidir build --make git-annex
+ ghc -cpp -odir build -hidir build --make git-annex
install:
install -d $(DESTDIR)/usr/bin
diff --git a/Portability.hs b/Portability.hs
new file mode 100644
index 000000000..9cb386a9b
--- /dev/null
+++ b/Portability.hs
@@ -0,0 +1,9 @@
+{- git-annex - Nasty portability workarounds. -}
+module Portability where
+
+-- old ghc does not know about SomeException.
+-- http://haskell.1045720.n5.nabble.com/Help-using-catch-in-6-10-td3127921.html#a3127921
+-- This needs ghc -cpp
+#if __GLASGOW_HASKELL__ < 610
+type SomeException = Exception
+#endif
diff --git a/Remotes.hs b/Remotes.hs
index 66395adcd..32016b775 100644
--- a/Remotes.hs
+++ b/Remotes.hs
@@ -40,6 +40,7 @@ import Locations
import UUID
import Utility
import qualified Core
+import Portability
{- Human visible list of remotes. -}
list :: [Git.Repo] -> String
diff --git a/debian/changelog b/debian/changelog
index 4759f7e51..d6cc73e49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ git-annex (0.03) UNRELEASED; urgency=low
* Add --verbose
* Fix SIGINT handling.
* Fix handling of files with unusual characters in their name.
+ * Support building with Debian stable's ghc.
-- Joey Hess <joeyh@debian.org> Thu, 28 Oct 2010 13:46:59 -0400
diff --git a/doc/bugs/building_on_lenny.mdwn b/doc/bugs/building_on_lenny.mdwn
index c0e45912a..cf5a20a7c 100644
--- a/doc/bugs/building_on_lenny.mdwn
+++ b/doc/bugs/building_on_lenny.mdwn
@@ -38,3 +38,6 @@ Thanks for your help!
> Newer versions of ghc changed their exception handling types, and
> I coded git-annex to use the new style and not the old. gch6 6.12 will
> work. I do not think there is a backport available though. --[[Joey]]
+>
+> Ok, found and deployed a workaround. It is not tested. Let me know how it
+> works for you. --[[Joey]]