# 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
#hackport: flags: -hans

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

DESCRIPTION="TLS protocol native implementation"
HOMEPAGE="https://github.com/haskell-tls/hs-tls"

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

RDEPEND=">=dev-haskell/asn1-encoding-0.9:=[profile?] <dev-haskell/asn1-encoding-0.10:=[profile?]
	>=dev-haskell/asn1-types-0.3:=[profile?] <dev-haskell/asn1-types-0.4:=[profile?]
	>=dev-haskell/async-2.2:=[profile?] <dev-haskell/async-2.3:=[profile?]
	dev-haskell/base16-bytestring:=[profile?]
	>=dev-haskell/cereal-0.5.3:=[profile?] <dev-haskell/cereal-0.6:=[profile?]
	>=dev-haskell/crypton-0.34:=[profile?]
	>=dev-haskell/crypton-x509-1.7:=[profile?] <dev-haskell/crypton-x509-1.8:=[profile?]
	>=dev-haskell/crypton-x509-store-1.6:=[profile?] <dev-haskell/crypton-x509-store-1.7:=[profile?]
	>=dev-haskell/crypton-x509-validation-1.6.5:=[profile?] <dev-haskell/crypton-x509-validation-1.7:=[profile?]
	>=dev-haskell/data-default-class-0.1:=[profile?] <dev-haskell/data-default-class-0.2:=[profile?]
	>=dev-haskell/memory-0.18:=[profile?] <dev-haskell/memory-0.19:=[profile?]
	>=dev-haskell/network-3.1:=[profile?]
	>=dev-haskell/serialise-0.2:=[profile?] <dev-haskell/serialise-0.3:=[profile?]
	>=dev-haskell/unix-time-0.4.11:=[profile?] <dev-haskell/unix-time-0.5:=[profile?]
	>=dev-lang/ghc-9.0.2:=
	devel? ( dev-haskell/crypton-x509-system:=[profile?]
			dev-haskell/network-run:=[profile?]
			dev-haskell/unliftio:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( dev-haskell/hourglass
		dev-haskell/hspec
		dev-haskell/quickcheck )
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag devel devel) \
		--flag=-hans
}