summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatoro <matoro@users.noreply.github.com>2022-07-11 21:17:18 -0400
committerSam James <sam@gentoo.org>2022-07-22 22:16:00 +0000
commitbddadb7ee7e4c3e224a7520b209288f114d62ce2 (patch)
treef7aba2194985a577eb34053ed5be0b309e845de8 /dev-haskell/vector
parentdev-haskell/vault: add 0.3.1.5 (diff)
downloadgentoo-bddadb7ee7e4c3e224a7520b209288f114d62ce2.tar.gz
gentoo-bddadb7ee7e4c3e224a7520b209288f114d62ce2.tar.bz2
gentoo-bddadb7ee7e4c3e224a7520b209288f114d62ce2.zip
dev-haskell/vector: add 0.12.3.1
Signed-off-by: matoro <matoro@users.noreply.github.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-haskell/vector')
-rw-r--r--dev-haskell/vector/Manifest2
-rw-r--r--dev-haskell/vector/files/vector-0.12.3.1-cabal-doctest.patch86
-rw-r--r--dev-haskell/vector/vector-0.12.3.1.ebuild67
3 files changed, 155 insertions, 0 deletions
diff --git a/dev-haskell/vector/Manifest b/dev-haskell/vector/Manifest
index 908cbe6f2ec2..12ff1b18a1eb 100644
--- a/dev-haskell/vector/Manifest
+++ b/dev-haskell/vector/Manifest
@@ -1 +1,3 @@
DIST vector-0.12.1.2.tar.gz 131049 BLAKE2B d77981f49b89cab1aefa3237d87e84ae36c4586c20ca3f359c0855e3f3e15b8087849590bde06bd2017d83d92d8ff03ff1b9d8d949ceab382865707f16c723b0 SHA512 36d0237cf7c5a6b78f88b33ff09ea8b19baeaf85609efdeba9ab802ca588956457d4607304b73e8d58e9e802a9101c23da62caee71508f069047a6d531e50170
+DIST vector-0.12.3.1-rev1.cabal 7946 BLAKE2B f1545c06c3a2ce405c9bc498e471b640fa415acd3413fbb3514fd0ea9422f4c7d51ee9ff8b6041da842c45a156132f6eebf89ea11b843835fd360b7c1dafa8f3 SHA512 292df3231e4f34bc038efa769928813808e562553188547420a83a5d068e5d591a169957ef50da42da66b5ba9eea12408b3e739f0f9edb76f06977d6b75a4843
+DIST vector-0.12.3.1.tar.gz 151420 BLAKE2B 1d3bb37f1c2b7f3c74e8a934d855b0f1742df03f8526a8b7632d1f940abeeef5a03e476340a96840c9486aeafc404463bff078eb28db9176bc8989b554e87ac4 SHA512 bf117d53c7844c010dc1cee8b778851bd714155fd34e671ae2eb7bd324427de972389eb9f3f315832f20e7bbbecc93ec0f6296ab10e4935957d2a4e14c6cfd98
diff --git a/dev-haskell/vector/files/vector-0.12.3.1-cabal-doctest.patch b/dev-haskell/vector/files/vector-0.12.3.1-cabal-doctest.patch
new file mode 100644
index 000000000000..72f56dcb64de
--- /dev/null
+++ b/dev-haskell/vector/files/vector-0.12.3.1-cabal-doctest.patch
@@ -0,0 +1,86 @@
+From: hololeap <hololeap@protonmail.com>
+Signed-off-by: hololeap <hololeap@protonmail.com>
+Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/1231
+
+doctest pulls in the out-of-scope packages if they are installed on the
+system. The best workaround is to use migrate to cabal-doctest.
+
+diff -urN vector-0.12.3.1/Setup.hs vector-0.12.3.1-r1/Setup.hs
+--- vector-0.12.3.1/Setup.hs 2021-09-21 10:02:15.000000000 -0600
++++ vector-0.12.3.1-r1/Setup.hs 2022-03-22 22:12:57.107142731 -0600
+@@ -1,3 +1,6 @@
+-import Distribution.Simple
+-main = defaultMain
++module Main (main) where
+
++import Distribution.Extra.Doctest ( defaultMainWithDoctests )
++
++main :: IO ()
++main = defaultMainWithDoctests "vector-doctest"
+diff -urN vector-0.12.3.1/tests/doctests.hs vector-0.12.3.1-r1/tests/doctests.hs
+--- vector-0.12.3.1/tests/doctests.hs 2021-09-21 10:02:15.000000000 -0600
++++ vector-0.12.3.1-r1/tests/doctests.hs 2022-03-22 22:14:54.557142788 -0600
+@@ -1,4 +1,30 @@
+ import Test.DocTest (doctest)
++import GHC.IO.Encoding (setLocaleEncoding)
++import System.Directory (getCurrentDirectory, makeAbsolute)
++import System.FilePath.Posix ((</>))
++import System.IO (utf8)
++import Build_doctests (pkgs)
+
+ main :: IO ()
+-main = doctest ["-Iinclude", "-Iinternal", "Data"]
++main = do
++ setLocaleEncoding utf8
++ pwd <- getCurrentDirectory
++ prefix <- makeAbsolute pwd
++
++ let customFlags =
++ [ "-package-env=-"
++ , "-hide-all-packages"
++ , "-no-user-package-db"
++ , "-package-db=" ++ prefix </> "dist/package.conf.inplace"
++ ]
++
++ let origFlags =
++ [ "-Iinclude"
++ , "-Iinternal"
++ ]
++
++ let modules =
++ [ "Data"
++ ]
++
++ doctest $ customFlags ++ pkgs ++ origFlags ++ modules
+diff -urN vector-0.12.3.1/vector.cabal vector-0.12.3.1-r1/vector.cabal
+--- vector-0.12.3.1/vector.cabal 2022-03-22 22:09:55.787142644 -0600
++++ vector-0.12.3.1-r1/vector.cabal 2022-03-22 22:12:23.547142715 -0600
+@@ -49,7 +49,7 @@
+
+
+ Cabal-Version: >=1.10
+-Build-Type: Simple
++Build-Type: Custom
+
+ Extra-Source-Files:
+ changelog.md
+@@ -99,6 +99,11 @@
+ Default: False
+ Manual: True
+
++custom-setup
++ setup-depends:
++ base
++ , Cabal
++ , cabal-doctest
+
+ Library
+ Default-Language: Haskell2010
+@@ -288,4 +293,6 @@
+ base -any
+ , doctest >=0.15 && <0.19
+ , primitive >= 0.6.4.0 && < 0.8
+- , vector -any
++ , directory
++ , filepath
++ , base-compat
diff --git a/dev-haskell/vector/vector-0.12.3.1.ebuild b/dev-haskell/vector/vector-0.12.3.1.ebuild
new file mode 100644
index 000000000000..d427c9308787
--- /dev/null
+++ b/dev-haskell/vector/vector-0.12.3.1.ebuild
@@ -0,0 +1,67 @@
+# 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
+#hackport: flags: -wall
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
+CABAL_HACKAGE_REVISION="1"
+inherit haskell-cabal
+
+CABAL_FILE="${S}/${PN}.cabal"
+CABAL_DISTFILE="${P}-rev${CABAL_HACKAGE_REVISION}.cabal"
+
+DESCRIPTION="Efficient Arrays"
+HOMEPAGE="https://github.com/haskell/vector"
+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"
+IUSE="+boundschecks internalchecks unsafechecks"
+
+PATCHES=( "${FILESDIR}/${PN}-0.12.3.1-cabal-doctest.patch" )
+
+RDEPEND=">=dev-haskell/primitive-0.6.4.0:=[profile?] <dev-haskell/primitive-0.8:=[profile?]
+ >=dev-lang/ghc-8.4.3:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-2.2.0.1
+ dev-haskell/cabal-doctest
+ test? ( >=dev-haskell/base-orphans-0.6
+ dev-haskell/base-compat
+ >=dev-haskell/doctest-0.15
+ dev-haskell/hunit
+ >=dev-haskell/quickcheck-2.9 <dev-haskell/quickcheck-2.15
+ dev-haskell/random
+ dev-haskell/tasty
+ dev-haskell/tasty-hunit
+ dev-haskell/tasty-quickcheck )
+"
+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
+
+ cabal_chdeps \
+ 'doctest >=0.15 && <0.19' 'doctest >=0.15'
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag boundschecks boundschecks) \
+ $(cabal_flag internalchecks internalchecks) \
+ $(cabal_flag unsafechecks unsafechecks) \
+ --flag=-wall
+}