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

EAPI=8

# ebuild generated by hackport 0.7.1.1.9999

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

DESCRIPTION="Library for parsing GHC time and allocation profiling reports"
HOMEPAGE="https://github.com/maoe/ghc-prof"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="dump"

RDEPEND="<dev-haskell/attoparsec-0.15:=[profile?]
	<dev-haskell/scientific-0.4:=[profile?]
	>=dev-lang/ghc-8.4.3:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-2.4
	test? ( >=dev-haskell/attoparsec-0.10 <dev-haskell/attoparsec-0.15
		<dev-haskell/tasty-1.5
		>=dev-haskell/tasty-hunit-0.9.1 <dev-haskell/tasty-hunit-0.11
		dev-haskell/temporary )
"

src_prepare() {
	default
	cabal_chdeps \
		'attoparsec >= 0.10 && < 0.14' 'attoparsec >= 0.10 && < 0.15'
}

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag dump dump)
}