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

# examples:
#   - gui-libs/qmltermwidget
#   - lomiri-base/lomiri-ui-toolkit

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"

DEPEND="
    dev-qt/qtgui:5
"

RDEPEND="${DEPEND}"

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

#PATCHES=(
#    "${FILESDIR}"/
#)

src_configure() {
    eqmake5
}

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

#pkg_postinst() {
#    xdg_pkg_postinst
#}

#pkg_postrm() {
#    xdg_pkg_postrm
#}