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

EAPI=8

inherit qmake-utils xdg

if [[ ${PV} == 9999 ]]; then
    KEYWORDS=""
    EGIT_REPO_URI="https://gitlab.com/ubports/development/core/${PN}.git"
    inherit git-r3
else
    KEYWORDS="~amd64"
    SRC_URI="https://gitlab.com/ubports/development/core/${PN}/-/archive/${PV}/${P}.tar.gz"
fi

DESCRIPTION="Suru style for QtQuick Controls 2"
HOMEPAGE="https://gitlab.com/ubports/development/core/${PN}"
LICENSE="GPL-2 LGPL-3"
SLOT="5"
RESTRICT="test mirror"

DEPEND="
    dev-qt/qtgui:5
    dev-qt/qtquickcontrols2:5
"

RDEPEND="${DEPEND}"

BDEPEND="
    dev-util/intltool
    dev-qt/qtdeclarative:5
"

src_configure() {
    eqmake5
}

src_install() {
    emake install INSTALL_ROOT="${D}"
}