# Copyright 2016-2023 Bryan Gardiner <bog@khumba.net>
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# ebuild generated by hackport 0.5

CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
# Needed because haskell-cabal.eclass uses ${S} too early:
CABAL_FILE="${WORKDIR}/${P}/${PN}/${PN}.cabal"

inherit git-r3 haskell-cabal

DESCRIPTION="Qt bindings for Haskell"
HOMEPAGE="https://khumba.net/projects/qtah"
EGIT_REPO_URI="https://gitlab.com/khumba/qtah.git"
S="${WORKDIR}/${P}/${PN}"

LICENSE="LGPL-3+"
SLOT="0/${PV}"
KEYWORDS=""

RDEPEND=">=dev-haskell/hoppy-runtime-0.8:=[profile?]
	>=dev-haskell/qtah-cpp-9999:=[profile?]
	>=dev-haskell/qtah-generator-9999:=[profile?]
	>=dev-lang/ghc-8.2.1:=
	!dev-haskell/qtah-qt5
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-2.0
	test? ( >=dev-haskell/hunit-1.2 <dev-haskell/hunit-1.7 )
"

CABAL_CONFIGURE_FLAGS="--flags=qt5"

GHC_BOOTSTRAP_PACKAGES=(qtah-generator)