# 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

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

DESCRIPTION="Clash: a functional hardware description language - GHC frontend"
HOMEPAGE="https://clash-lang.org/"

LICENSE="BSD-2"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="dynamic ghc-paths workaround-ghc-mmap-crash"

RDEPEND="dev-haskell/cabal:=[profile?]
	~dev-haskell/clash-lib-1.8.1:=[profile?]
	~dev-haskell/clash-prelude-1.8.1:=[profile?]
	>=dev-haskell/concurrent-supply-0.1.7:=[profile?] <dev-haskell/concurrent-supply-0.2:=[profile?]
	>=dev-haskell/data-binary-ieee754-0.4.4:=[profile?] <dev-haskell/data-binary-ieee754-0.6:=[profile?]
	>=dev-haskell/extra-1.6:=[profile?] <dev-haskell/extra-1.8:=[profile?]
	>=dev-haskell/ghc-typelits-extra-0.3.2:=[profile?] <dev-haskell/ghc-typelits-extra-0.5:=[profile?]
	>=dev-haskell/ghc-typelits-knownnat-0.6:=[profile?] <dev-haskell/ghc-typelits-knownnat-0.8:=[profile?]
	>=dev-haskell/ghc-typelits-natnormalise-0.6:=[profile?] <dev-haskell/ghc-typelits-natnormalise-0.8:=[profile?]
	>=dev-haskell/hashable-1.1.2.3:=[profile?] <dev-haskell/hashable-1.5:=[profile?]
	>=dev-haskell/haskeline-0.7.0.3:=[profile?] <dev-haskell/haskeline-0.9:=[profile?]
	>=dev-haskell/lens-4.10:=[profile?] <dev-haskell/lens-5.3:=[profile?]
	>=dev-haskell/primitive-0.5.0.1:=[profile?] <dev-haskell/primitive-1.0:=[profile?]
	>=dev-haskell/reflection-2.1.2:=[profile?] <dev-haskell/reflection-3.0:=[profile?]
	>=dev-haskell/split-0.2.3:=[profile?] <dev-haskell/split-0.3:=[profile?]
	>=dev-haskell/string-interpolate-0.3:=[profile?] <dev-haskell/string-interpolate-0.4:=[profile?]
	>=dev-haskell/text-1.2.2:=[profile?] <dev-haskell/text-2.2:=[profile?]
	>=dev-haskell/uniplate-1.6.12:=[profile?] <dev-haskell/uniplate-1.8:=[profile?]
	>=dev-haskell/unordered-containers-0.2.1.0:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
	>=dev-haskell/utf8-string-1.0.0.0:=[profile?] <dev-haskell/utf8-string-1.1.0.0:=[profile?]
	>=dev-haskell/vector-0.11:=[profile?] <dev-haskell/vector-1.0:=[profile?]
	>=dev-lang/ghc-8.6.0:=[profile?] <dev-lang/ghc-9.9:=[profile?]
	>=dev-lang/ghc-8.8.1:=
	virtual/libc
	ghc-paths? ( dev-haskell/ghc-paths:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.0.0.0
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag dynamic dynamic) \
		$(cabal_flag ghc-paths use-ghc-paths) \
		$(cabal_flag workaround-ghc-mmap-crash workaround-ghc-mmap-crash)
}