diff options
Diffstat (limited to 'dev-haskell/foldl')
-rw-r--r-- | dev-haskell/foldl/Manifest | 3 | ||||
-rw-r--r-- | dev-haskell/foldl/files/foldl-1.4.15-cabal-doctest.patch | 116 | ||||
-rw-r--r-- | dev-haskell/foldl/foldl-1.4.15.ebuild | 17 |
3 files changed, 130 insertions, 6 deletions
diff --git a/dev-haskell/foldl/Manifest b/dev-haskell/foldl/Manifest index 54d1603fc360..8f741c43ecd1 100644 --- a/dev-haskell/foldl/Manifest +++ b/dev-haskell/foldl/Manifest @@ -1,7 +1,8 @@ AUX foldl-1.4.12-cabal-doctest.patch 2371 BLAKE2B e3a402b7bbd433e2744810f56aa9d467a72d90941ee8b7d760c4a56513f8aff75aadc34e6b9bf1fd7cd573078d774df92401c44d04cf82161f9c334bb3930ad6 SHA512 773aaf5ddd1743398fd26a33702455de1bd470130855e763c3352006e8f0ea67ad5599efda38878f2572023e9d3fb5209f5e6efb4e3ae68dd381602ee5995dec +AUX foldl-1.4.15-cabal-doctest.patch 2873 BLAKE2B dab6f10dd8edff86eb349ecc9cfafea2aaa03c625cc799fc135c5efe12d1073176dc1ada7b2d1469bd9b6cc7a3666c6b58311ff0b6d5a2efc0e0385ae5f0b46e SHA512 1c7a5fa3a8993111e788e8c6a04a1d571b481c6db752932d6c2063dca0d1253547ef44691f42647a3748bed0405641fad025417f4d675217eadb5c6b1ad46e21 DIST foldl-1.4.12-rev5.cabal 2682 BLAKE2B 616f3b1d69892cdf30039db5c82842d858b58d227f96e301b594e51b2052c7f423264b11a82c82669cc736b337dca901e242177064b0bf2b4cf128da619935b2 SHA512 394fe8ba15a59a270bc70deed3438a2d1e5193bfa3ec266dbdc3bac48e0b32279cbaab6dfb550cc551f48ce466a9bc553d1ea3748f90836f95f158818d267bd5 DIST foldl-1.4.12.tar.gz 23210 BLAKE2B bbdd9a0b74d5b27b4b8800090a1b2dc717d023d860af8f26846a86866756211b30c755f6a1c3e604d6d1db91e5afa35ee943e014672c0a6e65712e0fbcfd29d0 SHA512 6b345b59c52039e914ea703ab88a08a8bba0a18bea91fcf4cf379ce678e5a97044f563c7b285cb656a764068756b4fae8321308e86813f86d04c462e9889e6e0 DIST foldl-1.4.15.tar.gz 24449 BLAKE2B c8656bc7231e110dccf44e465acf33f9a61ad91020c8cb0b27debacde2ed4ba8c0de98d17c47db3218de4b56f3f026a8da74d092caca0b9fa66db4998a3017d4 SHA512 a0fb401313d8cb1911cc64e93cee7446a1785fac531f77b5f56a1165617c8adca8470be8a60555a07b48156924c657f4eee3094ad7a043fc383b459fa0006328 EBUILD foldl-1.4.12-r1.ebuild 1263 BLAKE2B 9cbd3f9c0fbb64fe85aadceb480b9a152f6e846822ea057f5b822c18e3bfe313fc20f0dd63327d5c84b59f4fb0d599c191877eb7db086a7cbf5f20764197e79a SHA512 0bcf660241a8220de33ff59ced994c7e317942be69229b95ebd7aeb18c17c1680317b445c903c9f48328cf51af629ffc6a8003b28e4c11204f616f24732bee42 -EBUILD foldl-1.4.15.ebuild 1306 BLAKE2B b201d0971e596ac5d6b8d6e365c7d3a3d2beb79805eea8687bb66b3102b30e37f94cf8e56bb2bde0021292eb6a99f4f132e9bff579a88dd7232cdaa9e555a9f9 SHA512 39f8285e88f30609e443732fc8e1d58a8356ccd2ea19989346ee0ac15d95f417d57a835d178bed84a15043949bd59b5f29a5728cf0b8452101932bcc972146e1 +EBUILD foldl-1.4.15.ebuild 1416 BLAKE2B 98a52b37acf3b3e37fc7cc77de316d32850f23b7ed056b420ab1e1e19449aef2bb5f3234adbb5734784068804b124bbcfecb8d429e7d5d0ed0b855da51e8f126 SHA512 97c8b92184129c873f0d9032cbd3554945075898ce0cf85c040dc72490ee4b69412639e9f8d645ca4acd7e8c3fabc43c1f47b78ded6627915ed6a03adeccabfa MISC metadata.xml 395 BLAKE2B 35f4dce554ba0deeabbaee512a6af38f9df03eff02b79ced67e8e6ee420ad1db7270df1a78234d33b79071d4714c04133d2f5acbede7620f5b6428131764176a SHA512 d82ac0058506944eef9034dd8bcde16ebe521f44a82b4748ee46c7d2babd033dc5416b9d0535c35e6ba55ca166b84c05931b9d480b8ca681d784cff5ebe6c2a6 diff --git a/dev-haskell/foldl/files/foldl-1.4.15-cabal-doctest.patch b/dev-haskell/foldl/files/foldl-1.4.15-cabal-doctest.patch new file mode 100644 index 000000000000..6c554607eff5 --- /dev/null +++ b/dev-haskell/foldl/files/foldl-1.4.15-cabal-doctest.patch @@ -0,0 +1,116 @@ +From 7dc9bf5a311c56408f5f102c09d36ab127e64b94 Mon Sep 17 00:00:00 2001 +From: hololeap <hololeap@protonmail.com> +Date: Sat, 4 Nov 2023 14:43:01 -0600 +Subject: [PATCH 1/1] Migrate to cabal-doctest + +doctest pulls in the out-of-scope packages if they are installed on the +system. The best current workaround is to migrate to cabal-doctest. + +Bug: https://bugs.gentoo.org/916851 +Signed-off-by: hololeap <hololeap@protonmail.com> +--- + Setup.hs | 17 +++++++++++++++++ + foldl.cabal | 13 +++++++++++-- + test/doctest.hs | 29 +++++++++++++++++++++++++++-- + 3 files changed, 55 insertions(+), 4 deletions(-) + +diff --git a/Setup.hs b/Setup.hs +index 9a994af..f21ad76 100644 +--- a/Setup.hs ++++ b/Setup.hs +@@ -1,2 +1,19 @@ ++{-# LANGUAGE CPP #-} ++ ++module Main (main) where ++ ++#if MIN_VERSION_cabal_doctest(1,0,0) ++ ++import Distribution.Extra.Doctest ( defaultMainWithDoctests ) ++ ++main :: IO () ++main = defaultMainWithDoctests "doctest" ++ ++#else ++ + import Distribution.Simple ++ ++main :: IO () + main = defaultMain ++ ++#endif +diff --git a/foldl.cabal b/foldl.cabal +index 08715aa..ec2983e 100644 +--- a/foldl.cabal ++++ b/foldl.cabal +@@ -1,7 +1,7 @@ + Name: foldl + Version: 1.4.15 + Cabal-Version: >=1.10 +-Build-Type: Simple ++Build-Type: Custom + License: BSD3 + License-File: LICENSE + Copyright: 2013 Gabriella Gonzalez +@@ -21,6 +21,12 @@ Source-Repository head + Type: git + Location: https://github.com/Gabriella439/Haskell-Foldl-Library + ++custom-setup ++ setup-depends: ++ base ++ , Cabal ++ , cabal-doctest >= 1.0.0 ++ + Library + HS-Source-Dirs: src + Build-Depends: +@@ -83,6 +89,9 @@ Test-Suite doctest + Main-Is: doctest.hs + Build-Depends: + base, +- doctest >= 0.16 ++ doctest >= 0.16, ++ directory, ++ filepath, ++ base-compat + GHC-Options: -threaded + Default-Language: Haskell2010 +diff --git a/test/doctest.hs b/test/doctest.hs +index 5981eb4..847b897 100644 +--- a/test/doctest.hs ++++ b/test/doctest.hs +@@ -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 +-- +2.41.0 + diff --git a/dev-haskell/foldl/foldl-1.4.15.ebuild b/dev-haskell/foldl/foldl-1.4.15.ebuild index bc6602decc62..b18f0c7da8e3 100644 --- a/dev-haskell/foldl/foldl-1.4.15.ebuild +++ b/dev-haskell/foldl/foldl-1.4.15.ebuild @@ -15,10 +15,8 @@ LICENSE="BSD" SLOT="0/${PV}" KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" -PATCHES=( "${FILESDIR}/${PN}-1.4.12-cabal-doctest.patch" ) - -GHC_BOOTSTRAP_PACKAGES=( - cabal-doctest +PATCHES=( + "${FILESDIR}/${PN}-1.4.15-cabal-doctest.patch" ) RDEPEND=">=dev-haskell/comonad-4.0:=[profile?] <dev-haskell/comonad-6:=[profile?] @@ -35,5 +33,14 @@ RDEPEND=">=dev-haskell/comonad-4.0:=[profile?] <dev-haskell/comonad-6:=[profile? " DEPEND="${RDEPEND} >=dev-haskell/cabal-3.0.0.0 - test? ( >=dev-haskell/doctest-0.16 ) + test? ( + >=dev-haskell/cabal-doctest-1.0.0 + >=dev-haskell/doctest-0.16 + ) " + +src_configure() { + use test && export GHC_BOOTSTRAP_PACKAGES+=( cabal-doctest ) + + haskell-cabal_src_configure +} |