blob: 8e4f67d57660a8a4f8750c25b12c2ebf34bcaf74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/batik/batik-1.5.1-r3.ebuild,v 1.2 2005/02/18 18:40:39 compnerd Exp $
inherit java-pkg
DESCRIPTION="Batik is a Java(tm) technology based toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation."
SRC_URI="mirror://apache/xml/batik/${PN}-src-${PV}.zip"
HOMEPAGE="http://xml.apache.org/batik/"
IUSE="doc"
DEPEND=">=virtual/jdk-1.3
=dev-java/rhino-1.5*
dev-java/fop
app-arch/unzip
>=dev-java/xerces-2.6.2-r1
dev-java/ant"
RDEPEND=">=virtual/jdk-1.3"
LICENSE="Apache-1.1"
SLOT="0"
KEYWORDS="x86 ~sparc ~ppc"
S=${WORKDIR}/xml-batik
src_unpack() {
jar xvf ${DISTDIR}/${PN}-src-${PV}.zip
cd ${S}/lib
rm -f *.jar
java-pkg_jar-from xerces-2
java-pkg_jar-from rhino-1.5
java-pkg_jar-from fop
}
src_compile() {
if [ $(memory) -lt 262144 ] ; then
echo
ewarn "To build batik, atleast 256MB of RAM is recommended."
ewarn "Your system has less than 256MB of RAM, continuing anyways."
echo
export ANT_OPTS=-Xmx256m
fi
local antflags="jars"
ant ${antflags} || die "compile problem"
}
src_install () {
java-pkg_dojar ${P}/batik*.jar
insinto /usr/share/${PN}/lib/lib
doins ${P}/lib/batik*.jar
dodoc README LICENSE
use doc && java-pkg_dohtml -r ${P}/docs/
echo "#!/bin/sh" > ${PN}
echo '${JAVA_HOME}/bin/java -classpath $(java-config -p batik,xerces-2,rhino-1.5,fop) org.apache.batik.apps.svgbrowser.Main $*' >> ${PN}
dobin ${PN}
}
function memory() {
cat /proc/meminfo | grep Memtotal | sed -r "s/[^0-9]*([0-9]+).*/\1/"
}
|