summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-10-21 08:04:50 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2012-10-21 08:04:50 +0000
commitefc445a064409578bf4531fd00baffc822d52130 (patch)
treed94124f5f37675a6b3308fce76086b02b1376e2f /dev-haskell
parentVersion bump with some bugfixes. (diff)
downloadgentoo-2-efc445a064409578bf4531fd00baffc822d52130.tar.gz
gentoo-2-efc445a064409578bf4531fd00baffc822d52130.tar.bz2
gentoo-2-efc445a064409578bf4531fd00baffc822d52130.zip
Fix build error against nonbundled cabal (bug #435726 by Alex and Kyle Blake).
(Portage version: 2.2.0_alpha141_p4/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
Diffstat (limited to 'dev-haskell')
-rw-r--r--dev-haskell/haddock/ChangeLog9
-rw-r--r--dev-haskell/haddock/files/haddock-2.10.0-ticket-202.patch30
-rw-r--r--dev-haskell/haddock/haddock-2.10.0-r2.ebuild (renamed from dev-haskell/haddock/haddock-2.10.0-r1.ebuild)16
-rw-r--r--dev-haskell/haddock/haddock-2.10.0.ebuild11
4 files changed, 58 insertions, 8 deletions
diff --git a/dev-haskell/haddock/ChangeLog b/dev-haskell/haddock/ChangeLog
index 670ccd6a2b86..814409c7a82f 100644
--- a/dev-haskell/haddock/ChangeLog
+++ b/dev-haskell/haddock/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-haskell/haddock
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.93 2012/09/14 07:03:20 qnikst Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.94 2012/10/21 08:04:50 slyfox Exp $
+
+*haddock-2.10.0-r2 (21 Oct 2012)
+
+ 21 Oct 2012; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/haddock-2.10.0-ticket-202.patch, +haddock-2.10.0-r2.ebuild,
+ -haddock-2.10.0-r1.ebuild, haddock-2.10.0.ebuild:
+ Fix build error against nonbundled cabal (bug #435726 by Alex and Kyle Blake).
14 Sep 2012; Alexander Vershilov <qnikst@gentoo.org> haddock-2.10.0-r1.ebuild,
haddock-2.10.0.ebuild, haddock-2.4.2.ebuild, haddock-2.6.1.ebuild,
diff --git a/dev-haskell/haddock/files/haddock-2.10.0-ticket-202.patch b/dev-haskell/haddock/files/haddock-2.10.0-ticket-202.patch
new file mode 100644
index 000000000000..744609006da7
--- /dev/null
+++ b/dev-haskell/haddock/files/haddock-2.10.0-ticket-202.patch
@@ -0,0 +1,30 @@
+--- haddock-2.10.0-orig/src/Haddock/Interface/Create.hs 2012-03-04 03:21:18.000000000 +1100
++++ haddock-2.10.0/src/Haddock/Interface/Create.hs 2012-06-27 00:05:37.874840635 +1000
+@@ -35,6 +35,7 @@
+ import Name
+ import Bag
+ import RdrName (GlobalRdrEnv)
++import TcRnTypes
+
+
+ -- | Use a 'TypecheckedModule' to produce an 'Interface'.
+@@ -50,6 +51,8 @@
+ instances = modInfoInstances mi
+ exportedNames = modInfoExports mi
+
++ (TcGblEnv {tcg_rdr_env = gre}, _) = tm_internals_ tm
++
+ -- The renamed source should always be available to us, but it's best
+ -- to be on the safe side.
+ (group_, mayExports, mayDocHeader) <-
+@@ -59,10 +62,6 @@
+ return (emptyRnGroup, Nothing, Nothing)
+ Just (x, _, y, z) -> return (x, y, z)
+
+- -- The pattern-match should not fail, because createInterface is only
+- -- done on loaded modules.
+- Just gre <- liftGhcToErrMsgGhc $ lookupLoadedHomeModuleGRE (moduleName mdl)
+-
+ opts0 <- liftErrMsg $ mkDocOpts (haddockOptions dflags) flags mdl
+ let opts
+ | Flag_IgnoreAllExports `elem` flags = OptIgnoreExports : opts0
diff --git a/dev-haskell/haddock/haddock-2.10.0-r1.ebuild b/dev-haskell/haddock/haddock-2.10.0-r2.ebuild
index 91bbc29ca024..7cfedbf0f898 100644
--- a/dev-haskell/haddock/haddock-2.10.0-r1.ebuild
+++ b/dev-haskell/haddock/haddock-2.10.0-r2.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.10.0-r1.ebuild,v 1.3 2012/09/14 07:03:20 qnikst Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.10.0-r2.ebuild,v 1.1 2012/10/21 08:04:50 slyfox Exp $
EAPI="4"
-CABAL_FEATURES="bin lib profile haddock hscolour"
+CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
inherit eutils haskell-cabal pax-utils
DESCRIPTION="A documentation-generation tool for Haskell libraries"
@@ -33,6 +33,9 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-drop-tools.patch
# http://www.mail-archive.com/cvs-ghc@haskell.org/msg37186.html
epatch "${FILESDIR}"/${P}-dont-crash-on-unicode-strings-in-doc-comments.patch
+ # http://trac.haskell.org/haddock/ticket/202 fixed by upstream in ghc-7.4
+ # branch only (fix is not in master branch on 20120626)
+ epatch "${FILESDIR}/${P}-ticket-202.patch"
for f in Lex Parse; do
rm "src/Haddock/$f."*
@@ -49,7 +52,12 @@ src_configure() {
echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
chmod +x "${exe}"
- haskell-cabal_src_configure --with-haddock="${exe}"
+ # we use 'nocabaldep' to use ghc's bundled Cabal
+ # as external one is likely to break our haddock
+ # (known to work on 1.16.0 and breaks on 1.16.0.1!)
+ haskell-cabal_src_configure \
+ --with-haddock="${exe}" \
+ --constraint="Cabal == $(cabal-version)"
}
src_compile() {
@@ -63,5 +71,5 @@ src_install() {
cabal_src_install
# haddock uses GHC-api to process TH source.
# TH requires GHCi which needs mmap('rwx') (bug #299709)
- pax-mark -m "${ED}/usr/bin/${PN}"
+ pax-mark -m "${D}/usr/bin/${PN}"
}
diff --git a/dev-haskell/haddock/haddock-2.10.0.ebuild b/dev-haskell/haddock/haddock-2.10.0.ebuild
index 1c640a524501..beb282b65cb3 100644
--- a/dev-haskell/haddock/haddock-2.10.0.ebuild
+++ b/dev-haskell/haddock/haddock-2.10.0.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.10.0.ebuild,v 1.3 2012/09/14 07:03:20 qnikst Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-2.10.0.ebuild,v 1.4 2012/10/21 08:04:50 slyfox Exp $
EAPI="4"
-CABAL_FEATURES="bin lib profile haddock hscolour"
+CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
inherit eutils haskell-cabal pax-utils
DESCRIPTION="A documentation-generation tool for Haskell libraries"
@@ -47,7 +47,12 @@ src_configure() {
echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
chmod +x "${exe}"
- haskell-cabal_src_configure --with-haddock="${exe}"
+ # we use 'nocabaldep' to use ghc's bundled Cabal
+ # as external one is likely to break our haddock
+ # (known to work on 1.16.0 and breaks on 1.16.0.1!)
+ haskell-cabal_src_configure \
+ --with-haddock="${exe}" \
+ --constraint="Cabal == $(cabal-version)"
}
src_compile() {