2024-02-13 14:24:42 +01:00
|
|
|
# Copyright 1999-2024 Gentoo Authors
|
2021-01-02 02:28:32 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2022-07-05 20:32:47 +02:00
|
|
|
EAPI=8
|
2021-01-02 02:28:32 +01:00
|
|
|
|
2023-09-27 20:02:41 +02:00
|
|
|
PYTHON_COMPAT=( python3_{11..12} )
|
2021-01-02 02:28:32 +01:00
|
|
|
|
2023-09-27 20:02:41 +02:00
|
|
|
inherit gnome2-utils meson python-single-r1 virtualx xdg
|
2021-01-02 02:28:32 +01:00
|
|
|
|
|
|
|
DESCRIPTION="Minimalist file manager for those who want to use Linux mobile devices"
|
|
|
|
HOMEPAGE="https://github.com/tchx84/Portfolio"
|
|
|
|
|
2022-07-05 20:32:47 +02:00
|
|
|
if [[ "${PV}" == *9999* ]] ; then
|
2021-01-02 02:28:32 +01:00
|
|
|
inherit git-r3
|
2023-09-27 20:02:41 +02:00
|
|
|
EGIT_REPO_URI="https://github.com/tchx84/Portfolio.git"
|
2021-01-02 02:28:32 +01:00
|
|
|
else
|
2023-09-27 20:02:41 +02:00
|
|
|
SRC_URI="https://github.com/tchx84/Portfolio/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
2022-07-05 20:32:47 +02:00
|
|
|
KEYWORDS="~amd64 ~x86"
|
2023-09-27 20:02:41 +02:00
|
|
|
S="${WORKDIR}/${P^}"
|
2021-01-02 02:28:32 +01:00
|
|
|
fi
|
|
|
|
|
2022-07-05 20:32:47 +02:00
|
|
|
LICENSE="GPL-3+"
|
2021-01-02 02:28:32 +01:00
|
|
|
SLOT="0"
|
|
|
|
IUSE="test"
|
|
|
|
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
2024-02-13 14:24:42 +01:00
|
|
|
RESTRICT="!test? ( test )"
|
2021-01-02 02:28:32 +01:00
|
|
|
|
2021-01-02 02:37:10 +01:00
|
|
|
RDEPEND="
|
2021-01-02 02:28:32 +01:00
|
|
|
${PYTHON_DEPS}
|
2023-09-27 20:02:41 +02:00
|
|
|
dev-libs/gobject-introspection
|
|
|
|
gui-libs/gtk:4[introspection]
|
|
|
|
gui-libs/libadwaita:1[introspection]
|
2021-01-02 02:28:32 +01:00
|
|
|
$(python_gen_cond_dep '
|
2022-07-05 20:32:47 +02:00
|
|
|
dev-python/pygobject:3[${PYTHON_USEDEP}]
|
2021-01-02 02:28:32 +01:00
|
|
|
')
|
2021-01-07 20:28:05 +01:00
|
|
|
"
|
|
|
|
DEPEND="
|
|
|
|
${RDEPEND}
|
2021-01-02 02:37:10 +01:00
|
|
|
test? (
|
2022-07-05 20:32:47 +02:00
|
|
|
$(python_gen_cond_dep '
|
|
|
|
dev-python/pytest[${PYTHON_USEDEP}]
|
|
|
|
')
|
2021-01-02 02:37:10 +01:00
|
|
|
)
|
2021-01-02 02:28:32 +01:00
|
|
|
"
|
2023-09-27 20:02:41 +02:00
|
|
|
BDEPEND="sys-devel/gettext"
|
2021-01-02 02:28:32 +01:00
|
|
|
|
|
|
|
pkg_setup() {
|
|
|
|
python-single-r1_pkg_setup
|
|
|
|
}
|
|
|
|
|
2023-09-27 20:02:41 +02:00
|
|
|
src_prepare() {
|
|
|
|
eapply_user
|
|
|
|
|
|
|
|
# Don't validate data files even if found.
|
|
|
|
sed -Ei \
|
|
|
|
-e 's/^((appstream_util|desktop_utils|compile_schemas) =).*$/\1 disabler()/' \
|
|
|
|
data/meson.build || die
|
|
|
|
|
|
|
|
# Don't enable linting tests even if found.
|
|
|
|
sed -Ei \
|
|
|
|
-e 's/^((pyflakes|black) =).*$/\1 disabler()/' \
|
|
|
|
tests/meson.build || die
|
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
local emesonargs=(
|
|
|
|
$(meson_use test run_service_tests)
|
|
|
|
)
|
|
|
|
|
|
|
|
meson_src_configure
|
|
|
|
}
|
|
|
|
|
2021-01-02 02:28:32 +01:00
|
|
|
src_install() {
|
|
|
|
meson_src_install
|
|
|
|
python_optimize
|
2023-09-27 20:02:41 +02:00
|
|
|
python_fix_shebang "${D}"/usr/bin/dev.tchx84.Portfolio
|
|
|
|
}
|
2021-01-02 02:28:32 +01:00
|
|
|
|
2023-09-27 20:02:41 +02:00
|
|
|
src_test() {
|
|
|
|
virtx meson_src_test
|
2021-01-02 02:28:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
pkg_preinst() {
|
|
|
|
gnome2_schemas_savelist
|
|
|
|
xdg_pkg_preinst
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
gnome2_gconf_install
|
|
|
|
gnome2_schemas_update
|
|
|
|
xdg_pkg_postinst
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postrm() {
|
|
|
|
gnome2_gconf_uninstall
|
|
|
|
gnome2_schemas_update
|
|
|
|
xdg_pkg_postrm
|
|
|
|
}
|