# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

# ebuild generated by hackport 0.3.3.9999

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

DESCRIPTION="fortune-mod clone"
HOMEPAGE="https://github.com/mokus0/misfortune"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="public-domain"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"

RDEPEND="dev-haskell/cereal:=[profile?]
	dev-haskell/knob:=[profile?]
	dev-haskell/monad-loops:=[profile?]
	>=dev-haskell/random-fu-0.2.2:=[profile?]
	dev-haskell/regex-base:=[profile?]
	dev-haskell/regex-pcre:=[profile?]
	dev-haskell/semigroups:=[profile?]
	dev-haskell/text:=[profile?]
	dev-haskell/utf8-string:=[profile?]
	dev-haskell/vector:=[profile?]
	>=dev-lang/ghc-6.10.4:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-1.6.0.3
"

src_configure() {
	# workarond bug on ghc-7.6.3, where
	# compilation causes endless loop
	[[ $(ghc-version) == 7.6.* ]] && replace-hcflags -O[2-9] -O1

	haskell-cabal_src_configure
}