pentoo-overlay/app-misc/mat2/mat2-0.13.0.ebuild
2022-11-09 09:16:30 +08:00

67 lines
1.4 KiB
Bash

# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="xml"
inherit desktop distutils-r1 xdg-utils
DESCRIPTION="A handy tool to trash your metadata"
HOMEPAGE="https://0xacab.org/jvoisin/mat2"
SRC_URI="https://0xacab.org/jvoisin/mat2/-/archive/${PV}/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
LICENSE="GPL-3"
SLOT="0"
IUSE="dolphin ffmpeg +exif nautilus test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
test? ( exif ffmpeg )"
RESTRICT="!test? ( test )"
DEPEND="${PYTHON_DEPS}"
RDEPEND="${DEPEND}
media-libs/mutagen[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]
dev-python/pycairo[${PYTHON_USEDEP}]
app-text/poppler[introspection,cairo]
dev-libs/glib
exif? ( media-libs/exiftool )
gnome-base/librsvg:2[introspection]
ffmpeg? ( virtual/ffmpeg )
nautilus? ( dev-python/nautilus-python )
x11-libs/gdk-pixbuf[introspection,jpeg,tiff]"
distutils_enable_tests unittest
python_install_all() {
distutils-r1_python_install_all
if use nautilus; then
insinto /usr/share/nautilus-python/extensions/
doins nautilus/mat2.py
fi
if use dolphin; then
insinto /usr/share/kservices5/ServiceMenus/
doins dolphin/mat2.desktop
fi
doicon -s 512 data/mat2.png
doicon -s scalable data/mat2.svg
doman doc/mat2.1
dodoc *.md doc/*.md
}
pkg_postinst() {
xdg_icon_cache_update
}
pkg_postrm() {
xdg_icon_cache_update
}