# Copyright 2020-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit qmake-utils

DESCRIPTION="Zenity Clone for Qt5 (lanodan's branch)"
HOMEPAGE="https://github.com/lanodan/qarma"
SRC_URI="https://github.com/luebking/qarma/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+dbus +X"

DEPEND="dev-qt/qtbase:6[X?,dbus?,gui,widgets]"
RDEPEND="${DEPEND}"

PATCHES=(
	"${FILESDIR}/1.1.0-0001-Make-DBus-optionnal.patch"
	"${FILESDIR}/1.1.0-0002-Allow-to-disable-X11-support.patch"
)

src_configure() {
	eqmake6 \
		$(usex dbus "" "CONFIG+=DISABLE_DBUS") \
		$(usex X "" "CONFIG+=DISABLE_X11")
}

src_install() {
	dobin qarma
}