summaryrefslogtreecommitdiff
path: root/dev-haskell/testpack
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-haskell/testpack
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-haskell/testpack')
-rw-r--r--dev-haskell/testpack/Manifest6
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.3.0-HUnit-1.3.patch13
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.3.0-QC-2.8.2.patch12
-rw-r--r--dev-haskell/testpack/files/testpack-2.1.3.0-qc28.patch139
-rw-r--r--dev-haskell/testpack/metadata.xml18
-rw-r--r--dev-haskell/testpack/testpack-2.1.3.0-r1.ebuild34
6 files changed, 222 insertions, 0 deletions
diff --git a/dev-haskell/testpack/Manifest b/dev-haskell/testpack/Manifest
new file mode 100644
index 000000000000..24437159ea87
--- /dev/null
+++ b/dev-haskell/testpack/Manifest
@@ -0,0 +1,6 @@
+AUX testpack-2.1.3.0-HUnit-1.3.patch 527 BLAKE2B f594752039c0352b042956a9da050447de8ae9de693be1badd9f036cde6eb36f13b94d5b930f85e24f3d1c7e6904e52bd1d0bc4ef15086c5e8cf28488671f471 SHA512 da98a04f7b1e4e0f511e0dda026915f535ffec1706d441af28e7385a7d259dffd40aeea537c7be10b3bbe7c5f3a66476c4873441e82a903f377e22c7aac88c73
+AUX testpack-2.1.3.0-QC-2.8.2.patch 497 BLAKE2B 769cfc26364d74e13a19d2d6daaee294280c12a399cc1d9da32c741a06c9fff7b993725c1aa8e3c674aa2380ec23503c231c35b177d86faefad6d01c3a4f2ba0 SHA512 5e09f9755b253d3819a0837b2125bd0b4f59f158dd3e0aab07d71be828150969169f71f5fadde04a3283193d33d7c2d120f25329d3aeb4a7f5f591ce216cee20
+AUX testpack-2.1.3.0-qc28.patch 5517 BLAKE2B 8113a56fd3646f2bcf24c52ea8ee93b318eb973297aafbe5963bf40c7cbcb062c8b40d7a8525aacb4e10bf96e333de1e09ad31766341ecc94010c8540cfa776a SHA512 1a65f5115de3fe98860b659c6c9781c05d68f49d7f827872199de01b1c6ba1e34437707cb62a2a2f8e060cec8c12e6710499d8f1d1f8695897fd7555784cf9d4
+DIST testpack-2.1.3.0.tar.gz 15466 BLAKE2B 309d3f6681f7e72522ad7411e9d90c4d02b13ccb4dd6d463bc0c5ec298c94ddd4eb25c71feb839e01aec343ab415ac22a03e14714d4fe69716530835eb0f87d8 SHA512 4e9d08a8065c7f2354445e2e81f07d47a7aabead66a4d474728dc3e6bd6244b9d61fa00f8519fd0d10edea54f232e3f7f45ba67d568daccc128bc317597b4ee8
+EBUILD testpack-2.1.3.0-r1.ebuild 864 BLAKE2B 3986904d27372c04ce827e86288fe0da3ebae251eb20e99747d2755606850530f754bfa3c102baedcbe429f35f0d3873b42331951355fab1b7f4ce3fbbe22e1d SHA512 0e60f8adf02c726c0b515b2262175ef3461438817ba0f2c7319b327fa31b015f47fa17b229c9d08b63f27735d1d717b5d2fc9f1f5e36b057e966be4c18e350b6
+MISC metadata.xml 770 BLAKE2B e92f92162a067193d00f3d3d81699a05d35bcd6a0b0df04a2dd5ef0200a317b7e926aa62f69f86e69a6e3751b80ea96fde9c151f15bffa82d9d256c62edda11f SHA512 0c29a360764ca259bf160096d089dad30f33fcc86c148b317fcfec0329a391755efdb399c452e3f84e1812f236cf19435d30a14ad90f20fa9adbae8da7b700e8
diff --git a/dev-haskell/testpack/files/testpack-2.1.3.0-HUnit-1.3.patch b/dev-haskell/testpack/files/testpack-2.1.3.0-HUnit-1.3.patch
new file mode 100644
index 000000000000..599615a8e5fb
--- /dev/null
+++ b/dev-haskell/testpack/files/testpack-2.1.3.0-HUnit-1.3.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Test/HUnit/Tools.hs b/src/Test/HUnit/Tools.hs
+index a24a510..6b8a25e 100644
+--- a/src/Test/HUnit/Tools.hs
++++ b/src/Test/HUnit/Tools.hs
+@@ -97,3 +97,7 @@ runVerbTestText (HU.PutText put us) t = do
+ reportFailure = reportProblem "Failure:" "Failure in: "
+- reportProblem p0 p1 msg ss us = put line True us
++ reportProblem p0 p1
++#if MIN_VERSION_HUnit(1,3,0)
++ _loc
++#endif
++ msg ss us = put line True us
+ where line = "### " ++ kind ++ path' ++ '\n' : msg
diff --git a/dev-haskell/testpack/files/testpack-2.1.3.0-QC-2.8.2.patch b/dev-haskell/testpack/files/testpack-2.1.3.0-QC-2.8.2.patch
new file mode 100644
index 000000000000..9ea5f8dfe4d5
--- /dev/null
+++ b/dev-haskell/testpack/files/testpack-2.1.3.0-QC-2.8.2.patch
@@ -0,0 +1,12 @@
+diff --git a/src/Test/QuickCheck/Instances.hs b/src/Test/QuickCheck/Instances.hs
+index 98367b7..f65eb37 100644
+--- a/src/Test/QuickCheck/Instances.hs
++++ b/src/Test/QuickCheck/Instances.hs
+@@ -30,2 +30,3 @@ import Data.Word
+
++#if ! MIN_VERSION_QuickCheck(2,8,2)
+ instance (Arbitrary k, Arbitrary v, Eq k, Ord k) => Arbitrary (Map.Map k v) where
+@@ -37,2 +38,3 @@ instance (CoArbitrary k, CoArbitrary v, Eq k, Ord k) => CoArbitrary (Map.Map k v
+ coarbitrary = coarbitrary . Map.keys
++#endif
+
diff --git a/dev-haskell/testpack/files/testpack-2.1.3.0-qc28.patch b/dev-haskell/testpack/files/testpack-2.1.3.0-qc28.patch
new file mode 100644
index 000000000000..c1971b29b461
--- /dev/null
+++ b/dev-haskell/testpack/files/testpack-2.1.3.0-qc28.patch
@@ -0,0 +1,139 @@
+diff --git a/src/Test/HUnit/Tools.hs b/src/Test/HUnit/Tools.hs
+index 2b66548..a24a510 100644
+--- a/src/Test/HUnit/Tools.hs
++++ b/src/Test/HUnit/Tools.hs
+@@ -18,9 +18,9 @@ module Test.HUnit.Tools (assertRaises, mapassertEqual,
+ where
+ import Test.QuickCheck as QC
+ import Test.QuickCheck.Text
+-import Test.QuickCheck.Test
++import Test.QuickCheck.Test as TQT
+ import Test.QuickCheck.Gen
+-import Test.QuickCheck.State
++import Test.QuickCheck.State as TQS
+ import qualified Test.QuickCheck.Property as P
+ import Test.QuickCheck.Property hiding (Result(reason))
+ import qualified Control.Exception
+@@ -33,6 +33,9 @@ import System.Random (newStdGen, StdGen(..), split)
+ #define newStdGen newQCGen
+ #define StdGen QCGen
+ #endif
++#if MIN_VERSION_QuickCheck(2,8,0)
++import qualified Data.Map as Map
++#endif
+ import System.IO
+ import Text.Printf
+
+@@ -205,6 +208,9 @@ localquickCheckWithResult args p =
+ Just (_,s) -> \_ _ -> s
+ , numSuccessTests = 0
+ , numDiscardedTests = 0
++#if MIN_VERSION_QuickCheck(2,8,0)
++ , TQS.labels = Map.empty
++#endif
+ , collected = []
+ , expectedFailure = False
+ , randomSeed = rnd
+@@ -236,14 +242,14 @@ localquickCheckWithResult args p =
+ theOutput <- terminalOutput (terminal st)
+ #endif
+ if expectedFailure st then
+- return Success{ labels = summary st
++ return Success{ TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , numTests = numSuccessTests st
+ , output = theOutput
+ #endif
+ }
+ else
+- return NoExpectedFailure{ labels = summary st
++ return NoExpectedFailure{ TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , numTests = numSuccessTests st
+ , output = theOutput
+@@ -257,7 +263,7 @@ localquickCheckWithResult args p =
+ theOutput <- terminalOutput (terminal st)
+ #endif
+ return GaveUp{ numTests = numSuccessTests st
+- , labels = summary st
++ , TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , output = theOutput
+ #endif
+@@ -306,7 +312,7 @@ localquickCheckWithResult args p =
+ foundFailure st res ts
+ #endif
+ if not (expect res) then
+- return Success{ labels = summary st
++ return Success{ TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , numTests = numSuccessTests st+1
+ , output = theOutput
+@@ -316,7 +322,7 @@ localquickCheckWithResult args p =
+ return Failure{ usedSeed = randomSeed st -- correct! (this will be split first)
+ , usedSize = size
+ , reason = P.reason res
+- , labels = summary st
++ , TQT.labels = summary st
+ #if MIN_VERSION_QuickCheck(2,3,0)
+ , numTests = numSuccessTests st + 1
+ , numShrinks = numShrinks
+diff --git a/src/Test/QuickCheck/Tools.hs b/src/Test/QuickCheck/Tools.hs
+index 712c9bf..506686f 100644
+--- a/src/Test/QuickCheck/Tools.hs
++++ b/src/Test/QuickCheck/Tools.hs
+@@ -20,34 +20,18 @@ Written by John Goerzen, jgoerzen\@complete.org
+ module Test.QuickCheck.Tools (-- * Comparisons
+ (@=?),
+ (@?=)
+-
+ )
+ where
+-#if MIN_VERSION_QuickCheck(2,6,0)
+-import Test.QuickCheck.Property (Result(..), callbacks, expect, theException, ok, reason, stamp)
+-#if MIN_VERSION_QuickCheck(2,7,0)
+-#else
+-import Test.QuickCheck.Property (Result(..), callbacks, expect, interrupted, ok, reason, stamp)
+-#endif
+-#else
+-import Test.QuickCheck hiding (Result, reason)
+-import Test.QuickCheck.Property
+-#endif
++
++import qualified Test.QuickCheck.Property as P
+
+ {- | Compare two values. If same, the test passes. If different, the result indicates
+ what was expected and what was received as part of the error. -}
+-(@=?) :: (Eq a, Show a) => a -> a -> Result
++(@=?) :: (Eq a, Show a) => a -> a -> P.Result
+ expected @=? actual =
+- MkResult {ok = Just (expected == actual),
+-#if MIN_VERSION_QuickCheck(2,7,0)
+- expect = True, theException = Nothing,
+-#else
+- expect = True, interrupted = False,
+-#endif
+- reason = "Result: expected " ++ show expected ++ ", got " ++ show actual,
+- stamp = [], callbacks = []}
+-
++ P.failed { P.ok = Just (expected == actual)
++ , P.reason = "Result: expected " ++ show expected ++ ", got " ++ show actual
++ }
+ {- | Like '@=?', but with args in a different order. -}
+-(@?=) :: (Eq a, Show a) => a -> a -> Result
++(@?=) :: (Eq a, Show a) => a -> a -> P.Result
+ (@?=) = flip (@=?)
+-
+diff --git a/testpack.cabal b/testpack.cabal
+index 0873b33..dab77d9 100644
+--- a/testpack.cabal
++++ b/testpack.cabal
+@@ -46,7 +46,7 @@ Library
+
+ Build-Depends: base >= 3 && < 5,
+ mtl, HUnit,
+- QuickCheck >= 2.1.0.3 && < 2.8
++ QuickCheck >= 2.1.0.3
+
+ If flag(splitBase)
+ Build-Depends: base >= 3 && < 5, containers, random
diff --git a/dev-haskell/testpack/metadata.xml b/dev-haskell/testpack/metadata.xml
new file mode 100644
index 000000000000..528469d3e207
--- /dev/null
+++ b/dev-haskell/testpack/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <longdescription>
+ Testpack provides utilities for both HUnit and QuickCheck. These include
+ tools for running QuickCheck properties as HUnit test cases, allowing you to
+ combine both approaches in a single program. It also includes tools for more
+ helpful displays of running progress in both HUnit and QuickCheck, additional
+ generators for other types for QuickCheck, and shortcuts for quickly defining new.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">jgoerzen/testpack</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-haskell/testpack/testpack-2.1.3.0-r1.ebuild b/dev-haskell/testpack/testpack-2.1.3.0-r1.ebuild
new file mode 100644
index 000000000000..bce6a2462a59
--- /dev/null
+++ b/dev-haskell/testpack/testpack-2.1.3.0-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.4.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit eutils haskell-cabal
+
+DESCRIPTION="Test Utililty Pack for HUnit and QuickCheck (unmaintained)"
+HOMEPAGE="https://github.com/jgoerzen/testpack"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="amd64 ~sparc x86"
+IUSE=""
+
+RDEPEND="dev-haskell/hunit:=[profile?]
+ dev-haskell/mtl:=[profile?]
+ >=dev-haskell/quickcheck-2.1.0.3:2=[profile?]
+ dev-haskell/random:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.6
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-qc28.patch
+ epatch "${FILESDIR}"/${P}-HUnit-1.3.patch
+ epatch "${FILESDIR}"/${P}-QC-2.8.2.patch
+}