diff options
Diffstat (limited to 'dev-haskell/foldl')
-rw-r--r-- | dev-haskell/foldl/Manifest | 4 | ||||
-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, 144 insertions, 0 deletions
diff --git a/dev-haskell/foldl/Manifest b/dev-haskell/foldl/Manifest index f4c5102b31dc..65f6f9634fdf 100644 --- a/dev-haskell/foldl/Manifest +++ b/dev-haskell/foldl/Manifest @@ -1,3 +1,7 @@ +AUX foldl-1.4.12-cabal-doctest.patch 2371 BLAKE2B e3a402b7bbd433e2744810f56aa9d467a72d90941ee8b7d760c4a56513f8aff75aadc34e6b9bf1fd7cd573078d774df92401c44d04cf82161f9c334bb3930ad6 SHA512 773aaf5ddd1743398fd26a33702455de1bd470130855e763c3352006e8f0ea67ad5599efda38878f2572023e9d3fb5209f5e6efb4e3ae68dd381602ee5995dec +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 +EBUILD foldl-1.4.12.ebuild 1738 BLAKE2B 78b9522754ec18b2c0b938397ee96c9aa426880de452238c3053c52451d782e0f3306637700a27d7a7b1092c999379ecd01263680dee98c1e923a6da6c6cfca7 SHA512 6e54094260cb2ab3bca8fc5233dae160b333da9ce40b70034e739ede2f2bacc876a3d19bda3ace9a472d6b82a6a47c252061596b7315f40ebbbaed91a7f89871 EBUILD foldl-1.4.7.ebuild 1448 BLAKE2B 3c5dad0ede5d45cacf16861957de80545b4593ba9cd6634fbc41230b6af367bb2c749b6ff3def80c223c49ac1e76e017c45ab7e342b293c03f6e47e4bf608c47 SHA512 34c44b52fe87cf777764c9ced704d76d850705f4be53b8b634059e6cdcef4e3ecdab75417076ca841e1af663d9a99b1409d0e789c7cfc9fe73fd191de1a86711 MISC metadata.xml 546 BLAKE2B 671ba01a8895c38c93d2bc5d5ca16470c8e14557a19cc96e6122b11a147dfa8da2247c6a780d412e609c59fbc0314c1a2b65ea80a2783be3f4b784cde9462704 SHA512 5c329503486cadd2127fd72c09e9c1bf4a06ea5bb2c65390ae21784ea0db74ccc81b9118829180c6991f57fe91cd445180513797e63563a26cbd23bb218dc9fe 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 +} |