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

EAPI=8

# ebuild generated by hackport 0.7.3.0

CABAL_HACKAGE_REVISION=2

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

DESCRIPTION="JSON pretty-printing library and command-line tool"
HOMEPAGE="https://github.com/informatikr/aeson-pretty"

LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE="+executable"

RDEPEND=">=dev-haskell/base-compat-0.9:=[profile?]
	>=dev-haskell/scientific-0.3:=[profile?]
	>=dev-haskell/unordered-containers-0.2.14.0:=[profile?]
	>=dev-haskell/vector-0.9:=[profile?]
	>=dev-lang/ghc-8.4.3:=
	>=dev-haskell/aeson-1.0:=[profile?] <dev-haskell/aeson-2.2:=[profile?]
	executable? ( >=dev-haskell/aeson-0.6:=[profile?]
			>=dev-haskell/attoparsec-0.10:=[profile?]
			>=dev-haskell/cmdargs-0.7:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-2.2.0.1
"

src_configure() {
	if use executable; then
		local lib_flag=-lib-only
	else
		local lib_flag=lib-only
	fi

	haskell-cabal_src_configure \
		--flag="${lib_flag}"
}