src_prepare-overlay/x11-misc/portfolio/portfolio-0.9.2-r1.ebuild
Maciej Barć 6e53aa6cd4
x11-misc/portfolio: fix
Signed-off-by: Maciej Barć <xgqt@gentoo.org>
2022-07-05 20:35:59 +02:00

77 lines
1.5 KiB
Bash

# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{9..10} )
inherit python-single-r1 gnome2-utils meson 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"
else
SRC_URI="https://github.com/tchx84/${PN^}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}"/${P^}
fi
RESTRICT="!test? ( test )"
LICENSE="GPL-3+"
SLOT="0"
IUSE="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
${PYTHON_DEPS}
dev-libs/appstream-glib[introspection]
x11-libs/gtk+:3[introspection]
$(python_gen_cond_dep '
dev-python/pycairo[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]
')
"
DEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
dev-python/black[${PYTHON_USEDEP}]
dev-python/pyflakes[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
')
)
"
pkg_setup() {
python-single-r1_pkg_setup
}
src_install() {
meson_src_install
python_optimize
# 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
}
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
}