summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-11-21 20:58:20 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2012-11-21 20:58:20 +0000
commitac917aea1df8b9d4ab186492ec38b45ab674a13c (patch)
tree4e3488d42ef4edf178422f8df7587fe69a735460 /dev-haskell/sha
parentEnable verbose build. Bug #441842 (diff)
downloadgentoo-2-ac917aea1df8b9d4ab186492ec38b45ab674a13c.tar.gz
gentoo-2-ac917aea1df8b9d4ab186492ec38b45ab674a13c.tar.bz2
gentoo-2-ac917aea1df8b9d4ab186492ec38b45ab674a13c.zip
Fix .cabal depends for -f-test mode (bug #444124 by Dennis Lissov)
(Portage version: 2.2.0_alpha142_p23/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
Diffstat (limited to 'dev-haskell/sha')
-rw-r--r--dev-haskell/sha/ChangeLog6
-rw-r--r--dev-haskell/sha/files/sha-1.6.0-no-tests.patch55
-rw-r--r--dev-haskell/sha/sha-1.6.0.ebuild6
3 files changed, 64 insertions, 3 deletions
diff --git a/dev-haskell/sha/ChangeLog b/dev-haskell/sha/ChangeLog
index 39d6a0910ec6..91cdd54110ee 100644
--- a/dev-haskell/sha/ChangeLog
+++ b/dev-haskell/sha/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-haskell/sha
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/sha/ChangeLog,v 1.4 2012/11/19 12:20:13 gienah Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/sha/ChangeLog,v 1.5 2012/11/21 20:58:20 slyfox Exp $
+
+ 21 Nov 2012; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/sha-1.6.0-no-tests.patch, sha-1.6.0.ebuild:
+ Fix .cabal depends for -f-test mode (bug #444124 by Dennis Lissov)
*sha-1.6.0 (19 Nov 2012)
diff --git a/dev-haskell/sha/files/sha-1.6.0-no-tests.patch b/dev-haskell/sha/files/sha-1.6.0-no-tests.patch
new file mode 100644
index 000000000000..040430b5d7b8
--- /dev/null
+++ b/dev-haskell/sha/files/sha-1.6.0-no-tests.patch
@@ -0,0 +1,55 @@
+From 28704350d7b6148b2edbd5e8883c1c2dfba4f0ba Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed, 21 Nov 2012 23:44:33 +0300
+Subject: [PATCH] cabal: make depends on test libraries optional
+
+before the patch 'QuickCheck' and friends were required unconditionally:
+
+ $ runhaskell Setup.hs configure -v -ftest | grep QuickCheck
+ Dependency QuickCheck ==2.*: using QuickCheck-2.5.1.1
+ $ runhaskell Setup.hs configure -v -f-test | grep QuickCheck
+ Dependency QuickCheck ==2.*: using QuickCheck-2.5.1.1
+
+the patch fixes it by putting 'build-depends' under condition
+
+ $ runhaskell Setup.hs configure -v -f-test | grep -i quickcheck
+ $ runhaskell Setup.hs configure -v -ftest | grep -i quickcheck
+ Dependency QuickCheck ==2.*: using QuickCheck-2.5.1.1
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ SHA.cabal | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/SHA.cabal b/SHA.cabal
+index a146b52..1ec2624 100644
+--- a/SHA.cabal
++++ b/SHA.cabal
+@@ -37,9 +37,12 @@ Library
+ Ghc-Options: -fregs-graph
+
+ Executable test_sha
+- build-depends: base >= 4 && < 6, bytestring, binary, array,
+- QuickCheck == 2.*, test-framework >= 0.3,
+- test-framework-quickcheck2 >= 0.2
++ if flag(test)
++ build-depends: base >= 4 && < 6, bytestring, binary, array,
++ QuickCheck == 2.*, test-framework >= 0.3,
++ test-framework-quickcheck2 >= 0.2
++ else
++ buildable: False
+ Main-Is: Test.hs
+ Other-Modules: Data.Digest.Pure.SHA
+
+@@ -51,8 +54,6 @@ Executable test_sha
+ if impl(ghc >= 6.12)
+ Ghc-Options: -fregs-graph
+
+- if !flag(test)
+- buildable: False
+
+ Executable sha1
+ build-depends: base >= 4 && < 6, bytestring, binary, array, directory
+--
+1.8.0
+
diff --git a/dev-haskell/sha/sha-1.6.0.ebuild b/dev-haskell/sha/sha-1.6.0.ebuild
index a38308661c25..b8f93423db51 100644
--- a/dev-haskell/sha/sha-1.6.0.ebuild
+++ b/dev-haskell/sha/sha-1.6.0.ebuild
@@ -1,13 +1,13 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-haskell/sha/sha-1.6.0.ebuild,v 1.1 2012/11/19 12:20:13 gienah Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-haskell/sha/sha-1.6.0.ebuild,v 1.2 2012/11/21 20:58:20 slyfox Exp $
EAPI=5
# ebuild generated by hackport 0.3.9999
CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
-inherit haskell-cabal
+inherit base haskell-cabal
MY_PN="SHA"
MY_P="${MY_PN}-${PV}"
@@ -27,3 +27,5 @@ DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.6"
S="${WORKDIR}/${MY_P}"
+
+PATCHES=("${FILESDIR}"/${P}-no-tests.patch)