commit: 69e72a68abc058f71b3872aafed445fc35f9b3dd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 23 21:03:59 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 23 21:06:51 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69e72a68
dev-haskell/haddock-api: add 2.24.0-r1, 2.25.1 (sync w/ ::haskell)
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-haskell/haddock-api/Manifest | 1 +
.../haddock-api-2.24.0-haddock-library-1.10.patch | 124 +++++++++++++++++++++
.../haddock-api/haddock-api-2.24.0-r1.ebuild | 43 +++++++
dev-haskell/haddock-api/haddock-api-2.25.1.ebuild | 42 +++++++
4 files changed, 210 insertions(+)
diff --git a/dev-haskell/haddock-api/Manifest b/dev-haskell/haddock-api/Manifest
index de50c543982e..1f7065c4e401 100644
--- a/dev-haskell/haddock-api/Manifest
+++ b/dev-haskell/haddock-api/Manifest
@@ -1,2 +1,3 @@
DIST haddock-api-2.23.1.tar.gz 200096 BLAKE2B
0635881e198c1df3690f07185da7cc49f8eb92283d99c581756c86fb9f293b28608ac3eea9090abcc3afa12c646e584939df9b8c38b4844e9c462824426019f5
SHA512
fb7826102476a3f292da336f8f16c7a647df7c4432bed905815509fff0df164255c0856cc17663bb42479114ed9a418e6bcd214fb8594b245d401c9e091ac4ef
DIST haddock-api-2.24.0.tar.gz 200478 BLAKE2B
5c4f7be45066583e3d3afa0b1866070f2c05d71685526b0d915461f75208f13cf6bbf2b91cc820e1f229df9dbf240cfef150fb3a9929878cfdc02db9dc124c99
SHA512
dfbe5bcfd722dc92ec70aca2dd681da9e122f60ec3da5c9583c188f65b11bade314c64d4af1a3a51cf8f618d8bea943bd4052aa9860ece38ab10717b484ed057
+DIST haddock-api-2.25.1.tar.gz 208616 BLAKE2B
4ee682e797f6d8790ba83f53111263b07ce4080809d2aa8306123e04dd0d5472822b45ad8f09bcd4d4a4cf01e4462cfe8f6ed683b6468e2870d43f02bc761717
SHA512
ce34eb986733f3cc8338781054ff4d88f7fcdefed476a8a9861657306ffd8d89e7768b2640f354257fd2db336c5d66bd0acdd1676ad401422d785847277d914f
diff --git
a/dev-haskell/haddock-api/files/haddock-api-2.24.0-haddock-library-1.10.patch
b/dev-haskell/haddock-api/files/haddock-api-2.24.0-haddock-library-1.10.patch
new file mode 100644
index 000000000000..1627b73eba9d
--- /dev/null
+++
b/dev-haskell/haddock-api/files/haddock-api-2.24.0-haddock-library-1.10.patch
@@ -0,0 +1,124 @@
+--- a/src/Haddock/Backends/Hoogle.hs
++++ b/src/Haddock/Backends/Hoogle.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ {-# LANGUAGE FlexibleContexts #-}
+ {-# LANGUAGE TypeFamilies #-}
+ -----------------------------------------------------------------------------
+@@ -326,7 +327,11 @@ markupTag dflags = Markup {
+ markupAppend = (++),
+ markupIdentifier = box (TagInline "a") . str . out dflags,
+ markupIdentifierUnchecked = box (TagInline "a") . str . showWrapped (out
dflags . snd),
++#if MIN_VERSION_haddock_library(1,10,0)
++ markupModule = box (TagInline "a") . str . modLinkName,
++#else
+ markupModule = box (TagInline "a") . str,
++#endif
+ markupWarning = box (TagInline "i"),
+ markupEmphasis = box (TagInline "i"),
+ markupBold = box (TagInline "b"),
+--- a/src/Haddock/Backends/LaTeX.hs
++++ b/src/Haddock/Backends/LaTeX.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
+ {-# LANGUAGE RecordWildCards #-}
+ {-# LANGUAGE TypeFamilies #-}
+@@ -1206,7 +1207,11 @@ latexMarkup = Markup
+ , markupAppend = \l r v -> l v . r v
+ , markupIdentifier = \i v -> inlineElem (markupId v (fmap occName
i))
+ , markupIdentifierUnchecked = \i v -> inlineElem (markupId v (fmap snd i))
++#if MIN_VERSION_haddock_library(1,10,0)
++ , markupModule = \m _ -> inlineElem (let (mdl,_ref) = break
(=='#') (modLinkName m) in (tt (text mdl)))
++#else
+ , markupModule = \m _ -> inlineElem (let (mdl,_ref) = break
(=='#') m in (tt (text mdl)))
++#endif
+ , markupWarning = \p v -> p v
+ , markupEmphasis = \p v -> inlineElem (emph (p v empty))
+ , markupBold = \p v -> inlineElem (bold (p v empty))
+--- a/src/Haddock/Backends/Xhtml/DocMarkup.hs
++++ b/src/Haddock/Backends/Xhtml/DocMarkup.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ -----------------------------------------------------------------------------
+ -- |
+ -- Module : Haddock.Backends.Html.DocMarkup
+@@ -44,7 +45,11 @@ parHtmlMarkup qual insertAnchors ppId = Markup {
+ markupAppend = (+++),
+ markupIdentifier = thecode . ppId insertAnchors,
+ markupIdentifierUnchecked = thecode . ppUncheckedLink qual,
++#if MIN_VERSION_haddock_library(1,10,0)
++ markupModule = \m -> let (mdl,ref) = break (=='#')
(modLinkName m)
++#else
+ markupModule = \m -> let (mdl,ref) = break (=='#') m
++#endif
+ -- Accomodate for old style
+ -- foo\#bar anchors
+ mdl' = case reverse mdl of
+--- a/src/Haddock/Interface/LexParseRn.hs
++++ b/src/Haddock/Interface/LexParseRn.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ {-# OPTIONS_GHC -Wwarn #-}
+ {-# LANGUAGE BangPatterns #-}
+ {-# LANGUAGE ViewPatterns #-}
+@@ -148,7 +149,11 @@ rename dflags gre = rn
+ DocDefList list -> DocDefList <$> traverse (\(a, b) -> (,) <$> rn a <*>
rn b) list
+ DocCodeBlock doc -> DocCodeBlock <$> rn doc
+ DocIdentifierUnchecked x -> pure (DocIdentifierUnchecked x)
++#if MIN_VERSION_haddock_library(1,10,0)
++ DocModule (ModLink m l) -> DocModule . ModLink m <$> traverse rn l
++#else
+ DocModule str -> pure (DocModule str)
++#endif
+ DocHyperlink (Hyperlink u l) -> DocHyperlink . Hyperlink u <$> traverse
rn l
+ DocPic str -> pure (DocPic str)
+ DocMathInline str -> pure (DocMathInline str)
+--- a/src/Haddock/InterfaceFile.hs
++++ b/src/Haddock/InterfaceFile.hs
+@@ -521,9 +521,16 @@ instance (Binary mod, Binary id) => Binary (DocH mod id)
where
+ put_ bh (DocIdentifier ae) = do
+ putByte bh 4
+ put_ bh ae
++#if MIN_VERSION_haddock_library(1,10,0)
++ put_ bh (DocModule (ModLink af bf)) = do
++ putByte bh 5
++ put_ bh af
++ put_ bh bf
++#else
+ put_ bh (DocModule af) = do
+ putByte bh 5
+ put_ bh af
++#endif
+ put_ bh (DocEmphasis ag) = do
+ putByte bh 6
+ put_ bh ag
+@@ -598,8 +605,14 @@ instance (Binary mod, Binary id) => Binary (DocH mod id)
where
+ ae <- get bh
+ return (DocIdentifier ae)
+ 5 -> do
++#if MIN_VERSION_haddock_library(1,10,0)
++ af <- get bh
++ bf <- get bh
++ return (DocModule (ModLink af bf))
++#else
+ af <- get bh
+ return (DocModule af)
++#endif
+ 6 -> do
+ ag <- get bh
+ return (DocEmphasis ag)
+--- a/src/Haddock/Types.hs
++++ b/src/Haddock/Types.hs
+@@ -466,7 +466,11 @@ instance (NFData a, NFData mod)
+ DocParagraph a -> a `deepseq` ()
+ DocIdentifier a -> a `deepseq` ()
+ DocIdentifierUnchecked a -> a `deepseq` ()
++#if MIN_VERSION_haddock_library(1,10,0)
++ DocModule (ModLink a b) -> a `deepseq` b `deepseq` ()
++#else
+ DocModule a -> a `deepseq` ()
++#endif
+ DocWarning a -> a `deepseq` ()
+ DocEmphasis a -> a `deepseq` ()
+ DocBold a -> a `deepseq` ()
diff --git a/dev-haskell/haddock-api/haddock-api-2.24.0-r1.ebuild
b/dev-haskell/haddock-api/haddock-api-2.24.0-r1.ebuild
new file mode 100644
index 000000000000..2d6ebc78f6e8
--- /dev/null
+++ b/dev-haskell/haddock-api/haddock-api-2.24.0-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CABAL_FEATURES="lib hoogle hscolour profile test-suite" # haddock
+inherit haskell-cabal
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="https://www.haskell.org/haddock/"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+# keep in sync with ghc-8.10
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=">=dev-haskell/ghc-paths-0.1.0.9:=[profile?]
<dev-haskell/ghc-paths-0.2:=[profile?]
+ >=dev-haskell/haddock-library-1.9.0:=[profile?]
+ >=dev-haskell/xhtml-3000.2.2:=[profile?]
<dev-haskell/xhtml-3000.3:=[profile?]
+ >=dev-lang/ghc-8.10.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-3.0.0.0
+ test? ( >=dev-haskell/ghc-paths-0.1.0.12 <dev-haskell/ghc-paths-0.2
+ >=dev-haskell/hspec-2.4.4 <dev-haskell/hspec-2.8
+ >=dev-haskell/quickcheck-2.11
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-ghc-8.10.2.patch
+ "${FILESDIR}"/${P}-haddock-library-1.10.patch
+)
+
+src_prepare () {
+ default
+
+ cabal_chdeps \
+ 'QuickCheck >= 2.11 && < 2.14' 'QuickCheck >= 2.11' \
+ 'haddock-library ^>= 1.9.0' 'haddock-library >= 1.9.0'
+}
diff --git a/dev-haskell/haddock-api/haddock-api-2.25.1.ebuild
b/dev-haskell/haddock-api/haddock-api-2.25.1.ebuild
new file mode 100644
index 000000000000..8cd0abc5df68
--- /dev/null
+++ b/dev-haskell/haddock-api/haddock-api-2.25.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# ebuild generated by hackport 0.7
+
+CABAL_FEATURES="lib profile hoogle hscolour test-suite" # haddock
+inherit haskell-cabal
+
+DESCRIPTION="A documentation-generation tool for Haskell libraries"
+HOMEPAGE="https://www.haskell.org/haddock/"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0/${PV}"
+#keep in sync with ghc-9.0.2
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="dev-haskell/exceptions:=[profile?]
+ >=dev-haskell/ghc-paths-0.1.0.9:=[profile?]
<dev-haskell/ghc-paths-0.2:=[profile?]
+ >=dev-haskell/haddock-library-1.10.0:=[profile?]
<dev-haskell/haddock-library-1.11:=[profile?]
+ dev-haskell/mtl:=[profile?]
+ >=dev-haskell/parsec-3.1.13.0:=[profile?]
<dev-haskell/parsec-3.2:=[profile?]
+ >=dev-haskell/xhtml-3000.2.2:=[profile?]
<dev-haskell/xhtml-3000.3:=[profile?]
+ >=dev-lang/ghc-9.0.2:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-3.4.1.0
+ test? ( >=dev-haskell/ghc-paths-0.1.0.12 <dev-haskell/ghc-paths-0.2
+ >=dev-haskell/hspec-2.4.4
+ >=dev-haskell/hspec-discover-2.4.4
+ >=dev-haskell/quickcheck-2.14 <dev-haskell/quickcheck-2.15 )
+"
+
+src_prepare() {
+ default
+
+ cabal_chdeps \
+ 'hspec >= 2.4.4 && < 2.8' 'hspec >=2.4.4' \
+ 'hspec-discover:hspec-discover >= 2.4.4 && < 2.8'
'hspec-discover:hspec-discover >= 2.4.4'
+}