summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/openclipart')
-rw-r--r--media-gfx/openclipart/Manifest1
-rw-r--r--media-gfx/openclipart/metadata.xml8
-rw-r--r--media-gfx/openclipart/openclipart-0.20.ebuild49
3 files changed, 58 insertions, 0 deletions
diff --git a/media-gfx/openclipart/Manifest b/media-gfx/openclipart/Manifest
new file mode 100644
index 00000000000..527ecac2b1c
--- /dev/null
+++ b/media-gfx/openclipart/Manifest
@@ -0,0 +1 @@
+DIST openclipart-0.20.tar.bz2 367385284 SHA256 6f1fc33b0149e755196882ecab083d56daa3ff6ed78823b36be01f40abc7eb87 SHA512 2d3e0071e019cc272d220b5a4960d4dd7d8ca1ea36d2de7358c7b21e4b3135630075da032b3e274b88e6be8b7e3d331c02c9eebfd43e4e5b199c6016a8fbbdb7 WHIRLPOOL 5c657ac72c816f669c08256db85588fb6462e8e176eae88699174f5f4ae8e306ffc77c47c2951ce96b3d5614f6ed37867971582e56faf190742470a16a26bc3a
diff --git a/media-gfx/openclipart/metadata.xml b/media-gfx/openclipart/metadata.xml
new file mode 100644
index 00000000000..7600f7a1fc4
--- /dev/null
+++ b/media-gfx/openclipart/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="gzip">Compresses clip art using gzip</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/openclipart/openclipart-0.20.ebuild b/media-gfx/openclipart/openclipart-0.20.ebuild
new file mode 100644
index 00000000000..0859716b36a
--- /dev/null
+++ b/media-gfx/openclipart/openclipart-0.20.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 .
+}