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

EAPI=8

# ebuild generated by hackport 0.6.7.9999

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

DESCRIPTION="Minimal bindings to the FFmpeg library"
HOMEPAGE="https://github.com/acowley/ffmpeg-light"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="builddemo buildrasterdemo buildtranscodedemo buildvplaydemo"

RDEPEND="dev-haskell/either:=[profile?]
	dev-haskell/exceptions:=[profile?]
	>=dev-haskell/mtl-2.2.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?]
	>=dev-haskell/vector-0.10.9:=[profile?] <dev-haskell/vector-0.13:=[profile?]
	>=dev-lang/ghc-7.10.1:=
	media-video/ffmpeg
	buildrasterdemo? ( >=dev-haskell/juicypixels-3.2:=[profile?] <dev-haskell/juicypixels-3.4:=[profile?]
				>=dev-haskell/rasterific-0.3:=[profile?] )
	!buildrasterdemo? ( >=dev-haskell/juicypixels-3.1:=[profile?] <dev-haskell/juicypixels-3.4:=[profile?] )
	buildvplaydemo? ( dev-haskell/monad-loops:=[profile?]
				dev-haskell/sdl2:=[profile?]
				dev-haskell/text:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-1.22.2.0
	virtual/pkgconfig
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag builddemo builddemo) \
		$(cabal_flag buildrasterdemo buildrasterdemo) \
		$(cabal_flag buildtranscodedemo buildtranscodedemo) \
		$(cabal_flag buildvplaydemo buildvplaydemo)
}