1 |
kolmodin 09/10/28 23:46:17 |
2 |
|
3 |
Modified: haskell-cabal.eclass |
4 |
Log: |
5 |
Properly support the CABAL_FEATURES="nocabaldep" if user doesn't have dev-haskell/cabal |
6 |
|
7 |
Revision Changes Path |
8 |
1.17 eclass/haskell-cabal.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/haskell-cabal.eclass?rev=1.17&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/haskell-cabal.eclass?rev=1.17&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/haskell-cabal.eclass?r1=1.16&r2=1.17 |
13 |
|
14 |
Index: haskell-cabal.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v |
17 |
retrieving revision 1.16 |
18 |
retrieving revision 1.17 |
19 |
diff -u -r1.16 -r1.17 |
20 |
--- haskell-cabal.eclass 9 Sep 2009 18:40:11 -0000 1.16 |
21 |
+++ haskell-cabal.eclass 28 Oct 2009 23:46:16 -0000 1.17 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2006 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.16 2009/09/09 18:40:11 kolmodin Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/haskell-cabal.eclass,v 1.17 2009/10/28 23:46:16 kolmodin Exp $ |
27 |
# |
28 |
# Original authors: Andres Loeh <kosmikus@g.o> |
29 |
# Duncan Coutts <dcoutts@g.o> |
30 |
@@ -113,6 +113,22 @@ |
31 |
# We're bootstrapping cabal, so the cabal version is the version |
32 |
# of this package itself. |
33 |
_CABAL_VERSION_CACHE="${PV}" |
34 |
+ elif [[ "${CABAL_FROM_GHC}" ]]; then |
35 |
+ # We can't assume there's a version of Cabal installed by ebuild as |
36 |
+ # this might be a first time install of GHC (for packages that |
37 |
+ # use the shipped Cabal like haskell-updater). |
38 |
+ |
39 |
+ # The user is likely to only have one version of Cabal, provided |
40 |
+ # by GHC. Note that dev-haskell/cabal can be a dummy package, only |
41 |
+ # using the version provided by GHC. If the user has another version |
42 |
+ # of Cabal too (more recent than the one GHC provides through |
43 |
+ # dev-haskell/cabal, or possibly older if he used an old |
44 |
+ # Cabal package) the most recent is used (expected to be the last |
45 |
+ # one in the ghc-pkg output). |
46 |
+ _CABAL_VERSION_CACHE="$(ghc-pkg field Cabal version | tail -n 1)" |
47 |
+ |
48 |
+ # Strip out the "version: " prefix |
49 |
+ _CABAL_VERSION_CACHE="${_CABAL_VERSION_CACHE#"version: "}" |
50 |
else |
51 |
# We ask portage, not ghc, so that we only pick up |
52 |
# portage-installed cabal versions. |