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

EAPI=8

# ebuild generated by hackport 0.7.1.1.9999

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

DESCRIPTION="Serialize to a small byte arrays"
HOMEPAGE="https://github.com/byteverse/bytebuild"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="checked"

RDEPEND=">=dev-haskell/byteslice-0.2.6:=[profile?] <dev-haskell/byteslice-0.3:=[profile?]
	>=dev-haskell/haskell-src-meta-0.8:=[profile?]
	>=dev-haskell/integer-logarithms-1.0.3:=[profile?] <dev-haskell/integer-logarithms-1.1:=[profile?]
	>=dev-haskell/natural-arithmetic-0.1:=[profile?] <dev-haskell/natural-arithmetic-0.2:=[profile?]
	>=dev-haskell/primitive-offset-0.2:=[profile?] <dev-haskell/primitive-offset-0.3:=[profile?]
	>=dev-haskell/primitive-unlifted-0.1.2:=[profile?] <dev-haskell/primitive-unlifted-0.2:=[profile?]
	>=dev-haskell/run-st-0.1:=[profile?] <dev-haskell/run-st-0.2:=[profile?]
	>=dev-haskell/text-short-0.1.3:=[profile?] <dev-haskell/text-short-0.2:=[profile?]
	>=dev-haskell/wide-word-0.1.0.9:=[profile?] <dev-haskell/wide-word-0.2:=[profile?]
	dev-haskell/zigzag:=[profile?]
	>=dev-lang/ghc-8.10.1:=
	checked? ( >=dev-haskell/primitive-checked-0.7:=[profile?] <dev-haskell/primitive-checked-0.8:=[profile?] )
	!checked? ( >=dev-haskell/primitive-0.7:=[profile?] <dev-haskell/primitive-0.8:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.2.0.0
	test? ( >=dev-haskell/quickcheck-2.13.1 <dev-haskell/quickcheck-2.15
		>=dev-haskell/quickcheck-classes-0.6.4
		>=dev-haskell/quickcheck-instances-0.3.22
		>=dev-haskell/tasty-1.2.3
		>=dev-haskell/tasty-hunit-0.10.0.2 <dev-haskell/tasty-hunit-0.11
		>=dev-haskell/tasty-quickcheck-0.10.1 <dev-haskell/tasty-quickcheck-0.11
		dev-haskell/vector
		checked? ( dev-haskell/primitive ) )
"

src_prepare() {
	default

	cabal_chdeps \
		'tasty >=1.2.3 && <1.3' 'tasty >=1.2.3'
}

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag checked checked)
}