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

EAPI=8

# ebuild generated by hackport 0.8.5.1.9999

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

DESCRIPTION="Concise Binary Object Representation (CBOR)"
HOMEPAGE="https://hackage.haskell.org/package/cborg"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="+optimize-gmp"

RDEPEND=">=dev-haskell/half-0.2.2.3:=[profile?] <dev-haskell/half-0.4:=[profile?]
	>=dev-haskell/primitive-0.5:=[profile?] <dev-haskell/primitive-0.10:=[profile?]
	>=dev-lang/ghc-9.0.2:=
	|| ( ( >=dev-haskell/text-1.1:=[profile?] <dev-haskell/text-1.3:=[profile?] )
		( >=dev-haskell/text-2.0:=[profile?] <dev-haskell/text-2.2:=[profile?] ) )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( >=dev-haskell/aeson-0.7 <dev-haskell/aeson-2.3
		dev-haskell/base-orphans
		>=dev-haskell/base16-bytestring-1.0 <dev-haskell/base16-bytestring-1.1
		>=dev-haskell/base64-bytestring-1.0 <dev-haskell/base64-bytestring-1.3
		>=dev-haskell/quickcheck-2.9 <dev-haskell/quickcheck-2.15
		dev-haskell/random
		>=dev-haskell/scientific-0.3 <dev-haskell/scientific-0.4
		>=dev-haskell/tasty-0.11 <dev-haskell/tasty-1.6
		>=dev-haskell/tasty-hunit-0.9 <dev-haskell/tasty-hunit-0.11
		>=dev-haskell/tasty-quickcheck-0.8 <dev-haskell/tasty-quickcheck-0.11
		>=dev-haskell/text-1.1 <dev-haskell/text-2.2
		>=dev-haskell/vector-0.10 <dev-haskell/vector-0.14 )
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag optimize-gmp optimize-gmp)
}