x11-misc/portfolio: enable py3.11, py3.12 and disable py3.10

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2023-09-27 21:02:41 +03:00
parent d38a4ae2ad
commit 82fc9edb01
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
1 changed files with 36 additions and 14 deletions

View File

@ -1,22 +1,22 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..10} )
PYTHON_COMPAT=( python3_{11..12} )
inherit python-single-r1 gnome2-utils meson xdg
inherit gnome2-utils meson python-single-r1 virtualx xdg
DESCRIPTION="Minimalist file manager for those who want to use Linux mobile devices"
HOMEPAGE="https://github.com/tchx84/Portfolio"
if [[ "${PV}" == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/tchx84/${PN^}.git"
EGIT_REPO_URI="https://github.com/tchx84/Portfolio.git"
else
SRC_URI="https://github.com/tchx84/${PN^}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI="https://github.com/tchx84/Portfolio/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}"/${P^}
S="${WORKDIR}/${P^}"
fi
RESTRICT="!test? ( test )"
@ -27,10 +27,10 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
dev-libs/appstream-glib[introspection]
x11-libs/gtk+:3[introspection]
dev-libs/gobject-introspection
gui-libs/gtk:4[introspection]
gui-libs/libadwaita:1[introspection]
$(python_gen_cond_dep '
dev-python/pycairo[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]
')
"
@ -38,24 +38,46 @@ DEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
dev-python/black[${PYTHON_USEDEP}]
dev-python/pyflakes[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
')
)
"
BDEPEND="sys-devel/gettext"
pkg_setup() {
python-single-r1_pkg_setup
}
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
}
src_install() {
meson_src_install
python_optimize
python_fix_shebang "${D}"/usr/bin/dev.tchx84.Portfolio
}
# TODO: find a better way to fix the python script
echo "#!/usr/bin/${EPYTHON}
$(cat ${D}/usr/bin/dev.tchx84.Portfolio)" > "${D}/usr/bin/dev.tchx84.Portfolio" || die
src_test() {
virtx meson_src_test
}
pkg_preinst() {