summaryrefslogtreecommitdiff
path: root/media-gfx/openclipart/openclipart-0.20.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-gfx/openclipart/openclipart-0.20.ebuild
reinit the tree, so we can have metadata
Diffstat (limited to 'media-gfx/openclipart/openclipart-0.20.ebuild')
-rw-r--r--media-gfx/openclipart/openclipart-0.20.ebuild48
1 files changed, 48 insertions, 0 deletions
diff --git a/media-gfx/openclipart/openclipart-0.20.ebuild b/media-gfx/openclipart/openclipart-0.20.ebuild
new file mode 100644
index 000000000000..f512de948c2e
--- /dev/null
+++ b/media-gfx/openclipart/openclipart-0.20.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+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
+
+ 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"
+ 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}"' --
+ fi
+}
+
+src_install() {
+ insinto ${CLIPART}
+ doins -r .
+}