diff options
author | matoro <matoro@users.noreply.github.com> | 2022-07-12 00:01:00 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-22 22:15:07 +0000 |
commit | 9129479609e3700541bcb00b43a4e4b50f311384 (patch) | |
tree | 03b6b7a9586bb5e444fa6365826a4ff8c1c3f107 /dev-haskell/foldl | |
parent | dev-haskell/fingertree: keyword 0.1.4.2 for ~ppc64 (diff) | |
download | gentoo-9129479609e3700541bcb00b43a4e4b50f311384.tar.gz gentoo-9129479609e3700541bcb00b43a4e4b50f311384.tar.bz2 gentoo-9129479609e3700541bcb00b43a4e4b50f311384.zip |
dev-haskell/foldl: add 1.4.12
Signed-off-by: matoro <matoro@users.noreply.github.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-haskell/foldl')
-rw-r--r-- | dev-haskell/foldl/Manifest | 2 | ||||
-rw-r--r-- | dev-haskell/foldl/files/foldl-1.4.12-cabal-doctest.patch | 83 | ||||
-rw-r--r-- | dev-haskell/foldl/foldl-1.4.12.ebuild | 57 |
3 files changed, 142 insertions, 0 deletions
diff --git a/dev-haskell/foldl/Manifest b/dev-haskell/foldl/Manifest index 16dbde48ee43..6e61bd33df9a 100644 --- a/dev-haskell/foldl/Manifest +++ b/dev-haskell/foldl/Manifest @@ -1 +1,3 @@ +DIST foldl-1.4.12-rev2.cabal 2668 BLAKE2B 4255e285bade060ee547a96c6db7a7d92b85bde3ca0f496fa7750b42df7e6382adbaa1ee7c2c8327f39eec6aba3eb44b7d29c9213e6595160bd8743fd364f73e SHA512 44ff1cb8f31c9770d78139053f2f31dcba76998339a9d07cd681994a0c34d862a750de2e5afa3b42a16528f38a6f9007a5481b9b52b481258006cd8466060ca1 +DIST foldl-1.4.12.tar.gz 23210 BLAKE2B bbdd9a0b74d5b27b4b8800090a1b2dc717d023d860af8f26846a86866756211b30c755f6a1c3e604d6d1db91e5afa35ee943e014672c0a6e65712e0fbcfd29d0 SHA512 6b345b59c52039e914ea703ab88a08a8bba0a18bea91fcf4cf379ce678e5a97044f563c7b285cb656a764068756b4fae8321308e86813f86d04c462e9889e6e0 DIST foldl-1.4.7.tar.gz 21602 BLAKE2B 617f16b0b5ce18c12d5807daf973beb7e5fcd01591ff057d6ec66e8c6fae3cec140949ac87bd5c7d23bbd5ac86cd4355f5c96b8f4d703fa26f291975ff6bac8c SHA512 e1c8569214ee58d1d5333018a50832e8be53fa2751c18b5d93c7c8d393f722248050fc56c6a5243a0f9f8ff94a0cd2f475c03107e70d601bf6bf3a81c509b58d diff --git a/dev-haskell/foldl/files/foldl-1.4.12-cabal-doctest.patch b/dev-haskell/foldl/files/foldl-1.4.12-cabal-doctest.patch new file mode 100644 index 000000000000..648b8f77cbc3 --- /dev/null +++ b/dev-haskell/foldl/files/foldl-1.4.12-cabal-doctest.patch @@ -0,0 +1,83 @@ +diff -urN foldl-1.4.12/Setup.hs foldl-1.4.12-r1/Setup.hs +--- foldl-1.4.12/Setup.hs 2001-09-08 19:46:40.000000000 -0600 ++++ foldl-1.4.12-r1/Setup.hs 2022-03-23 03:20:48.427151688 -0600 +@@ -1,2 +1,6 @@ +-import Distribution.Simple +-main = defaultMain ++module Main (main) where ++ ++import Distribution.Extra.Doctest ( defaultMainWithDoctests ) ++ ++main :: IO () ++main = defaultMainWithDoctests "doctest" +diff -urN foldl-1.4.12/foldl.cabal foldl-1.4.12-r1/foldl.cabal +--- foldl-1.4.12/foldl.cabal 2022-03-23 03:17:07.317151581 -0600 ++++ foldl-1.4.12-r1/foldl.cabal 2022-03-23 03:20:10.187151669 -0600 +@@ -2,7 +2,7 @@ + Version: 1.4.12 + x-revision: 2 + Cabal-Version: >=1.10 +-Build-Type: Simple ++Build-Type: Custom + License: BSD3 + License-File: LICENSE + Copyright: 2013 Gabriel Gonzalez +@@ -22,6 +22,12 @@ + Type: git + Location: https://github.com/Gabriel439/Haskell-Foldl-Library + ++custom-setup ++ setup-depends: ++ base ++ , Cabal ++ , cabal-doctest ++ + Library + HS-Source-Dirs: src + Build-Depends: +@@ -83,6 +89,9 @@ + Main-Is: doctest.hs + Build-Depends: + base, +- doctest >= 0.16 ++ doctest >= 0.16, ++ directory, ++ filepath, ++ base-compat + GHC-Options: -threaded + Default-Language: Haskell2010 +diff -urN foldl-1.4.12/test/doctest.hs foldl-1.4.12-r1/test/doctest.hs +--- foldl-1.4.12/test/doctest.hs 2001-09-08 19:46:40.000000000 -0600 ++++ foldl-1.4.12-r1/test/doctest.hs 2022-03-23 03:22:41.077151743 -0600 +@@ -1,4 +1,29 @@ + import Test.DocTest ++import GHC.IO.Encoding (setLocaleEncoding) ++import System.Directory (getCurrentDirectory, makeAbsolute) ++import System.FilePath.Posix ((</>)) ++import System.IO (utf8) ++import Build_doctests (pkgs) ++ ++main = do ++ setLocaleEncoding utf8 ++ pwd <- getCurrentDirectory ++ prefix <- makeAbsolute pwd + +-main :: IO () +-main = doctest ["-isrc", "src/Control/Foldl.hs", "src/Control/Scanl.hs"] ++ let customFlags = ++ [ "-package-env=-" ++ , "-hide-all-packages" ++ , "-no-user-package-db" ++ , "-package-db=" ++ prefix </> "dist/package.conf.inplace" ++ ] ++ ++ let origFlags = ++ [ "-isrc" ++ ] ++ ++ let modules = ++ [ "src/Control/Foldl.hs" ++ , "src/Control/Scanl.hs" ++ ] ++ ++ doctest $ customFlags ++ pkgs ++ origFlags ++ modules diff --git a/dev-haskell/foldl/foldl-1.4.12.ebuild b/dev-haskell/foldl/foldl-1.4.12.ebuild new file mode 100644 index 000000000000..41ff5e4150e6 --- /dev/null +++ b/dev-haskell/foldl/foldl-1.4.12.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# ebuild generated by hackport 0.7.1.1.9999 + +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" +CABAL_HACKAGE_REVISION="2" +inherit haskell-cabal + +CABAL_FILE="${S}/${PN}.cabal" +CABAL_DISTFILE="${P}-rev${CABAL_HACKAGE_REVISION}.cabal" + +DESCRIPTION="Composable, streaming, and efficient left folds" +HOMEPAGE="https://hackage.haskell.org/package/foldl" +SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz + https://hackage.haskell.org/package/${P}/revision/${CABAL_HACKAGE_REVISION}.cabal + -> ${CABAL_DISTFILE}" + +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~ppc64 ~x86" + +PATCHES=( "${FILESDIR}/${PN}-1.4.12-cabal-doctest.patch" ) + +RDEPEND=">=dev-haskell/comonad-4.0:=[profile?] <dev-haskell/comonad-6:=[profile?] + <dev-haskell/contravariant-1.6:=[profile?] + <dev-haskell/hashable-1.5:=[profile?] + <dev-haskell/primitive-0.8:=[profile?] + <dev-haskell/profunctors-5.7:=[profile?] + >=dev-haskell/random-1.2:=[profile?] <dev-haskell/random-1.3:=[profile?] + >=dev-haskell/semigroupoids-1.0:=[profile?] <dev-haskell/semigroupoids-5.4:=[profile?] + <dev-haskell/unordered-containers-0.3:=[profile?] + >=dev-haskell/vector-0.7:=[profile?] <dev-haskell/vector-0.13:=[profile?] + >=dev-lang/ghc-8.4.3:= +" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-2.2.0.1 + dev-haskell/cabal-doctest + test? ( + >=dev-haskell/doctest-0.16 + dev-haskell/base-compat + ) +" +BDEPEND="app-text/dos2unix" + +src_prepare() { + # pull revised cabal from upstream + cp "${DISTDIR}/${CABAL_DISTFILE}" "${CABAL_FILE}" || die + + # Convert to unix line endings + dos2unix "${CABAL_FILE}" || die + + # Apply patches *after* pulling the revised cabal + default +} |