1 |
commit: 108573083b138c84cee97259b1a43e5cc8806702 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 8 16:43:30 2019 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 8 16:43:30 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10857308 |
7 |
|
8 |
media-gfx/openclipart: Port to EAPI 7 |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
media-gfx/openclipart/openclipart-0.20.ebuild | 35 +++++++++++---------------- |
14 |
1 file changed, 14 insertions(+), 21 deletions(-) |
15 |
|
16 |
diff --git a/media-gfx/openclipart/openclipart-0.20.ebuild b/media-gfx/openclipart/openclipart-0.20.ebuild |
17 |
index f512de948c2..948ede6c83f 100644 |
18 |
--- a/media-gfx/openclipart/openclipart-0.20.ebuild |
19 |
+++ b/media-gfx/openclipart/openclipart-0.20.ebuild |
20 |
@@ -1,44 +1,37 @@ |
21 |
-# Copyright 1999-2014 Gentoo Foundation |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
-EAPI="2" |
26 |
+EAPI=7 |
27 |
|
28 |
DESCRIPTION="Open Clip Art Library (openclipart.org)" |
29 |
HOMEPAGE="http://www.openclipart.org/" |
30 |
- |
31 |
SRC_URI="http://download.openclipart.org/downloads/${PV}/${P}.tar.bz2" |
32 |
+ |
33 |
LICENSE="public-domain" |
34 |
SLOT="0" |
35 |
KEYWORDS="amd64 ppc x86" |
36 |
IUSE="svg png gzip" |
37 |
|
38 |
-# We don't really need anything to run |
39 |
-DEPEND="" |
40 |
-RDEPEND="" |
41 |
- |
42 |
# suggested basedir for cliparts |
43 |
CLIPART="/usr/share/clipart/${PN}" |
44 |
|
45 |
src_compile() { |
46 |
- local removeext |
47 |
+ local removeext=( $(usev !png) $(usev !svg) ) |
48 |
+ [[ -z ${removeext} ]] && elog "No image formats specified - defaulting to all (png and svg)" |
49 |
|
50 |
- if ! use svg && ! use png; then |
51 |
- elog "No image formats specified - defaulting to all (png and svg)" |
52 |
- else |
53 |
- ! use png && removeext="${removeext} png" |
54 |
- ! use svg && removeext="${removeext} svg" |
55 |
- fi |
56 |
- |
57 |
- for ext in ${removeext}; do |
58 |
- elog "Removing ${ext} files..." |
59 |
- find -name "*.${ext}" -exec rm -f {} \; \ |
60 |
- || die "Failed - remove" |
61 |
+ local i |
62 |
+ for i in "${removeext[@]}"; do |
63 |
+ elog "Removing ${i} files..." |
64 |
+ find -name "*.${i}" -delete || die "Failed removing files (${i})" |
65 |
done |
66 |
|
67 |
if use gzip; then |
68 |
einfo "Compressing SVG files..." |
69 |
- find -name "*.svg" -print0 | xargs -L 1 -0 \ |
70 |
- bash -c 'gzip -9c "${1}" > "${1}z"; rm -f "${1}"' -- |
71 |
+ |
72 |
+ while IFS="" read -d $'\0' -r i ; do |
73 |
+ gzip -9c "${i}" >"${i}z" || die "Failed compressing ${i}" |
74 |
+ rm -f "${i}" || die "Failed removing temporary ${i}" |
75 |
+ done < <(find "${S}" -name "*.svg" -print0) |
76 |
fi |
77 |
} |