1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 # ebuild generated by hackport 0.3.1.9999
8 CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
9 inherit haskell-cabal versionator
14 DESCRIPTION="Haskell Database Connectivity"
15 HOMEPAGE="https://github.com/hdbc/hdbc"
16 SRC_URI="https://hackage.haskell.org/package/${MY_P}/${MY_P}.tar.gz"
20 KEYWORDS="~amd64 ~x86"
21 IUSE="mysql odbc postgres sqlite test"
22 RESTRICT="!test? ( test )"
24 RDEPEND=">=dev-haskell/convertible-1.0.10.0:=[profile?] <dev-haskell/convertible-1.1.0.0:=[profile?]
25 dev-haskell/mtl:=[profile?]
26 dev-haskell/text:=[profile?]
27 dev-haskell/utf8-string:=[profile?]
28 >=dev-lang/ghc-6.12.1:="
30 >=dev-haskell/cabal-1.8
31 test? ( dev-haskell/hunit
32 dev-haskell/quickcheck
37 DEPENDV="$(get_version_component_range 1-2)"
38 PDEPEND="mysql? ( dev-haskell/hdbc-mysql )
39 odbc? ( =dev-haskell/hdbc-odbc-${DEPENDV}* )
40 postgres? ( =dev-haskell/hdbc-postgresql-${DEPENDV}* )
41 sqlite? ( >=dev-haskell/hdbc-sqlite3-${DEPENDV} )"
43 S="${WORKDIR}/${MY_P}"
46 cabal_src_configure $(cabal_flag test buildtests)
51 haskell-cabal_src_test || die "cabal test failed"
54 "${S}/dist/build/runtests/runtests" || die "unit tests failed"
60 # if tests were enabled, make sure the unit test driver is deleted
61 rm -f "${ED}/usr/bin/runtests"