Gentoo Archives: gentoo-commits

From: "Sergei Trofimovich (slyfox)" <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-haskell/sha/files: sha-1.6.0-no-tests.patch
Date: Wed, 21 Nov 2012 20:58:40
Message-Id: 20121121205820.A27B420C9F@flycatcher.gentoo.org
1 slyfox 12/11/21 20:58:20
2
3 Added: sha-1.6.0-no-tests.patch
4 Log:
5 Fix .cabal depends for -f-test mode (bug #444124 by Dennis Lissov)
6
7 (Portage version: 2.2.0_alpha142_p23/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
8
9 Revision Changes Path
10 1.1 dev-haskell/sha/files/sha-1.6.0-no-tests.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/sha/files/sha-1.6.0-no-tests.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/sha/files/sha-1.6.0-no-tests.patch?rev=1.1&content-type=text/plain
14
15 Index: sha-1.6.0-no-tests.patch
16 ===================================================================
17 From 28704350d7b6148b2edbd5e8883c1c2dfba4f0ba Mon Sep 17 00:00:00 2001
18 From: Sergei Trofimovich <slyfox@g.o>
19 Date: Wed, 21 Nov 2012 23:44:33 +0300
20 Subject: [PATCH] cabal: make depends on test libraries optional
21
22 before the patch 'QuickCheck' and friends were required unconditionally:
23
24 $ runhaskell Setup.hs configure -v -ftest | grep QuickCheck
25 Dependency QuickCheck ==2.*: using QuickCheck-2.5.1.1
26 $ runhaskell Setup.hs configure -v -f-test | grep QuickCheck
27 Dependency QuickCheck ==2.*: using QuickCheck-2.5.1.1
28
29 the patch fixes it by putting 'build-depends' under condition
30
31 $ runhaskell Setup.hs configure -v -f-test | grep -i quickcheck
32 $ runhaskell Setup.hs configure -v -ftest | grep -i quickcheck
33 Dependency QuickCheck ==2.*: using QuickCheck-2.5.1.1
34
35 Signed-off-by: Sergei Trofimovich <slyfox@g.o>
36 ---
37 SHA.cabal | 11 ++++++-----
38 1 file changed, 6 insertions(+), 5 deletions(-)
39
40 diff --git a/SHA.cabal b/SHA.cabal
41 index a146b52..1ec2624 100644
42 --- a/SHA.cabal
43 +++ b/SHA.cabal
44 @@ -37,9 +37,12 @@ Library
45 Ghc-Options: -fregs-graph
46
47 Executable test_sha
48 - build-depends: base >= 4 && < 6, bytestring, binary, array,
49 - QuickCheck == 2.*, test-framework >= 0.3,
50 - test-framework-quickcheck2 >= 0.2
51 + if flag(test)
52 + build-depends: base >= 4 && < 6, bytestring, binary, array,
53 + QuickCheck == 2.*, test-framework >= 0.3,
54 + test-framework-quickcheck2 >= 0.2
55 + else
56 + buildable: False
57 Main-Is: Test.hs
58 Other-Modules: Data.Digest.Pure.SHA
59
60 @@ -51,8 +54,6 @@ Executable test_sha
61 if impl(ghc >= 6.12)
62 Ghc-Options: -fregs-graph
63
64 - if !flag(test)
65 - buildable: False
66
67 Executable sha1
68 build-depends: base >= 4 && < 6, bytestring, binary, array, directory
69 --
70 1.8.0