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

EAPI=8

# ebuild generated by hackport 0.9.0.0.9999

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

DESCRIPTION="Programming with GHC parse trees"
HOMEPAGE="https://github.com/shayne-fletcher/ghc-lib-parser-ex#readme"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="auto no-ghc-lib"

RDEPEND="dev-haskell/extra:=[profile?]
	dev-haskell/optparse-applicative:=[profile?]
	>=dev-haskell/uniplate-1.5:=[profile?]
	>=dev-lang/ghc-9.0.2:=
	auto? ( >=dev-haskell/ghc-lib-parser-9.12:=[profile?] <dev-haskell/ghc-lib-parser-9.13:=[profile?] )
	!auto? ( no-ghc-lib? ( >=dev-lang/ghc-9.12:=[profile?] <dev-lang/ghc-9.13:=[profile?] ) )
	!no-ghc-lib? ( >=dev-haskell/ghc-lib-parser-9.12:=[profile?] <dev-haskell/ghc-lib-parser-9.13:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( >=dev-haskell/extra-1.6
		>=dev-haskell/tasty-1.2
		>=dev-haskell/tasty-hunit-0.10.0
		>=dev-haskell/uniplate-1.6.12 )
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag auto auto) \
		$(cabal_flag no-ghc-lib no-ghc-lib)
}