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

EAPI=8

# ebuild generated by hackport 0.8.4.0.9999

CABAL_HACKAGE_REVISION=3

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

DESCRIPTION="multipart/form-data (e.g file upload) support for servant"
HOMEPAGE="https://github.com/haskell-servant/servant-multipart#readme"

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

CABAL_CHDEPS=(
	'servant             >=0.16     && <0.20' 'servant             >=0.16     && <0.21'
	'servant-client-core >=0.16     && <0.20' 'servant-client-core >=0.16     && <0.21'
)

RDEPEND="dev-haskell/http-client:=[profile?]
	>=dev-haskell/http-media-0.7.1.3:=[profile?] <dev-haskell/http-media-0.9:=[profile?]
	>=dev-haskell/network-2.8:=[profile?] <dev-haskell/network-3.2:=[profile?]
	>=dev-haskell/random-0.1.1:=[profile?] <dev-haskell/random-1.3:=[profile?]
	>=dev-haskell/servant-0.16:=[profile?] <dev-haskell/servant-0.21:=[profile?]
	dev-haskell/servant-client:=[profile?]
	>=dev-haskell/servant-client-core-0.16:=[profile?] <dev-haskell/servant-client-core-0.21:=[profile?]
	dev-haskell/servant-multipart:=[profile?]
	>=dev-haskell/servant-multipart-api-0.12:=[profile?] <dev-haskell/servant-multipart-api-0.13:=[profile?]
	dev-haskell/servant-server:=[profile?]
	>=dev-haskell/text-1.2.3.0:=[profile?] <dev-haskell/text-2.1:=[profile?]
	dev-haskell/warp:=[profile?]
	>=dev-lang/ghc-8.10.6:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.2.1.0
"

PATCHES=(
	"${FILESDIR}/${P}-servant20-support.patch"
)