# 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: +use-pkgconfig,-force-narrow-library,-force-c2hs-newtype-pointer-hooks

CABAL_HACKAGE_REVISION=1

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

DESCRIPTION="Modernised bindings to GNU ncurses"
HOMEPAGE="https://john-millikin.com/software/haskell-ncurses/"

LICENSE="GPL-3"
SLOT="0/${PV}"
KEYWORDS="~amd64"

PATCHES=(
	"${FILESDIR}/${PN}-0.2.16-ncurses-6.2_p2021.patch"
)

RDEPEND=">=dev-haskell/text-0.7:=[profile?]
	>=dev-lang/ghc-9.0.2:=
	sys-libs/ncurses
"
DEPEND="${RDEPEND}
	dev-haskell/c2hs
	>=dev-haskell/cabal-3.4.1.0
	virtual/pkgconfig
"

src_configure() {
	haskell-cabal_src_configure \
		--flag=-force-c2hs-newtype-pointer-hooks \
		--flag=-force-narrow-library \
		--flag=use-pkgconfig
}