# Copyright 1999-2025 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 test-suite"
inherit haskell-cabal

DESCRIPTION="HTTP/3 library"
HOMEPAGE="https://github.com/kazu-yamamoto/http3"

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

RDEPEND="dev-haskell/async:=[profile?]
	dev-haskell/case-insensitive:=[profile?]
	>=dev-haskell/http-semantics-0.3:=[profile?] <dev-haskell/http-semantics-0.4:=[profile?]
	dev-haskell/http-types:=[profile?]
	>=dev-haskell/http2-5.3.4:=[profile?] <dev-haskell/http2-5.4:=[profile?]
	dev-haskell/network:=[profile?]
	dev-haskell/network-byte-order:=[profile?]
	>=dev-haskell/quic-0.2:=[profile?] <dev-haskell/quic-0.3:=[profile?]
	dev-haskell/sockaddr:=[profile?]
	>=dev-haskell/time-manager-0.2:=[profile?] <dev-haskell/time-manager-0.3:=[profile?]
	>=dev-lang/ghc-9.0.2:=
	devel? ( dev-haskell/attoparsec:=[profile?]
			dev-haskell/base16-bytestring:=[profile?]
			dev-haskell/conduit:=[profile?]
			dev-haskell/conduit-extra:=[profile?]
			dev-haskell/crypton:=[profile?]
			<dev-haskell/tls-2.2:=[profile?]
			dev-haskell/tls-session-manager:=[profile?]
			dev-haskell/unix-time:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( >=dev-haskell/hspec-1.3
		dev-haskell/iproute
		dev-haskell/quickcheck
		!devel? ( dev-haskell/attoparsec
				dev-haskell/base16-bytestring
				dev-haskell/conduit
				dev-haskell/conduit-extra
				dev-haskell/crypton
				dev-haskell/tls ) )
"

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