dev-python/pip: arm64 stable (bug #719946)
[gentoo.git] / dev-haskell / hdbc-postgresql / hdbc-postgresql-2.3.2.3.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 # ebuild generated by hackport 0.4.5.9999
7
8 CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
9 CABAL_FEATURES+=" nocabaldep" # workaround depend on old cabal-1.16
10 inherit haskell-cabal
11
12 MY_PN="HDBC-postgresql"
13 MY_P="${MY_PN}-${PV}"
14
15 DESCRIPTION="PostgreSQL driver for HDBC"
16 HOMEPAGE="https://github.com/hdbc/hdbc-postgresql"
17 SRC_URI="https://hackage.haskell.org/package/${MY_P}/${MY_P}.tar.gz"
18
19 LICENSE="BSD"
20 SLOT="2/${PV}"
21 KEYWORDS="~amd64 ~x86"
22 IUSE="test"
23 RESTRICT="test" # requires configured postgresql
24
25 RDEPEND=">=dev-db/postgresql-7:*
26         dev-haskell/convertible:=[profile?]
27         >=dev-haskell/hdbc-2.2.0:2=[profile?]
28         dev-haskell/mtl:=[profile?]
29         dev-haskell/old-locale:=[profile?]
30         dev-haskell/old-time:=[profile?]
31         dev-haskell/parsec:=[profile?]
32         dev-haskell/utf8-string:=[profile?]
33         >=dev-lang/ghc-6.12.1:=
34 "
35 DEPEND="${RDEPEND}
36         >=dev-haskell/cabal-1.8.0.2
37         test? ( >=dev-haskell/hdbc-2.2.6:=[profile?]
38                         dev-haskell/hunit:=[profile?]
39                         dev-haskell/quickcheck:2=[profile?]
40                         dev-haskell/testpack:=[profile?] )
41 "
42
43 S="${WORKDIR}/${MY_P}"
44
45 src_configure() {
46         haskell-cabal_src_configure \
47                 $(cabal_flag test buildtests)
48 }
49
50 src_test() {
51         # default tests
52         haskell-cabal_src_test || die "cabal test failed"
53
54         # built custom tests
55         "${S}/dist/build/runtests/runtests" || die "unit tests failed"
56 }
57
58 src_install() {
59         cabal_src_install
60
61         # if tests were enabled, make sure the unit test driver is deleted
62         rm -f "${ED}/usr/bin/runtests"
63 }