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

EAPI=8

# ebuild generated by hackport 0.8.5.1.9999
#hackport: flags: +ofd-locking

CABAL_HACKAGE_REVISION=5

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

DESCRIPTION="File locking"
HOMEPAGE="https://hackage.haskell.org/package/lukko"

LICENSE="GPL-2 BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"

RDEPEND=">=dev-lang/ghc-9.0.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( >=dev-haskell/async-2.2.2 <dev-haskell/async-2.3
		>=dev-haskell/singleton-bool-0.1.5 <dev-haskell/singleton-bool-0.2
		>=dev-haskell/tasty-hunit-0.10.0.2 <dev-haskell/tasty-hunit-0.11
		>=dev-haskell/temporary-1.3 <dev-haskell/temporary-1.4
		|| ( ( >=dev-haskell/tasty-1.4.0.1 <dev-haskell/tasty-1.5 )
			( >=dev-haskell/tasty-1.5 <dev-haskell/tasty-1.6 ) )
		|| ( ( >=dev-haskell/tasty-expected-failure-0.11.1.2 <dev-haskell/tasty-expected-failure-0.12 )
			( >=dev-haskell/tasty-expected-failure-0.12.2 <dev-haskell/tasty-expected-failure-0.13 ) ) )
"

CABAL_CHDEPS=(
	'base >=4.5 && <4.20' 'base >=4.5'
)

src_configure() {
	haskell-cabal_src_configure \
		--flag=ofd-locking
}