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

EAPI=8

LOMIRI_PACKAGING_COMMIT="893b6267c94136bb8afa99094ad5d3bbb4b9b760"
inherit qmake-utils lomiri

LOMIRI_PACKAGING_URI="https://gitlab.com/ubports/development/core/packaging/${PN}/-/archive/${LOMIRI_PACKAGING_COMMIT}/${PN}-${LOMIRI_PACKAGING_COMMIT}.tar.gz \
            -> ${PN}-lomiri-package-${PV}.tar.gz"

git_commit="63228027e1f97c24abb907550b22ee91836929c5"

SRC_URI="https://github.com/gber/${PN}/archive/${git_commit}/${PN}-${git_commit}.tar.gz -> ${P}.tar.gz
        ${LOMIRI_PACKAGING_URI}"

KEYWORDS="~amd64"
DESCRIPTION="QML port of qtermwidget"
HOMEPAGE="https://github.com/gber/qmltermwidget"
LICENSE="GPL-2"
SLOT="0"
RESTRICT="test mirror"

DEPEND="
    dev-qt/qtgui:5
"

RDEPEND="${DEPEND}"

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

S="${WORKDIR}/${PN}-${git_commit}"

src_prepare() {
    lomiri_patch_debian_series

    default
}

src_configure() {
    eqmake5
}

src_compile() {
    default
}

src_install() {
    # parallel install is broken
    emake -j1 install INSTALL_ROOT="${D}"
}