Skip to content

Commit

Permalink
dev-java/batik: version bump to 1.9.
Browse files Browse the repository at this point in the history
Gentoo-Bug: https://bugs.gentoo.org/616476

Package-Manager: Portage-2.3.5, Repoman-2.3.2

Closes: gentoo#4850
  • Loading branch information
Whissi authored and monsieurp committed Aug 1, 2017
1 parent 442e60a commit 2bd8da0
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-java/batik/Manifest
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
DIST batik-src-1.8.tar.gz 14970684 SHA256 0f1175146d45445fc4940e214c3e1e5cfa0294ae6a9787859bda00964f97c2bd SHA512 352843fd0cec43c6d9d54426fe1c20a9bd2234798404b101f2e8d43f6089c0bf6bb5102cb5674de11d37a0d820a8bb79fe9dd854030b23fd8c68f3931eb12f1b WHIRLPOOL fa50d1f87257c6018f99076bf759066b2311f483d424ef743e45fe17c74c646a215c1211c5431b2a522913f23ff5f53934a1606d4d4a223e8298abd6ce94bb46
DIST batik-src-1.9.tar.gz 16748072 SHA256 bef436c0b4ac9a499274a8df9a2769f42ddc6553451dac9a9514b4f55d06c6a3 SHA512 96a5c16bd3d61ea33ed5013fd0b00f1724470d9b667f0f84ef4a29dcaaa19b1cc8ffcc92dc49767f4e29d77a47f99df5afca479336ac5619778b51a6fb6cd952 WHIRLPOOL b389ec0d38e16d4619f0a1e933c357a018e0ae2a0c04900caf53f398180c5a2ca031bd8909ef50aeb2db5c12dd6981cb5d1ec466e4c5fbc0379d0c325f039b25
101 changes: 101 additions & 0 deletions dev-java/batik/batik-1.9.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

JAVA_PKG_IUSE="doc"

inherit java-pkg-2 java-ant-2 eutils

DESCRIPTION="Java based SVG toolkit"
HOMEPAGE="https://xmlgraphics.apache.org/batik/"
SRC_URI="http://apache.mirrors.ovh.net/ftp.apache.org/dist/xmlgraphics/${PN}/source/${PN}-src-${PV}.tar.gz"

LICENSE="Apache-2.0"
SLOT="1.9"
KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE="doc python tcl"

CDEPEND="
tcl? ( dev-java/jacl:0 )
python? ( dev-java/jython:2.7 )
dev-java/xalan:0
dev-java/rhino:1.6
dev-java/ant-core:0
dev-java/xmlgraphics-commons:2
dev-java/xml-commons-external:1.3"

DEPEND="
>=virtual/jdk-1.6
${CDEPEND}"

RDEPEND="
>=virtual/jre-1.6
${CDEPEND}"

JAVA_ANT_REWRITE_CLASSPATH="true"

EANT_GENTOO_CLASSPATH="
xml-commons-external-1.3
xmlgraphics-commons-2
xalan
rhino-1.6
"

java_prepare() {
# bug #318323
for file in build.xml contrib/rasterizertask/build.xml; do
java-ant_xml-rewrite -f ${file} -c -e javadoc -a failonerror -v no -a maxmemory -v 512m
done

cd lib || die
rm -v *.jar build/*.jar || die
use python && java-pkg_jar-from jython-2.7
use tcl && java-pkg_jar-from jacl
}

src_compile() {
# Fails to build on amd64 without this
export ANT_OPTS="-Xmx256m"
use amd64 && export ANT_OPTS="-Xmx1g"

eant jars all-jar $(use_doc)
cd contrib/rasterizertask || die
eant -Dgentoo.classpath="$(java-pkg_getjar ant-core ant.jar):../../classes" jar $(use_doc)
}

src_install() {
batik_unversion_jars() {
for jar in batik-*.jar; do
newj="${jar%-*}.jar"
java-pkg_newjar ${jar} ${newj}
done
}

# First unversion jars in ${P}/lib
cd "${S}/${P}/lib" || die
batik_unversion_jars

# Then, only those in ${P}
cd "${S}/${P}" || die
batik_unversion_jars

# Proceed with documentation installation
cd "${S}" || die
dodoc README CHANGES
use doc && java-pkg_dojavadoc "${P}/docs/javadoc"

# pwd fixes bug #116976
java-pkg_dolauncher batik-${SLOT} --pwd "${EPREFIX}/usr/share/${PN}-${SLOT}/" \
--main org.apache.batik.apps.svgbrowser.Main

# To find these lsjar batik-${SLOT} | grep Main.class
for launcher in ttf2svg slideshow svgpp rasterizer; do
java-pkg_dolauncher batik-${launcher}-${SLOT} \
--main org.apache.batik.apps.${launcher}.Main
done

# Install and register the ant task.
java-pkg_dojar contrib/rasterizertask/build/lib/RasterizerTask.jar
java-pkg_register-ant-task
}

0 comments on commit 2bd8da0

Please sign in to comment.