From 82fc9edb017d4e1a84c3a720fd66dee7a2f157b0 Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Wed, 27 Sep 2023 21:02:41 +0300 Subject: [PATCH] x11-misc/portfolio: enable py3.11, py3.12 and disable py3.10 Signed-off-by: Alfred Wingate --- x11-misc/portfolio/portfolio-9999.ebuild | 50 +++++++++++++++++------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/x11-misc/portfolio/portfolio-9999.ebuild b/x11-misc/portfolio/portfolio-9999.ebuild index 78159c1..cfcf05c 100644 --- a/x11-misc/portfolio/portfolio-9999.ebuild +++ b/x11-misc/portfolio/portfolio-9999.ebuild @@ -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() {