commit:     cc7132bd3ce1c2a4622c71e7585c0290a8ada077
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  4 21:20:17 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 21:20:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc7132bd

dev-haskell/enumerator: tweak for ghc-8.8

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/735866
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-haskell/enumerator/enumerator-0.4.20.ebuild     |  8 ++++++--
 .../enumerator/files/enumerator-0.4.20-ghc84.patch  | 21 +++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/dev-haskell/enumerator/enumerator-0.4.20.ebuild 
b/dev-haskell/enumerator/enumerator-0.4.20.ebuild
index 135477c4a95..c8d35ee60ce 100644
--- a/dev-haskell/enumerator/enumerator-0.4.20.ebuild
+++ b/dev-haskell/enumerator/enumerator-0.4.20.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
 # ebuild generated by hackport 0.3.4.9999
 
@@ -24,3 +24,7 @@ RDEPEND=">=dev-haskell/text-0.7:=[profile?]
 DEPEND="${RDEPEND}
        >=dev-haskell/cabal-1.6.0.3
 "
+
+PATCHES=(
+       "${FILESDIR}"/${P}-ghc84.patch
+)

diff --git a/dev-haskell/enumerator/files/enumerator-0.4.20-ghc84.patch 
b/dev-haskell/enumerator/files/enumerator-0.4.20-ghc84.patch
new file mode 100644
index 00000000000..d992228d2e5
--- /dev/null
+++ b/dev-haskell/enumerator/files/enumerator-0.4.20-ghc84.patch
@@ -0,0 +1,21 @@
+--- a/enumerator.cabal
++++ b/enumerator.cabal
+@@ -152,2 +152,5 @@ library
+ 
++  if !impl(ghc >= 8.0)
++    build-depends: semigroups == 0.18.*
++
+   exposed-modules:
+--- a/lib/Data/Enumerator/Internal.hs
++++ b/lib/Data/Enumerator/Internal.hs
+@@ -50,2 +50,3 @@ import           Data.Function (fix)
+ import           Data.Monoid (Monoid, mempty, mappend, mconcat)
++import qualified Data.Semigroup as S
+ 
+@@ -73,2 +74,6 @@ instance Monad Stream where
+ 
++instance S.Semigroup (Stream a) where
++      (<>) (Chunks xs) (Chunks ys) = Chunks (xs ++ ys)
++      (<>) _ _ = EOF
++
+ instance Monoid (Stream a) where

Reply via email to