diff options
| author | Joachim Breitner <mail@joachim-breitner.de> | 2010-07-02 11:21:10 +0400 |
|---|---|---|
| committer | Joachim Breitner <mail@joachim-breitner.de> | 2010-07-02 11:21:10 +0400 |
| commit | 1ac5c8caa51b6d2e4b3903d8a2765c87183e643b (patch) | |
| tree | d86eda4b2255f69804809368eef6a61d4ef4ed76 /p/haskell-haddock/debian | |
| parent | a1823df7c4b5696587ad7f2ee575ca1db61e4420 (diff) | |
| download | DHG_packages-1ac5c8caa51b6d2e4b3903d8a2765c87183e643b.tar.gz | |
haskell-haddock: Patch around missing ghci support, reusing a patch by Marco Túlio Gontijo e Silva in #566331
Diffstat (limited to 'p/haskell-haddock/debian')
| -rw-r--r-- | p/haskell-haddock/debian/changelog | 7 | ||||
| -rw-r--r-- | p/haskell-haddock/debian/patches/build_without_ghci.patch | 65 | ||||
| -rw-r--r-- | p/haskell-haddock/debian/patches/series | 1 | ||||
| -rwxr-xr-x | p/haskell-haddock/debian/rules | 4 |
4 files changed, 77 insertions, 0 deletions
diff --git a/p/haskell-haddock/debian/changelog b/p/haskell-haddock/debian/changelog index 97fc3d44e..04cbf5319 100644 --- a/p/haskell-haddock/debian/changelog +++ b/p/haskell-haddock/debian/changelog @@ -1,3 +1,10 @@ +haskell-haddock (2.7.2-3) UNRELEASED; urgency=low + + * Patch around missing ghci support, reusing a patch by Marco Túlio Gontijo + e Silva in #566331 + + -- Joachim Breitner <nomeata@debian.org> Fri, 02 Jul 2010 09:18:30 +0200 + haskell-haddock (2.7.2-2) unstable; urgency=low * Depend on libghc6-ghc-paths-dev (Closes: #587807) diff --git a/p/haskell-haddock/debian/patches/build_without_ghci.patch b/p/haskell-haddock/debian/patches/build_without_ghci.patch new file mode 100644 index 000000000..ab8a85de9 --- /dev/null +++ b/p/haskell-haddock/debian/patches/build_without_ghci.patch @@ -0,0 +1,65 @@ +Index: haskell-haddock-2.7.2/src/Haddock/Interface/AttachInstances.hs +=================================================================== +--- haskell-haddock-2.7.2.orig/src/Haddock/Interface/AttachInstances.hs 2010-07-02 09:13:14.000000000 +0200 ++++ haskell-haddock-2.7.2/src/Haddock/Interface/AttachInstances.hs 2010-07-02 09:13:17.000000000 +0200 +@@ -27,7 +27,10 @@ + import InstEnv + import Class + import HscTypes (withSession, ioMsg) ++#ifdef GHCI + import TcRnDriver (tcRnGetInfo) ++#endif ++ + import TypeRep hiding (funTyConName) + import Var hiding (varName) + import TyCon +@@ -44,7 +47,11 @@ + return $ iface { ifaceExportItems = newItems } + where + attachExport export@ExportDecl{expItemDecl = L _ (TyClD d)} = do ++#ifdef GHCI + mb_info <- getAllInfo (unLoc (tcdLName d)) ++#else ++ let mb_info = Nothing ++#endif + return $ export { expItemInstances = case mb_info of + Just (_, _, instances) -> + let insts = map (first synifyInstHead) $ sortImage (first instHead) +@@ -70,10 +77,12 @@ + modName = nameModule name + + ++#ifdef GHCI + -- | Like GHC's getInfo but doesn't cut things out depending on the + -- interative context, which we don't set sufficiently anyway. + getAllInfo :: GhcMonad m => Name -> m (Maybe (TyThing,Fixity,[Instance])) + getAllInfo name = withSession $ \hsc_env -> ioMsg $ tcRnGetInfo hsc_env name ++#endif + + + -------------------------------------------------------------------------------- +Index: haskell-haddock-2.7.2/haddock.cabal +=================================================================== +--- haskell-haddock-2.7.2.orig/haddock.cabal 2010-07-02 09:18:05.000000000 +0200 ++++ haskell-haddock-2.7.2/haddock.cabal 2010-07-02 09:18:12.000000000 +0200 +@@ -67,6 +67,10 @@ + default: False + manual: True + ++flag ghci ++ default: True ++ manual: True ++ + executable haddock + build-depends: + base >= 4.0.0.0 && < 4.3.0.0, +@@ -139,6 +143,9 @@ + cpp-options: -DTEST + build-depends: QuickCheck >= 2.1 && < 3 + ++ if flag(ghci) ++ cpp-options: -DGHCI ++ + hs-source-dirs: src + extensions: CPP, PatternGuards, DeriveDataTypeable, + ScopedTypeVariables, MagicHash diff --git a/p/haskell-haddock/debian/patches/series b/p/haskell-haddock/debian/patches/series new file mode 100644 index 000000000..9740a9dff --- /dev/null +++ b/p/haskell-haddock/debian/patches/series @@ -0,0 +1 @@ +build_without_ghci.patch diff --git a/p/haskell-haddock/debian/rules b/p/haskell-haddock/debian/rules index f2277cb16..a358a758e 100755 --- a/p/haskell-haddock/debian/rules +++ b/p/haskell-haddock/debian/rules @@ -2,5 +2,9 @@ DEB_BUILD_DEPENDENCIES = build-arch +# Test if ghci is available +DEB_SETUP_GHC6_CONFIGURE_ARGS := $(shell test -e /usr/bin/ghci && echo --flags=ghci || echo --flags=-ghci) + + include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/hlibrary.mk |
