# 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
#hackport: flags: +pedantic

CABAL_FEATURES=""
inherit haskell-cabal

DESCRIPTION="Scan Gentoo repositories for reverse dependencies"
HOMEPAGE="https://github.com/gentoo-haskell/revdep-scanner"
SRC_URI="https://github.com/gentoo-haskell/${PN}/releases/download/${P}/${P}.tar.gz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND=">=dev-haskell/conduit-1.3.0:= <dev-haskell/conduit-1.4:=
	>=dev-haskell/conduit-extra-1.1.12:= <dev-haskell/conduit-extra-1.4:=
	>=dev-haskell/parsable-0.1:= <dev-haskell/parsable-0.2:=
	>=dev-haskell/parsec-3.1:= <dev-haskell/parsec-3.2:=
	>=dev-haskell/portage-hs-0.1:= <dev-haskell/portage-hs-0.2:=
	>=dev-haskell/pretty-simple-4.1.1.0:= <dev-haskell/pretty-simple-4.2:=
	>=dev-haskell/text-1.2.5.0:= <dev-haskell/text-2.2:=
	>=dev-haskell/unordered-containers-0.2:= <dev-haskell/unordered-containers-0.3:=
	>=dev-lang/ghc-9.2.6:=
	sys-apps/pkgcore
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.6.3.0
"

src_configure() {
	local config_flags=(
		--flag=pedantic
	)

	if ghc-supports-threaded-runtime
	then
		config_flags+=( --ghc-options=-threaded )
	else
		die "GHC must support threaded runtime"
	fi

	haskell-cabal_src_configure "${config_flags[@]}"
}