dev-haskell/transformers-compat: derive transformers flag, bug #560974
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 26 Sep 2015 14:27:00 +0000 (15:27 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 26 Sep 2015 14:27:00 +0000 (15:27 +0100)
Bug: https://bugs.gentoo.org/show_bug.cgi?id=560974

Package-Manager: portage-2.2.22

dev-haskell/transformers-compat/transformers-compat-0.4.0.4.ebuild

index ae1319ecf9980f717103b326fcef79d472da62e0..483ff7a4791a19803adc784240be675bf51fd1ce 100644 (file)
@@ -17,10 +17,10 @@ SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
 LICENSE="BSD"
 SLOT="0/${PV}"
 KEYWORDS="alpha amd64 ppc ~ppc64 sparc x86"
-IUSE="+three"
+IUSE=""
 
 RDEPEND=">=dev-lang/ghc-7.4.1:=
-       three? ( >=dev-haskell/mtl-2.1:=[profile?] <dev-haskell/mtl-2.2:=[profile?] )
+       >=dev-haskell/mtl-2.1:=[profile?]
        >=dev-haskell/transformers-0.3:=[profile?] <dev-haskell/transformers-0.5:=[profile?]
 "
 DEPEND="${RDEPEND}
@@ -28,8 +28,16 @@ DEPEND="${RDEPEND}
 "
 
 src_configure() {
+       local tf_arg=()
+
+       has_version '=dev-haskell/transformers-0.3*' && \
+               tf_arg+=(--flag=three)
+
+       has_version '=dev-haskell/transformers-0.4*' && \
+               tf_arg+=(--flag=-three)
+
        haskell-cabal_src_configure \
                --flag=mtl \
-               $(cabal_flag three three) \
-               --flag=-two
+               --flag=-two \
+               ${tf_arg[@]}
 }