1 |
commit: ac427444d5deb09bb73cc5c6896f543c90b5f95e |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 28 15:28:25 2020 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 28 15:29:42 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac427444 |
7 |
|
8 |
media-gfx/optipng: EAPI 7 |
9 |
|
10 |
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.84, Repoman-2.3.20 |
12 |
|
13 |
media-gfx/optipng/optipng-0.7.7-r1.ebuild | 60 +++++++++++++++++++++++++++++++ |
14 |
1 file changed, 60 insertions(+) |
15 |
|
16 |
diff --git a/media-gfx/optipng/optipng-0.7.7-r1.ebuild b/media-gfx/optipng/optipng-0.7.7-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..11a75013d0a |
19 |
--- /dev/null |
20 |
+++ b/media-gfx/optipng/optipng-0.7.7-r1.ebuild |
21 |
@@ -0,0 +1,60 @@ |
22 |
+# Copyright 1999-2020 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+inherit toolchain-funcs |
28 |
+ |
29 |
+DESCRIPTION="Compress PNG files without affecting image quality" |
30 |
+HOMEPAGE="http://optipng.sourceforge.net/" |
31 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
32 |
+ |
33 |
+LICENSE="ZLIB" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris" |
36 |
+IUSE="" |
37 |
+ |
38 |
+RDEPEND="sys-libs/zlib |
39 |
+ media-libs/libpng:0=" |
40 |
+DEPEND="${RDEPEND} |
41 |
+ sys-apps/findutils" |
42 |
+ |
43 |
+DOCS=( AUTHORS.txt README.txt ) |
44 |
+ |
45 |
+src_prepare() { |
46 |
+ rm -R src/{libpng,zlib} || die |
47 |
+ find . -type d -name build -exec rm -R {} + || die |
48 |
+ |
49 |
+ # next release is almost a complete rewrite, so plug this compilation |
50 |
+ # problem in anticipation of the much (c)leaner(?) rewrite |
51 |
+ sed -i \ |
52 |
+ -e 's/^#if defined AT_FDCWD/#if (defined(AT_FDCWD) \&\& !(defined(__SVR4) \&\& defined(__sun)))/' \ |
53 |
+ src/optipng/ioutil.c || die |
54 |
+ |
55 |
+ tc-export CC AR RANLIB |
56 |
+ export LD=$(tc-getCC) |
57 |
+ |
58 |
+ eapply_user |
59 |
+} |
60 |
+ |
61 |
+src_configure() { |
62 |
+ ./configure \ |
63 |
+ -with-system-libpng \ |
64 |
+ -with-system-zlib \ |
65 |
+ || die "configure failed" |
66 |
+} |
67 |
+ |
68 |
+src_compile() { |
69 |
+ emake -C src/optipng |
70 |
+} |
71 |
+ |
72 |
+src_install() { |
73 |
+ einstalldocs |
74 |
+ |
75 |
+ dodoc doc/*.txt |
76 |
+ docinto html |
77 |
+ dodoc doc/*.html |
78 |
+ doman src/${PN}/man/${PN}.1 |
79 |
+ |
80 |
+ dobin src/${PN}/${PN} |
81 |
+} |