# 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
#hackport: flags: build-play-tomland:examples,build-readme:examples

CABAL_HACKAGE_REVISION=2

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

DESCRIPTION="Bidirectional TOML serialization"
HOMEPAGE="https://github.com/kowainik/tomland"

LICENSE="MPL-2.0"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="examples"

RDEPEND=">=dev-haskell/hashable-1.3.1.0:=[profile?] <dev-haskell/hashable-1.6:=[profile?]
	>=dev-haskell/megaparsec-7.0.5:=[profile?] <dev-haskell/megaparsec-9.8:=[profile?]
	>=dev-haskell/parser-combinators-1.1.0:=[profile?] <dev-haskell/parser-combinators-1.4:=[profile?]
	>=dev-haskell/text-1.2:=[profile?] <dev-haskell/text-2.2:=[profile?]
	>=dev-haskell/unordered-containers-0.2.7:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
	>=dev-haskell/validation-selective-0.1.0:=[profile?] <dev-haskell/validation-selective-0.3:=[profile?]
	>=dev-lang/ghc-9.0.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( >=dev-haskell/hedgehog-1.0.1 <dev-haskell/hedgehog-1.6
		>=dev-haskell/hspec-2.7.1 <dev-haskell/hspec-2.12
		>=dev-haskell/hspec-hedgehog-0.0.1.1 <dev-haskell/hspec-hedgehog-0.4
		>=dev-haskell/hspec-megaparsec-2.0.0 <dev-haskell/hspec-megaparsec-2.3.0 )
	examples? ( dev-haskell/markdown-unlit )
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag examples build-play-tomland) \
		$(cabal_flag examples build-readme)
}