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

EAPI=8

# ebuild generated by hackport 0.7.1.1.9999

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

DESCRIPTION="A standalone StatusNotifierItem/AppIndicator tray"
HOMEPAGE="https://github.com/IvanMalison/gtk-sni-tray#readme"
SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz"

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

PATCHES=( "${FILESDIR}/${PN}-0.1.8.0-add-executable-flag.patch" )

RDEPEND=">=dev-haskell/dbus-1.0.0:=[profile?] <dev-haskell/dbus-2.0.0:=[profile?]
	>=dev-haskell/enclosed-exceptions-1.0.0.1:=[profile?]
	dev-haskell/gi-cairo:=[profile?]
	dev-haskell/gi-cairo-connector:=[profile?]
	dev-haskell/gi-cairo-render:=[profile?]
	dev-haskell/gi-dbusmenugtk3:=[profile?]
	dev-haskell/gi-gdk:=[profile?]
	>=dev-haskell/gi-gdkpixbuf-2.0.16:=[profile?]
	dev-haskell/gi-glib:=[profile?]
	>=dev-haskell/gi-gtk-3.0.21:=[profile?]
	>=dev-haskell/gtk-strut-0.1.2.1:=[profile?]
	>=dev-haskell/haskell-gi-0.21.2:=[profile?]
	>=dev-haskell/haskell-gi-base-0.21.1:=[profile?]
	dev-haskell/hslogger:=[profile?]
	>=dev-haskell/status-notifier-item-0.3.1.0:=[profile?] <dev-haskell/status-notifier-item-0.4.0.0:=[profile?]
	>=dev-haskell/transformers-base-0.4:=[profile?]
	>=dev-lang/ghc-8.4.3:=
	x11-libs/gtk+:3
	executable? ( >=dev-haskell/dbus-hslogger-0.1.0.1:=[profile?] <dev-haskell/dbus-hslogger-0.2.0.0:=[profile?]
			dev-haskell/optparse-applicative:=[profile?] )
"
DEPEND="${RDEPEND}
	>=dev-haskell/cabal-2.2.0.1
	virtual/pkgconfig
"

src_configure() {
	haskell-cabal_src_configure \
		$(cabal_flag executable executable)
}