public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Akinori Hattori" <hattya@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libsixel/
Date: Fri,  1 Oct 2021 13:52:54 +0000 (UTC)	[thread overview]
Message-ID: <1633096007.d026f0a1348ea9576796ba490a5d11b376f5e53d.hattya@gentoo> (raw)

commit:     d026f0a1348ea9576796ba490a5d11b376f5e53d
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  1 13:46:47 2021 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Fri Oct  1 13:46:47 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d026f0a1

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 <AT> gentoo.org>

 media-libs/libsixel/libsixel-1.8.6.ebuild | 52 ++++++++++++++++++++++++++-----
 1 file 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 ad139ad3d01..0cb049507e8 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
 }


             reply	other threads:[~2021-10-01 13:52 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-01 13:52 Akinori Hattori [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-24 13:07 [gentoo-commits] repo/gentoo:master commit in: media-libs/libsixel/ Akinori Hattori
2024-04-14  5:47 Akinori Hattori
2024-04-14  5:47 Akinori Hattori
2024-04-14  5:47 Akinori Hattori
2023-04-30  5:21 Akinori Hattori
2023-04-30  5:21 Akinori Hattori
2023-02-26 18:16 Arthur Zamarin
2023-01-13  4:40 Sam James
2023-01-13  3:50 Sam James
2023-01-12 22:00 Ionen Wolkens
2023-01-11 11:42 Ionen Wolkens
2022-12-11 11:35 Jakov Smolić
2022-12-11  2:44 Sam James
2022-12-11  2:37 Sam James
2022-08-12 13:34 Akinori Hattori
2022-08-12 11:55 Agostino Sarubbo
2022-08-08 12:34 Agostino Sarubbo
2022-05-17  7:56 WANG Xuerui
2021-10-02 13:12 Akinori Hattori
2020-04-30 12:59 Akinori Hattori
2020-04-30 12:59 Akinori Hattori
2020-04-30 12:59 Akinori Hattori
2020-03-01  2:02 Akinori Hattori
2018-07-23 13:15 Akinori Hattori
2018-07-23 13:15 Akinori Hattori
2018-07-23 13:15 Akinori Hattori
2018-07-23 13:15 Akinori Hattori
2018-07-23 13:15 Akinori Hattori
2018-06-23  7:15 Akinori Hattori
2018-06-23  7:15 Akinori Hattori
2018-01-02 11:08 Mike Frysinger
2017-02-06 13:41 Akinori Hattori
2017-02-06 13:41 Akinori Hattori
2016-09-15 13:45 Akinori Hattori
2016-09-15 13:45 Akinori Hattori
2016-04-10 13:07 Akinori Hattori
2016-03-12  7:38 Akinori Hattori
2016-02-27  5:58 Akinori Hattori
2015-11-29 15:42 Akinori Hattori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1633096007.d026f0a1348ea9576796ba490a5d11b376f5e53d.hattya@gentoo \
    --to=hattya@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox