summaryrefslogtreecommitdiff
blob: 84d32835f29bd33f828ca37b7c4344a9817a7d6e (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:  $

# ebuild generated by hackport 0.2.13

EAPI="3"

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

DESCRIPTION="An infinite stream of random data"
HOMEPAGE="http://hackage.haskell.org/package/random-stream"
SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="urandom openssl"

#TODO: add winrandom?

RDEPEND="dev-haskell/binary
		>=dev-lang/ghc-6.8.2
		openssl? ( dev-libs/openssl )"

DEPEND="${RDEPEND}
		>=dev-haskell/cabal-1.6"

src_prepare() {
	if use urandom; then
		if use openssl; then
			ewarn "This library only supports one random source. Disabling openssl."
		fi
		CABAL_CONFIGURE_FLAGS="--flags=have_urandom"
	elif use openssl; then
		CABAL_CONFIGURE_FLAGS="--flags=have_ssl"
	else
		die "You need one random source."
	fi

}