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

EAPI=8

# ebuild generated by hackport 0.5.1.9999

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

DESCRIPTION="Serialize instance for Message Pack Object"
HOMEPAGE="https://github.com/rodrigosetti/messagepack"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

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

RDEPEND=">=dev-haskell/cereal-0.5:=[profile?] <dev-haskell/cereal-0.6:=[profile?]
	>=dev-lang/ghc-7.6.1:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-1.16.0
	test? ( >=dev-haskell/quickcheck-2 <dev-haskell/quickcheck-3
		>=dev-haskell/test-framework-0.8 <dev-haskell/test-framework-0.9
		>=dev-haskell/test-framework-quickcheck2-0.3 <dev-haskell/test-framework-quickcheck2-0.4
		>=dev-haskell/test-framework-th-0.2 <dev-haskell/test-framework-th-0.3 )
"

src_prepare() {
	default

	# As per https://hackage.haskell.org/package/messagepack-0.5.4/revisions/
	cabal_chdeps\
		'base       == 4.*' 'base >=4.6 && <5'\
		'deepseq' 'deepseq >=1.1 && <1.5'\
		'containers == 0.5.*' 'containers >=0.5 && <0.7'\
		'containers                 == 0.5.*' 'containers >=0.5 && <0.7'
}