# Copyright 1999-2024 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"
inherit haskell-cabal

DESCRIPTION="Terminal interface for the hledger accounting system"
HOMEPAGE="https://hledger.org"

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

CABAL_CHDEPS=('base >=4.14 && <4.21' 'base >=4.14 && <4.22'
			'brick >=2.1.1 && <2.3.2 || >2.3.2 && <2.7' 'brick >=2.1.1')
RDEPEND=">=app-office/hledger-1.41:=[profile?] <app-office/hledger-1.42:=[profile?]
	>=dev-haskell/ansi-terminal-0.9:=[profile?]
	dev-haskell/async:=[profile?]
	>=dev-haskell/cmdargs-0.8:=[profile?]
	dev-haskell/data-default:=[profile?]
	>=dev-haskell/doclayout-0.3:=[profile?] <dev-haskell/doclayout-0.6:=[profile?]
	>=dev-haskell/extra-1.6.3:=[profile?]
	>=dev-haskell/fsnotify-0.4:=[profile?] <dev-haskell/fsnotify-0.5:=[profile?]
	>=dev-haskell/githash-0.1.6.2:=[profile?]
	>=dev-haskell/hledger-lib-1.41:=[profile?] <dev-haskell/hledger-lib-1.42:=[profile?]
	>=dev-haskell/megaparsec-7.0.0:=[profile?] <dev-haskell/megaparsec-9.8:=[profile?]
	>=dev-haskell/microlens-0.4:=[profile?]
	>=dev-haskell/microlens-platform-0.2.3.1:=[profile?]
	>=dev-haskell/safe-0.3.20:=[profile?]
	>=dev-haskell/split-0.1:=[profile?]
	>=dev-haskell/text-1.2.4.1:=[profile?]
	>=dev-haskell/text-zipper-0.4:=[profile?]
	dev-haskell/vector:=[profile?]
	>=dev-haskell/vty-6.1:=[profile?] <dev-haskell/vty-6.3:=[profile?]
	>=dev-haskell/vty-crossplatform-0.4.0.0:=[profile?] <dev-haskell/vty-crossplatform-0.5.0.0:=[profile?]
	>=dev-lang/ghc-9.0.2:=
	>=dev-haskell/brick-2.1.1:=[profile?]
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag debug debug) \
		$(cabal_flag threaded threaded)
}