*/*: Bump copyright on files touched this year
[gentoo.git] / dev-haskell / transformers-compat / transformers-compat-0.4.0.4.ebuild
index ae1319ecf9980f717103b326fcef79d472da62e0..3a6bd8e9faaa74a9ed154a2ae6e989d5c22d8adc 100644 (file)
@@ -1,6 +1,5 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
-# $Id$
 
 EAPI=5
 
@@ -12,15 +11,15 @@ inherit haskell-cabal
 
 DESCRIPTION="A small compatibility shim for dev-haskell/transformers"
 HOMEPAGE="https://github.com/ekmett/transformers-compat/"
-SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0/${PV}"
-KEYWORDS="alpha amd64 ppc ~ppc64 sparc x86"
-IUSE="+three"
+KEYWORDS="~alpha amd64 ppc ~ppc64 sparc x86"
+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 +27,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[@]}
 }