summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2021-10-01 22:46:47 +0900
committerAkinori Hattori <hattya@gentoo.org>2021-10-01 22:46:47 +0900
commitd026f0a1348ea9576796ba490a5d11b376f5e53d (patch)
tree070803a5b01306a25373d72e328b1fa954481f3c
parentsys-devel/llvm-common: Remove 13.0.0 RCs (diff)
downloadgentoo-d026f0a1.tar.gz
gentoo-d026f0a1.tar.bz2
gentoo-d026f0a1.zip
media-libs/libsixel: add python USE flag
Closes: https://bugs.gentoo.org/743637 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Akinori Hattori <hattya@gentoo.org>
-rw-r--r--media-libs/libsixel/libsixel-1.8.6.ebuild52
1 files changed, 45 insertions, 7 deletions
diff --git a/media-libs/libsixel/libsixel-1.8.6.ebuild b/media-libs/libsixel/libsixel-1.8.6.ebuild
index ad139ad3d010..0cb049507e88 100644
--- a/media-libs/libsixel/libsixel-1.8.6.ebuild
+++ b/media-libs/libsixel/libsixel-1.8.6.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
+PYTHON_COMPAT=( python3_{7..10} )
+DISTUTILS_OPTIONAL="1"
-inherit bash-completion-r1
+inherit bash-completion-r1 distutils-r1
DESCRIPTION="A lightweight, fast implementation of DEC SIXEL graphics codec"
HOMEPAGE="https://github.com/saitoha/libsixel"
@@ -12,15 +14,30 @@ SRC_URI="https://github.com/saitoha/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT public-domain"
SLOT="0"
KEYWORDS="amd64 ~ia64 x86"
-IUSE="curl gd gtk jpeg png static-libs"
+IUSE="curl gd gtk jpeg png python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="curl? ( net-misc/curl )
gd? ( media-libs/gd )
gtk? ( x11-libs/gdk-pixbuf:2 )
jpeg? ( virtual/jpeg:0 )
- png? ( media-libs/libpng:0 )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
+ png? ( media-libs/libpng:0 )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )"
+
+src_prepare() {
+ default
+ if use python; then
+ cd python || die
+ distutils-r1_src_prepare
+ cd - >/dev/null || die
+ fi
+}
src_configure() {
econf \
@@ -32,6 +49,20 @@ src_configure() {
$(use_enable static-libs static) \
--with-bashcompletiondir=$(get_bashcompdir) \
--disable-python
+ if use python; then
+ cd python || die
+ distutils-r1_src_configure
+ cd - >/dev/null || die
+ fi
+}
+
+src_compile() {
+ default
+ if use python; then
+ cd python || die
+ distutils-r1_src_compile
+ cd - >/dev/null || die
+ fi
}
src_test() {
@@ -42,8 +73,15 @@ src_install() {
default
use static-libs || find "${ED}" -name '*.la' -delete || die
- cd images
+ cd images || die
docompress -x /usr/share/doc/${PF}/images
docinto images
dodoc egret.jpg map{8,16}.png snake.jpg vimperator3.png
+ cd - >/dev/null || die
+
+ if use python; then
+ cd python || die
+ distutils-r1_src_install
+ cd - >/dev/null || die
+ fi
}