summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2016-05-25 21:42:04 +0100
committerJames Le Cuirot <chewi@gentoo.org>2016-05-25 22:58:30 +0100
commit2259930928b34d80772bdb8be716fbdf89177871 (patch)
tree1de11a986493fcdbbf328ab715c40394e3c41245 /dev-java
parentdev-java/freehep-graphicsbase: New FreeHEP component, needed by others (diff)
downloadgentoo-2259930928b34d80772bdb8be716fbdf89177871.tar.gz
gentoo-2259930928b34d80772bdb8be716fbdf89177871.tar.bz2
gentoo-2259930928b34d80772bdb8be716fbdf89177871.zip
dev-java/freehep-graphics2d: Version bump to 2.4, EAPI bump, add tests
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/freehep-graphics2d/Manifest3
-rw-r--r--dev-java/freehep-graphics2d/freehep-graphics2d-2.1.1.ebuild24
-rw-r--r--dev-java/freehep-graphics2d/freehep-graphics2d-2.4.ebuild74
-rw-r--r--dev-java/freehep-graphics2d/metadata.xml3
4 files changed, 79 insertions, 25 deletions
diff --git a/dev-java/freehep-graphics2d/Manifest b/dev-java/freehep-graphics2d/Manifest
index 8bded0a230e0..8cc405a4ae04 100644
--- a/dev-java/freehep-graphics2d/Manifest
+++ b/dev-java/freehep-graphics2d/Manifest
@@ -1 +1,2 @@
-DIST freehep-graphics2d-2.1.1-sources.jar 85104 SHA256 08a34bd74c4b263a3ccdae1d3e578f52a57473bbb248eaeac5b39c165f57a281 SHA512 18c93af064cdf4edb2d5cbdc7ed7eae57dbe472720bf197b7ea35fc884b3ece6dfb383e4e56d86b7d1c78ca1f5427f471d862dbc82d5538c2e1848b665376c36 WHIRLPOOL d0f21489f84dd96254c9b997148c685fc7caeb11c78b06d3bf6947db32f364a60d9b3007ada381445c99ecccb172217e5e44427ba1580c20e82f4bc4014e0895
+DIST freehep-chartable-converter-plugin-2.2.1.tar.gz 18159 SHA256 076086b08f775ad52a1ce58389167f048f594864ad6b198c92d540a30f96ae35 SHA512 4caac8b83b9efdee59e2a801bb001fdf7bab144bb5734bdb89ef3e1163bc9ffd05b2c8c59d611665573c432045a854fba28eb4d24260baea5286b34ae298add1 WHIRLPOOL a97d2c8685c29ae7d1dccf653577dd15cf085cf5439744f5c0dd904ebb8d85d9a6e6e825059230bc2baf4e519b87bfda136db2fac22202d878ae84b0382503bc
+DIST freehep-vectorgraphics-2.4.tar.gz 4118379 SHA256 2c7e1bbb3c056e9de83e5f7d9e0b2aeb3f46734000cdd0f18423eb43216305dd SHA512 b5cf083cc6951e7c4b438d5e648f61ca20b23e02163a8cfc4669beaaec2fa9e33338b0ba6875bfe4a3864ac48f9774acfedc2a3b2f59a7488ef99a4817e39382 WHIRLPOOL 62d61e05935348cf8b5d81033408729b02377f8a91760d08ab98a8e1451ea4d44e992a98dfb951978272ca842dbfa0d2885430cd16428dcf4da005aa092fbe76
diff --git a/dev-java/freehep-graphics2d/freehep-graphics2d-2.1.1.ebuild b/dev-java/freehep-graphics2d/freehep-graphics2d-2.1.1.ebuild
deleted file mode 100644
index 1949c866684d..000000000000
--- a/dev-java/freehep-graphics2d/freehep-graphics2d-2.1.1.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-JAVA_PKG_IUSE=""
-GROUP_ID="org.freehep"
-MAVEN2_REPOSITORIES="http://java.freehep.org/maven2"
-
-inherit java-pkg-2 java-mvn-src
-
-DESCRIPTION="High Energy Physics Java library - FreeHEP Graphics 2D Library"
-HOMEPAGE="http://java.freehep.org/"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-CDEPEND=">=dev-java/freehep-util-2.0.2"
-DEPEND=">=virtual/jdk-1.5
- ${CDEPEND}"
-RDEPEND=">=virtual/jre-1.5
- ${CDEPEND}"
-JAVA_GENTOO_CLASSPATH="freehep-util"
diff --git a/dev-java/freehep-graphics2d/freehep-graphics2d-2.4.ebuild b/dev-java/freehep-graphics2d/freehep-graphics2d-2.4.ebuild
new file mode 100644
index 000000000000..a25956a48d3f
--- /dev/null
+++ b/dev-java/freehep-graphics2d/freehep-graphics2d-2.4.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+CHARTABLE_PN="freehep-chartable-converter-plugin"
+CHARTABLE_P="${CHARTABLE_PN}-2.2.1"
+
+MY_PN="freehep-vectorgraphics"
+MY_P="${MY_PN}-${PV}"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="High Energy Physics Java library - FreeHEP Graphics 2D Library"
+HOMEPAGE="http://java.freehep.org/"
+SRC_URI="https://github.com/freehep/${MY_PN}/archive/${MY_P}.tar.gz
+ https://github.com/freehep/${CHARTABLE_PN}/archive/${CHARTABLE_P}.tar.gz"
+LICENSE="Apache-2.0 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+CDEPEND="~dev-java/freehep-graphicsbase-${PV}:${SLOT}"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.7
+ test? ( dev-java/junit:4 )"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.7"
+
+S="${WORKDIR}/${MY_PN}-${MY_P}/${PN}"
+JAVA_SRC_DIR="src/main/java"
+JAVA_GENTOO_CLASSPATH="freehep-graphicsbase"
+
+src_compile() {
+ # This package uses a custom Maven plugin to generate some
+ # sources. We're not using Maven but we can run it manually. We
+ # could package the plugin separately but it's not used elsewhere.
+
+ local SRC ENC CP="${WORKDIR}"/${CHARTABLE_PN}-${CHARTABLE_P}/src/main/java CLASS=org/freehep/graphics2d/font/encoding/CharTableConverter
+ ejavac "${CP}/${CLASS}.java"
+
+ for SRC in src/main/encoding/{Expert,Symbol,Zapfdingbats}.utf-16; do
+ ebegin "Converting ${SRC}"
+ java -cp "${CP}" ${CLASS} ${JAVA_SRC_DIR} org.freehep.graphics2d.font ${SRC} || die
+ eend $?
+ done
+
+ SRC=src/main/encoding/Latin.utf-16
+
+ for ENC in ISO MAC WIN PDF STD; do
+ ebegin "Converting ${SRC} (${ENC})"
+ java -cp "${CP}" ${CLASS} ${JAVA_SRC_DIR} org.freehep.graphics2d.font ${SRC} ${ENC} || die
+ eend $?
+ done
+
+ java-pkg-simple_src_compile
+}
+
+src_test() {
+ local DIR=src/test/java
+ local CP="${DIR}:${PN}.jar:$(java-pkg_getjars junit-4,${JAVA_GENTOO_CLASSPATH})"
+ local TESTS=$(find ${DIR} -name "Test*.java")
+ TESTS="${TESTS//src\/test\/java\/}"
+ TESTS="${TESTS//.java}"
+ TESTS="${TESTS//\//.}"
+
+ ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java")
+ ejunit4 -classpath "${CP}" ${TESTS}
+}
diff --git a/dev-java/freehep-graphics2d/metadata.xml b/dev-java/freehep-graphics2d/metadata.xml
index 952a4b9b605c..696a250adce4 100644
--- a/dev-java/freehep-graphics2d/metadata.xml
+++ b/dev-java/freehep-graphics2d/metadata.xml
@@ -5,4 +5,7 @@
<email>java@gentoo.org</email>
<name>Java</name>
</maintainer>
+ <upstream>
+ <remote-id type="github">freehep/freehep-vectorgraphics</remote-id>
+ </upstream>
</pkgmetadata>