summaryrefslogtreecommitdiff
blob: 803e8b627131190e7da29c899c9f1b6c7cd6aaeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

# ebuild generated by hackport 0.3.2.9999

CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
inherit haskell-cabal

DESCRIPTION="A bioinformatics library"
HOMEPAGE="http://biohaskell.org/Libraries/Bio"
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE="+examples test"

RDEPEND=">=dev-haskell/binary-0.4:=[profile?] <dev-haskell/binary-0.8:=[profile?]
		dev-haskell/mtl:=[profile?]
		dev-haskell/parallel:=[profile?]
		dev-haskell/parsec:=[profile?]
		>=dev-haskell/quickcheck-2:=[profile?]
		dev-haskell/random:=[profile?]
		>=dev-haskell/tagsoup-0.8:=[profile?]
		>=dev-lang/ghc-6.10.4:="
DEPEND="${RDEPEND}
		>=dev-haskell/cabal-1.6"

src_prepare() {
	cabal_chdeps \
		'binary >=0.4 && <0.5' 'binary >=0.4 && <0.8'
}

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag examples examples) \
		$(cabal_flag test test)
}

src_test() {
	dist/build/qc/qc || die
}

src_install() {
	haskell-cabal_src_install

	use test && rm "${ED}"/usr/bin/qc
	# many examples collide with dev-haskell/flower
	if use examples ; then
		pushd "${ED}"/usr/bin
		local example
		for example in *
		do
			mv "${example}" "${PN}-example-${example}"
		done
		popd
	fi
}