# 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: -use-pkg-config

CABAL_HACKAGE_REVISION=1

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

DESCRIPTION="low-level binding to libpq"
HOMEPAGE="https://github.com/haskellari/postgresql-libpq"

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

CABAL_CHDEPS=(
	'tasty             ^>=1.5' 'tasty >=1.4'
	)

RDEPEND=">=dev-haskell/postgresql-libpq-configure-0.11:=[profile?] <dev-haskell/postgresql-libpq-configure-0.12:=[profile?]
	>=dev-lang/ghc-9.0.2:=
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-3.4.1.0
	test? ( >=dev-haskell/tasty-1.4
		>=dev-haskell/tasty-hunit-0.10.1 <dev-haskell/tasty-hunit-0.11 )
"

src_configure() {
	haskell-cabal_src_configure \
		--flag=-use-pkg-config
}