summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-haskell/haddock
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-haskell/haddock')
-rw-r--r--dev-haskell/haddock/Manifest7
-rw-r--r--dev-haskell/haddock/files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch22
-rw-r--r--dev-haskell/haddock/files/haddock-2.10.0-drop-tools.patch26
-rw-r--r--dev-haskell/haddock/files/haddock-2.10.0-ticket-202.patch30
-rw-r--r--dev-haskell/haddock/files/haddock-2.13.1-drop-tools.patch13
-rw-r--r--dev-haskell/haddock/files/haddock-2.13.1-renameType.patch56
-rw-r--r--dev-haskell/haddock/files/haddock-2.9.2-cabal-1.10.patch13
-rw-r--r--dev-haskell/haddock/haddock-2.10.0-r2.ebuild75
-rw-r--r--dev-haskell/haddock/haddock-2.13.1-r2.ebuild67
-rw-r--r--dev-haskell/haddock/haddock-2.13.2-r1.ebuild74
-rw-r--r--dev-haskell/haddock/haddock-2.13.2.1.ebuild76
-rw-r--r--dev-haskell/haddock/haddock-2.13.2.ebuild71
-rw-r--r--dev-haskell/haddock/haddock-2.14.3.0.7.8.3.ebuild68
-rw-r--r--dev-haskell/haddock/haddock-2.16.1.ebuild70
-rw-r--r--dev-haskell/haddock/metadata.xml8
15 files changed, 676 insertions, 0 deletions
diff --git a/dev-haskell/haddock/Manifest b/dev-haskell/haddock/Manifest
new file mode 100644
index 000000000000..b0f20e2a8b60
--- /dev/null
+++ b/dev-haskell/haddock/Manifest
@@ -0,0 +1,7 @@
+DIST haddock-2.10.0.tar.gz 159750 SHA256 d107dba15e8aee5abcb540b818b5dcb8ced98bae7d0714f50192dba26cadb410 SHA512 0680ffafce7a2e6a24ae85869694ea5c590305007da07cdffd6adb8a837164452cdf2de159c9fdcba059f76fc01f30771237dbcd71dd44d04afc0d2317e28563 WHIRLPOOL b584452acbe6e1c3474c97a62b17621e1ce0ef31574845499ca8b6ebdcf54559fed2b37d1890b80b1d526cc9b45d52b51a9acf6ae0d9472e15f93c1a7ff7ef3f
+DIST haddock-2.13.1.tar.gz 176831 SHA256 6e5e2295cd191e43a046c12544f2f4e8b4260cfda8282d48b15a7a35d8a24e7f SHA512 2cff54f4a3676c605327a6ad926df51976e7ec2bd512e464d0bf84d24f29fa3078dd5f8006329a4a6913607717c2c45f1db2b63d9e9f655d64cbbe92e0fe35fc WHIRLPOOL d1d9202767f4d5ee68ed100f3b95c9be6bff5024b3155b3dbaf3d1d690ac9dc0be2841ef1ea960c095a30005dc2bbb16046dbc4827c6047ee50ad6b1671ae38f
+DIST haddock-2.13.2-pregenerated-files.patch 206413 SHA256 dd603527692c12055d6a03c59d414f24dc43a0c56cdb815a0755126586a61f4c SHA512 447d7478365f895028fa56a06695ad71792cb3631fe06b18fb051a6d20d1c829eeff6d2c579c90d4d6b5594f245d2aa4f296bff280e5162f090b9b3f98e780c8 WHIRLPOOL 57bdf7bab4077afe003760015aa9535b4af5f2549f51db1a9d7ca87fd67faa842bd1e0adbfabceffee6ff1cb6ad9b4ec6a34b70630190e89b67900f834538e4f
+DIST haddock-2.13.2.1.tar.gz 208851 SHA256 c9cfe2bd2e8e1201870f88bc9a2ccdb0173315d0a8c734b459ec344feb1af34e SHA512 91e451264ff1c82c801f32a48f33d9fd808d22135e0ca6c73a0bd5b515ec69f2530ca9566ee11109cdf67005c4f794cf5e12b7743cf72e34e1e76f094a5744e2 WHIRLPOOL 42f4c9e37ed928403b4d228a3288f6c95372965b8875e97106482bbe0163a124b3c6a6fc727030ca5c04d7d5cc8f092c5b304147fc763971f81135a380e8fd70
+DIST haddock-2.13.2.tar.gz 174973 SHA256 25e7d5819d38cbb1c9b1ff967e2a4093c776c3defaa0a249c8eabba1e70892e3 SHA512 6b70f4cc659858e86919cd35a4e936215a53d23767262e25c7add5986cf21d04a761dc3581fe97c6510b3cb0c9867df3e6fa9668732b55e0e9d56b4932dca330 WHIRLPOOL ff06c0d092cdeaf2ddbffd225d30f53239523cd7d482c73f4b7a20100ebcc4e6b6c329bab5cf828ae2730503cff7709061b04cda29ea034939c5acc59191ac52
+DIST haddock-2.14.3.0.7.8.3.tar.gz 230282 SHA256 8bcdea48e3fbba6e38d2e629edf230da39d07421424bb1c615198c77623ff2c4 SHA512 62ae4a29c877c3b9742828fcda2f1f045357f41b4a2c495a4791a42d412d41b3d206cdcb73e2d1bd4e95c40371dae865f4eaa37031cda6c1bada5dfed963c2be WHIRLPOOL afd36c8f04aa29c007d83d7c7731098347836daa4e8307710b839ecbc764e191624075df5c3e353c8bcd9f640dfe560a07477bf7909d53ed7e13b34a806efc9a
+DIST haddock-2.16.1.tar.gz 216323 SHA256 46ecd130cb5ad2b5c7452c843f9b75e976f1416d1cf17e6436d65c2c0bdbd6d6 SHA512 709af410f8746819c8c067f3549d79ba0ecaa312fb6b19acf670a9a3e4c94e94b8e546493e08293eceeb488bc0891a8ebe033a58411c4af935b445cd7f3014b8 WHIRLPOOL 0f60978d1e4303d6586b164ab40236f949c14308a0b0ddec9e63ff9b332835ca846187b65de8c122203ace666450f40d55955a3c287f576611d7df2bc6c9161c
diff --git a/dev-haskell/haddock/files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch b/dev-haskell/haddock/files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch
new file mode 100644
index 000000000000..254266d20e26
--- /dev/null
+++ b/dev-haskell/haddock/files/haddock-2.10.0-dont-crash-on-unicode-strings-in-doc-comments.patch
@@ -0,0 +1,22 @@
+--- haddock-2.10.0-orig/src/Haddock/Lex.x 2012-03-04 03:21:18.000000000 +1100
++++ haddock-2.10.0/src/Haddock/Lex.x 2012-05-30 22:19:31.858259148 +1000
+@@ -181,7 +181,7 @@
+ go inp@(pos, _, str) sc =
+ case alexScan inp sc of
+ AlexEOF -> []
+- AlexError _ -> error "lexical error"
++ AlexError _ -> []
+ AlexSkip inp' _ -> go inp' sc
+ AlexToken inp'@(pos',_,_) len act -> act pos (take len str) sc (\sc -> go inp' sc) dflags
+
+--- haddock-2.10.0-orig/dist/build/haddock/haddock-tmp/Haddock/Lex.hs 2012-03-04 03:21:21.000000000 +1100
++++ haddock-2.10.0/dist/build/haddock/haddock-tmp/Haddock/Lex.hs 2012-05-30 22:23:40.209770708 +1000
+@@ -131,7 +131,7 @@
+ go inp@(pos, _, str) sc =
+ case alexScan inp sc of
+ AlexEOF -> []
+- AlexError _ -> error "lexical error"
++ AlexError _ -> []
+ AlexSkip inp' _ -> go inp' sc
+ AlexToken inp'@(pos',_,_) len act -> act pos (take len str) sc (\sc -> go inp' sc) dflags
+
diff --git a/dev-haskell/haddock/files/haddock-2.10.0-drop-tools.patch b/dev-haskell/haddock/files/haddock-2.10.0-drop-tools.patch
new file mode 100644
index 000000000000..f7f7f4a3ee1e
--- /dev/null
+++ b/dev-haskell/haddock/files/haddock-2.10.0-drop-tools.patch
@@ -0,0 +1,26 @@
+diff --git a/haddock.cabal b/haddock.cabal
+index 84d3c2a..9587450 100644
+--- a/haddock.cabal
++++ b/haddock.cabal
+@@ -78,10 +78,6 @@ flag test
+
+ executable haddock
+ default-language: Haskell2010
+- -- In a GHC tree - in particular, in a source tarball - we don't
+- -- require alex or happy
+- if !flag(in-ghc-tree)
+- build-tools: alex >= 2.3, happy >= 1.18
+ build-depends:
+ base >= 4.3 && < 4.6,
+ filepath,
+@@ -140,10 +136,6 @@ executable haddock
+
+ library
+ default-language: Haskell2010
+- -- In a GHC tree - in particular, in a source tarball - we don't
+- -- require alex or happy
+- if !flag(in-ghc-tree)
+- build-tools: alex >= 2.3, happy >= 1.18
+ build-depends:
+ base >= 4.3 && < 4.6,
+ filepath,
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/files/haddock-2.13.1-drop-tools.patch b/dev-haskell/haddock/files/haddock-2.13.1-drop-tools.patch
new file mode 100644
index 000000000000..f8e4365674c4
--- /dev/null
+++ b/dev-haskell/haddock/files/haddock-2.13.1-drop-tools.patch
@@ -0,0 +1,13 @@
+--- haddock-2.13.1-orig/haddock.cabal 2012-10-11 21:56:14.000000000 +1100
++++ haddock-2.13.1/haddock.cabal 2012-10-11 22:21:37.594323046 +1100
+@@ -108,10 +108,6 @@
+
+ library
+ default-language: Haskell2010
+- -- In a GHC tree - in particular, in a source tarball - we don't
+- -- require alex or happy
+- if !flag(in-ghc-tree)
+- build-tools: alex >= 2.3, happy >= 1.18
+ build-depends:
+ base >= 4.3 && < 4.7,
+ filepath,
diff --git a/dev-haskell/haddock/files/haddock-2.13.1-renameType.patch b/dev-haskell/haddock/files/haddock-2.13.1-renameType.patch
new file mode 100644
index 000000000000..1a4abab0cbe9
--- /dev/null
+++ b/dev-haskell/haddock/files/haddock-2.13.1-renameType.patch
@@ -0,0 +1,56 @@
+--- haddock-2.13.1-orig/src/Haddock/Interface/Rename.hs 2012-10-11 21:56:13.000000000 +1100
++++ haddock-2.13.1/src/Haddock/Interface/Rename.hs 2013-01-04 10:55:06.725718923 +1100
+@@ -271,9 +271,20 @@
+
+ HsTyLit x -> return (HsTyLit x)
+
++ HsWrapTy a b -> HsWrapTy a <$> renameType b
++ HsRecTy a -> HsRecTy <$> mapM renameConDeclFieldField a
++ HsCoreTy a -> pure (HsCoreTy a)
++ HsExplicitListTy a b -> HsExplicitListTy a <$> mapM renameLType b
++ HsExplicitTupleTy a b -> HsExplicitTupleTy a <$> mapM renameLType b
++ HsQuasiQuoteTy a -> HsQuasiQuoteTy <$> renameHsQuasiQuote a
++ HsSpliceTy _ _ _ -> error "renameType: HsSpliceTy"
++
+ _ -> error "renameType"
+
+
++renameHsQuasiQuote :: HsQuasiQuote Name -> RnM (HsQuasiQuote DocName)
++renameHsQuasiQuote (HsQuasiQuote a b c) = HsQuasiQuote <$> rename a <*> pure b <*> pure c
++
+ renameLTyVarBndrs :: LHsTyVarBndrs Name -> RnM (LHsTyVarBndrs DocName)
+ renameLTyVarBndrs (HsQTvs { hsq_kvs = _, hsq_tvs = tvs })
+ = do { tvs' <- mapM renameLTyVarBndr tvs
+@@ -398,22 +409,25 @@
+ return (decl { con_name = lname', con_qvars = ltyvars', con_cxt = lcontext'
+ , con_details = details', con_res = restype', con_doc = mbldoc' })
+ where
+- renameDetails (RecCon fields) = return . RecCon =<< mapM renameField fields
++ renameDetails (RecCon fields) = return . RecCon =<< mapM renameConDeclFieldField fields
+ renameDetails (PrefixCon ps) = return . PrefixCon =<< mapM renameLType ps
+ renameDetails (InfixCon a b) = do
+ a' <- renameLType a
+ b' <- renameLType b
+ return (InfixCon a' b')
+
+- renameField (ConDeclField name t doc) = do
+- name' <- renameL name
+- t' <- renameLType t
+- doc' <- mapM renameLDocHsSyn doc
+- return (ConDeclField name' t' doc')
+-
+ renameResType (ResTyH98) = return ResTyH98
+ renameResType (ResTyGADT t) = return . ResTyGADT =<< renameLType t
+
++
++renameConDeclFieldField :: ConDeclField Name -> RnM (ConDeclField DocName)
++renameConDeclFieldField (ConDeclField name t doc) = do
++ name' <- renameL name
++ t' <- renameLType t
++ doc' <- mapM renameLDocHsSyn doc
++ return (ConDeclField name' t' doc')
++
++
+ renameSig :: Sig Name -> RnM (Sig DocName)
+ renameSig sig = case sig of
+ TypeSig lnames ltype -> do
diff --git a/dev-haskell/haddock/files/haddock-2.9.2-cabal-1.10.patch b/dev-haskell/haddock/files/haddock-2.9.2-cabal-1.10.patch
new file mode 100644
index 000000000000..8da5ceb044d5
--- /dev/null
+++ b/dev-haskell/haddock/files/haddock-2.9.2-cabal-1.10.patch
@@ -0,0 +1,13 @@
+diff --git a/haddock.cabal b/haddock.cabal
+index 2f36187..0c2aeb4 100644
+--- a/haddock.cabal
++++ b/haddock.cabal
+@@ -142,7 +142,7 @@ library
+ containers,
+ array,
+ xhtml >= 3000.2 && < 3000.3,
+- Cabal >= 1.10,
++ Cabal >= 1.10 && < 1.14,
+ ghc >= 7.0 && < 7.2
+
+ if flag(in-ghc-tree)
diff --git a/dev-haskell/haddock/haddock-2.10.0-r2.ebuild b/dev-haskell/haddock/haddock-2.10.0-r2.ebuild
new file mode 100644
index 000000000000..d3524d6832f8
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.10.0-r2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
+inherit eutils haskell-cabal pax-utils
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+# ia64 lost as we don't have ghc-7 there yet
+# ppc64 needs to be rekeyworded due to xhtml not being keyworded
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE=""
+
+RDEPEND="dev-haskell/ghc-paths[profile?]
+ =dev-haskell/xhtml-3000.2*[profile?]
+ >=dev-lang/ghc-7.4"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.14"
+
+RESTRICT="test" # avoid depends on QC
+
+CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
+
+src_prepare() {
+ # we would like to avoid happy and alex depends
+ 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."*
+ mv "dist/build/haddock/haddock-tmp/Haddock/$f.hs" src/Haddock/
+ done
+}
+
+src_configure() {
+ # create a fake haddock executable. it'll set the right version to cabal
+ # configure, but will eventually get overwritten in src_compile by
+ # the real executable.
+ local exe="${S}/dist/build/haddock/haddock"
+ mkdir -p $(dirname "${exe}")
+ echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
+ chmod +x "${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() {
+ # when building the (recursive..) haddock docs, change the datadir to the
+ # current directory, as we're using haddock inplace even if it's built to be
+ # installed into the system first.
+ haddock_datadir="${S}" haskell-cabal_src_compile
+}
+
+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 "${D}/usr/bin/${PN}"
+}
diff --git a/dev-haskell/haddock/haddock-2.13.1-r2.ebuild b/dev-haskell/haddock/haddock-2.13.1-r2.ebuild
new file mode 100644
index 000000000000..8979b4f0d0d3
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.13.1-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
+inherit eutils haskell-cabal pax-utils
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+# ia64 lost as we don't have ghc-7 there yet
+# ppc64 needs to be rekeyworded due to xhtml not being keyworded
+KEYWORDS="~alpha ~amd64 -ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="dev-haskell/ghc-paths:=[profile?]
+ =dev-haskell/xhtml-3000.2*:=[profile?]
+ >=dev-lang/ghc-7.6:= <dev-lang/ghc-7.7:="
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.14"
+
+RESTRICT="test" # avoid depends on QC
+
+CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
+
+src_prepare() {
+ # we would like to avoid happy and alex depends
+ epatch "${FILESDIR}"/${PN}-2.13.1-drop-tools.patch
+ # Fix: Ticket #213 Haddock fails when advanced typesystem features are used
+ epatch "${FILESDIR}"/${PN}-2.13.1-renameType.patch
+}
+
+src_configure() {
+ # create a fake haddock executable. it'll set the right version to cabal
+ # configure, but will eventually get overwritten in src_compile by
+ # the real executable.
+ local exe="${S}/dist/build/haddock/haddock"
+ mkdir -p $(dirname "${exe}")
+ echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
+ chmod +x "${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() {
+ # when building the (recursive..) haddock docs, change the datadir to the
+ # current directory, as we're using haddock inplace even if it's built to be
+ # installed into the system first.
+ haddock_datadir="${S}" haskell-cabal_src_compile
+}
+
+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 "${D}/usr/bin/${PN}"
+}
diff --git a/dev-haskell/haddock/haddock-2.13.2-r1.ebuild b/dev-haskell/haddock/haddock-2.13.2-r1.ebuild
new file mode 100644
index 000000000000..bef065cb5d6e
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.13.2-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
+inherit eutils haskell-cabal pax-utils
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz
+ http://dev.gentoo.org/~qnikst/patches/dev-haskell-${PN}/${P}-pregenerated-files.patch
+ "
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+# ia64 lost as we don't have ghc-7 there yet
+# ppc64 needs to be rekeyworded due to xhtml not being keyworded
+# x86-fbsd is lost due xhtml
+KEYWORDS="amd64 -ia64 x86"
+IUSE=""
+
+RDEPEND="dev-haskell/ghc-paths:=[profile?]
+ =dev-haskell/xhtml-3000.2*:=[profile?]
+ >=dev-lang/ghc-7.6:= <dev-lang/ghc-7.7:="
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.14"
+
+RESTRICT="test" # avoid depends on QC
+
+CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
+
+src_prepare() {
+ # we would like to avoid happy and alex depends
+ epatch "${DISTDIR}"/${P}-pregenerated-files.patch
+ epatch "${FILESDIR}"/${PN}-2.13.1-drop-tools.patch
+ # Fix: Ticket #213 Haddock fails when advanced typesystem features are used
+ # epatch "${FILESDIR}"/${PN}-2.13.1-renameType.patch
+ if use doc && [ ! -e "${S}/html" ]; then
+ ln -s "${S}/resources/html" "${S}/html" || die "Could not create symbolic link ${S}/html"
+ fi
+}
+
+src_configure() {
+ # create a fake haddock executable. it'll set the right version to cabal
+ # configure, but will eventually get overwritten in src_compile by
+ # the real executable.
+ local exe="${S}/dist/build/haddock/haddock"
+ mkdir -p $(dirname "${exe}")
+ echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
+ chmod +x "${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() {
+ # when building the (recursive..) haddock docs, change the datadir to the
+ # current directory, as we're using haddock inplace even if it's built to be
+ # installed into the system first.
+ haddock_datadir="${S}" haskell-cabal_src_compile
+}
+
+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 "${D}/usr/bin/${PN}"
+}
diff --git a/dev-haskell/haddock/haddock-2.13.2.1.ebuild b/dev-haskell/haddock/haddock-2.13.2.1.ebuild
new file mode 100644
index 000000000000..860799ca84d6
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.13.2.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep test-suite"
+inherit eutils haskell-cabal pax-utils
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+# ia64 lost as we don't have ghc-7 there yet
+# ppc64 needs to be rekeyworded due to xhtml not being keyworded
+# x86-fbsd is lost due xhtml
+KEYWORDS="~amd64 -ia64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/ghc-paths:=[profile?]
+ =dev-haskell/xhtml-3000.2*:=[profile?]
+ >=dev-lang/ghc-7.6:= <dev-lang/ghc-7.7:="
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.14"
+
+CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
+
+src_prepare() {
+ # we would like to avoid happy and alex depends
+ epatch "${FILESDIR}"/${PN}-2.13.1-drop-tools.patch
+ # pick pregenerated files
+ for f in Lex Parse; do
+ rm "src/Haddock/$f."* || die
+ mv "dist/build/haddock/haddock-tmp/Haddock/$f.hs" src/Haddock/ || die
+ done
+ rm -r "dist/build/"* || die
+
+ # Fix: Ticket #213 Haddock fails when advanced typesystem features are used
+ # epatch "${FILESDIR}"/${PN}-2.13.1-renameType.patch
+ if [[ ! -e "${S}/html" ]]; then
+ ln -s resources/html "${S}/html" || die "Could not create symbolic link ${S}/html"
+ fi
+}
+
+src_configure() {
+ # create a fake haddock executable. it'll set the right version to cabal
+ # configure, but will eventually get overwritten in src_compile by
+ # the real executable.
+ local exe="${S}/dist/build/haddock/haddock"
+ mkdir -p $(dirname "${exe}")
+ echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
+ chmod +x "${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() {
+ # when building the (recursive..) haddock docs, change the datadir to the
+ # current directory, as we're using haddock inplace even if it's built to be
+ # installed into the system first.
+ haddock_datadir="${S}" haskell-cabal_src_compile
+}
+
+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 "${D}/usr/bin/${PN}"
+}
diff --git a/dev-haskell/haddock/haddock-2.13.2.ebuild b/dev-haskell/haddock/haddock-2.13.2.ebuild
new file mode 100644
index 000000000000..ade1581a50fc
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.13.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
+inherit eutils haskell-cabal pax-utils
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+# ia64 lost as we don't have ghc-7 there yet
+# ppc64 needs to be rekeyworded due to xhtml not being keyworded
+# x86-fbsd is lost due xhtml
+KEYWORDS="~amd64 -ia64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/ghc-paths:=[profile?]
+ =dev-haskell/xhtml-3000.2*:=[profile?]
+ >=dev-lang/ghc-7.6:= <dev-lang/ghc-7.7:="
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.14"
+
+RESTRICT="test" # avoid depends on QC
+
+CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
+
+src_prepare() {
+ # we would like to avoid happy and alex depends
+ epatch "${FILESDIR}"/${PN}-2.13.1-drop-tools.patch
+ # Fix: Ticket #213 Haddock fails when advanced typesystem features are used
+ # epatch "${FILESDIR}"/${PN}-2.13.1-renameType.patch
+ if use doc && [ ! -e "${S}/html" ]; then
+ ln -s "${S}/resources/html" "${S}/html" || die "Could not create symbolic link ${S}/html"
+ fi
+}
+
+src_configure() {
+ # create a fake haddock executable. it'll set the right version to cabal
+ # configure, but will eventually get overwritten in src_compile by
+ # the real executable.
+ local exe="${S}/dist/build/haddock/haddock"
+ mkdir -p $(dirname "${exe}")
+ echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
+ chmod +x "${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() {
+ # when building the (recursive..) haddock docs, change the datadir to the
+ # current directory, as we're using haddock inplace even if it's built to be
+ # installed into the system first.
+ haddock_datadir="${S}" haskell-cabal_src_compile
+}
+
+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 "${D}/usr/bin/${PN}"
+}
diff --git a/dev-haskell/haddock/haddock-2.14.3.0.7.8.3.ebuild b/dev-haskell/haddock/haddock-2.14.3.0.7.8.3.ebuild
new file mode 100644
index 000000000000..6c18d5e0e342
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.14.3.0.7.8.3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.6.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour test-suite"
+CABAL_FEATURES+=" nocabaldep"
+inherit haskell-cabal pax-utils
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+#SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+SRC_URI="http://code.haskell.org/~slyfox/snapshots/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/ghc-paths:=[profile?]
+ >=dev-haskell/xhtml-3000.2:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?]
+ >=dev-lang/ghc-7.8.3:= <dev-lang/ghc-7.9:=
+"
+DEPEND="${RDEPEND}
+ test? ( dev-haskell/hspec
+ >=dev-haskell/quickcheck-2 <dev-haskell/quickcheck-3 )
+"
+
+src_prepare() {
+ if [[ ! -e "${S}/html" ]]; then
+ ln -s resources/html "${S}/html" || die "Could not create symbolic link ${S}/html"
+ fi
+}
+
+src_configure() {
+ # create a fake haddock executable. it'll set the right version to cabal
+ # configure, but will eventually get overwritten in src_compile by
+ # the real executable.
+ local exe="${S}/dist/build/haddock/haddock"
+ mkdir -p $(dirname "${exe}")
+ echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
+ chmod +x "${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 \
+ --ghc-options=-rtsopts \
+ --with-haddock="${exe}" \
+ --constraint="Cabal == $(cabal-version)"
+}
+
+src_compile() {
+ # when building the (recursive..) haddock docs, change the datadir to the
+ # current directory, as we're using haddock inplace even if it's built to be
+ # installed into the system first.
+ haddock_datadir="${S}" haskell-cabal_src_compile
+}
+
+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 "${D}/usr/bin/${PN}"
+}
diff --git a/dev-haskell/haddock/haddock-2.16.1.ebuild b/dev-haskell/haddock/haddock-2.16.1.ebuild
new file mode 100644
index 000000000000..346da40c853a
--- /dev/null
+++ b/dev-haskell/haddock/haddock-2.16.1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.4.9999
+
+CABAL_FEATURES="bin test-suite"
+CABAL_FEATURES+=" nocabaldep"
+inherit haskell-cabal pax-utils
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="http://www.haskell.org/haddock/"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RESTRICT=test # tests are outdated
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.10
+ >=dev-lang/ghc-7.4.1
+ ~dev-haskell/haddock-api-2.16.1
+"
+
+src_prepare() {
+ if [[ ! -e "${S}/html" ]]; then
+ ln -s resources/html "${S}/html" || die "Could not create symbolic link ${S}/html"
+ fi
+}
+
+src_configure() {
+ # create a fake haddock executable. it'll set the right version to cabal
+ # configure, but will eventually get overwritten in src_compile by
+ # the real executable.
+ local exe="${S}/dist/build/haddock/haddock"
+ mkdir -p $(dirname "${exe}")
+ echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
+ chmod +x "${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 \
+ --flags=-in-ghc-tree \
+ --ghc-options=-rtsopts \
+ --with-haddock="${exe}" \
+ --constraint="Cabal == $(cabal-version)"
+
+}
+
+src_compile() {
+ # when building the (recursive..) haddock docs, change the datadir to the
+ # current directory, as we're using haddock inplace even if it's built to be
+ # installed into the system first.
+ haddock_datadir="${S}" haskell-cabal_src_compile
+ pax-mark -m "${S}/dist/build/haddock"
+}
+
+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 "${D}/usr/bin/${PN}"
+}
diff --git a/dev-haskell/haddock/metadata.xml b/dev-haskell/haddock/metadata.xml
new file mode 100644
index 000000000000..8c66906af531
--- /dev/null
+++ b/dev-haskell/haddock/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>haskell</herd>
+<maintainer>
+ <email>haskell@gentoo.org</email>
+</maintainer>
+</pkgmetadata>