From 23da029b75417fc6acac795204e2579b13011ab0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 30 Oct 2010 15:10:10 -0400 Subject: Support building with Debian stable's ghc. --- Backend.hs | 1 + Makefile | 2 +- Portability.hs | 9 +++++++++ Remotes.hs | 1 + debian/changelog | 1 + doc/bugs/building_on_lenny.mdwn | 3 +++ 6 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Portability.hs 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 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]] -- cgit v1.2.3