diff options
author | David Seifert <soap@gentoo.org> | 2019-04-08 18:43:30 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2019-04-08 18:43:30 +0200 |
commit | 108573083b138c84cee97259b1a43e5cc8806702 (patch) | |
tree | 35ded6815e2fff4a5a4d7045c01260982fd62a78 /media-gfx | |
parent | media-sound/vkeybd: Port to EAPI 7 (diff) | |
download | gentoo-108573083b138c84cee97259b1a43e5cc8806702.tar.gz gentoo-108573083b138c84cee97259b1a43e5cc8806702.tar.bz2 gentoo-108573083b138c84cee97259b1a43e5cc8806702.zip |
media-gfx/openclipart: Port to EAPI 7
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/openclipart/openclipart-0.20.ebuild | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/media-gfx/openclipart/openclipart-0.20.ebuild b/media-gfx/openclipart/openclipart-0.20.ebuild index f512de948c2e..948ede6c83f1 100644 --- a/media-gfx/openclipart/openclipart-0.20.ebuild +++ b/media-gfx/openclipart/openclipart-0.20.ebuild @@ -1,44 +1,37 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="2" +EAPI=7 DESCRIPTION="Open Clip Art Library (openclipart.org)" HOMEPAGE="http://www.openclipart.org/" - SRC_URI="http://download.openclipart.org/downloads/${PV}/${P}.tar.bz2" + LICENSE="public-domain" SLOT="0" KEYWORDS="amd64 ppc x86" IUSE="svg png gzip" -# We don't really need anything to run -DEPEND="" -RDEPEND="" - # suggested basedir for cliparts CLIPART="/usr/share/clipart/${PN}" src_compile() { - local removeext + local removeext=( $(usev !png) $(usev !svg) ) + [[ -z ${removeext} ]] && elog "No image formats specified - defaulting to all (png and svg)" - if ! use svg && ! use png; then - elog "No image formats specified - defaulting to all (png and svg)" - else - ! use png && removeext="${removeext} png" - ! use svg && removeext="${removeext} svg" - fi - - for ext in ${removeext}; do - elog "Removing ${ext} files..." - find -name "*.${ext}" -exec rm -f {} \; \ - || die "Failed - remove" + local i + for i in "${removeext[@]}"; do + elog "Removing ${i} files..." + find -name "*.${i}" -delete || die "Failed removing files (${i})" done if use gzip; then einfo "Compressing SVG files..." - find -name "*.svg" -print0 | xargs -L 1 -0 \ - bash -c 'gzip -9c "${1}" > "${1}z"; rm -f "${1}"' -- + + while IFS="" read -d $'\0' -r i ; do + gzip -9c "${i}" >"${i}z" || die "Failed compressing ${i}" + rm -f "${i}" || die "Failed removing temporary ${i}" + done < <(find "${S}" -name "*.svg" -print0) fi } |