1 |
commit: d026f0a1348ea9576796ba490a5d11b376f5e53d |
2 |
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 1 13:46:47 2021 +0000 |
4 |
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 1 13:46:47 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d026f0a1 |
7 |
|
8 |
media-libs/libsixel: add python USE flag |
9 |
|
10 |
Closes: https://bugs.gentoo.org/743637 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org> |
13 |
|
14 |
media-libs/libsixel/libsixel-1.8.6.ebuild | 52 ++++++++++++++++++++++++++----- |
15 |
1 file changed, 45 insertions(+), 7 deletions(-) |
16 |
|
17 |
diff --git a/media-libs/libsixel/libsixel-1.8.6.ebuild b/media-libs/libsixel/libsixel-1.8.6.ebuild |
18 |
index ad139ad3d01..0cb049507e8 100644 |
19 |
--- a/media-libs/libsixel/libsixel-1.8.6.ebuild |
20 |
+++ b/media-libs/libsixel/libsixel-1.8.6.ebuild |
21 |
@@ -1,9 +1,11 @@ |
22 |
-# Copyright 1999-2020 Gentoo Authors |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
EAPI="7" |
27 |
+PYTHON_COMPAT=( python3_{7..10} ) |
28 |
+DISTUTILS_OPTIONAL="1" |
29 |
|
30 |
-inherit bash-completion-r1 |
31 |
+inherit bash-completion-r1 distutils-r1 |
32 |
|
33 |
DESCRIPTION="A lightweight, fast implementation of DEC SIXEL graphics codec" |
34 |
HOMEPAGE="https://github.com/saitoha/libsixel" |
35 |
@@ -12,15 +14,30 @@ SRC_URI="https://github.com/saitoha/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
36 |
LICENSE="MIT public-domain" |
37 |
SLOT="0" |
38 |
KEYWORDS="amd64 ~ia64 x86" |
39 |
-IUSE="curl gd gtk jpeg png static-libs" |
40 |
+IUSE="curl gd gtk jpeg png python static-libs" |
41 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
42 |
|
43 |
RDEPEND="curl? ( net-misc/curl ) |
44 |
gd? ( media-libs/gd ) |
45 |
gtk? ( x11-libs/gdk-pixbuf:2 ) |
46 |
jpeg? ( virtual/jpeg:0 ) |
47 |
- png? ( media-libs/libpng:0 )" |
48 |
-DEPEND="${RDEPEND} |
49 |
- virtual/pkgconfig" |
50 |
+ png? ( media-libs/libpng:0 ) |
51 |
+ python? ( ${PYTHON_DEPS} )" |
52 |
+DEPEND="${RDEPEND}" |
53 |
+BDEPEND="virtual/pkgconfig |
54 |
+ python? ( |
55 |
+ ${PYTHON_DEPS} |
56 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
57 |
+ )" |
58 |
+ |
59 |
+src_prepare() { |
60 |
+ default |
61 |
+ if use python; then |
62 |
+ cd python || die |
63 |
+ distutils-r1_src_prepare |
64 |
+ cd - >/dev/null || die |
65 |
+ fi |
66 |
+} |
67 |
|
68 |
src_configure() { |
69 |
econf \ |
70 |
@@ -32,6 +49,20 @@ src_configure() { |
71 |
$(use_enable static-libs static) \ |
72 |
--with-bashcompletiondir=$(get_bashcompdir) \ |
73 |
--disable-python |
74 |
+ if use python; then |
75 |
+ cd python || die |
76 |
+ distutils-r1_src_configure |
77 |
+ cd - >/dev/null || die |
78 |
+ fi |
79 |
+} |
80 |
+ |
81 |
+src_compile() { |
82 |
+ default |
83 |
+ if use python; then |
84 |
+ cd python || die |
85 |
+ distutils-r1_src_compile |
86 |
+ cd - >/dev/null || die |
87 |
+ fi |
88 |
} |
89 |
|
90 |
src_test() { |
91 |
@@ -42,8 +73,15 @@ src_install() { |
92 |
default |
93 |
use static-libs || find "${ED}" -name '*.la' -delete || die |
94 |
|
95 |
- cd images |
96 |
+ cd images || die |
97 |
docompress -x /usr/share/doc/${PF}/images |
98 |
docinto images |
99 |
dodoc egret.jpg map{8,16}.png snake.jpg vimperator3.png |
100 |
+ cd - >/dev/null || die |
101 |
+ |
102 |
+ if use python; then |
103 |
+ cd python || die |
104 |
+ distutils-r1_src_install |
105 |
+ cd - >/dev/null || die |
106 |
+ fi |
107 |
} |