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

EAPI=8

# ebuild generated by hackport 0.8.4.0.9999
#hackport: flags: build-examples:examples

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

DESCRIPTION="Library for creating command-line interfaces (colors, menus, etc.)"
HOMEPAGE="https://github.com/pjones/byline"

LICENSE="BSD-2"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="examples"

CABAL_CHBINS=(
	'demo' 'byline-demo'
	'simple' 'byline-simple'
	'menu' 'byline-menu'
	'shell' 'byline-shell'
)

CABAL_CHDEPS=(
	'optparse-applicative  ^>=0.17' 'optparse-applicative >=0.17'
)

RDEPEND="
	>=dev-haskell/ansi-terminal-0.6:=[profile?] <dev-haskell/ansi-terminal-0.12:=[profile?]
	>=dev-haskell/attoparsec-0.13:=[profile?] <dev-haskell/attoparsec-0.15:=[profile?]
	>=dev-haskell/colour-2.3:=[profile?] <dev-haskell/colour-2.4:=[profile?]
	>=dev-haskell/free-5.1:=[profile?] <dev-haskell/free-5.2:=[profile?]
	>=dev-haskell/haskeline-0.8:=[profile?] <dev-haskell/haskeline-0.8.3:=[profile?]
	>=dev-haskell/optparse-applicative-0.17:=[profile?]
	>=dev-haskell/relude-0.6:=[profile?] <dev-haskell/relude-1.2:=[profile?]
	>=dev-haskell/terminfo-hs-0.1:=[profile?] <dev-haskell/terminfo-hs-0.3:=[profile?]
	>=dev-haskell/text-0.11:=[profile?] <dev-haskell/text-2.1:=[profile?]
	>=dev-lang/ghc-8.10.6:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.2.1.0
	test? (
		>=dev-haskell/tasty-1.2
		>=dev-haskell/tasty-hunit-0.10 <dev-haskell/tasty-hunit-0.11

	)
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag examples build-examples)
}