diff options
author | James Le Cuirot <chewi@gentoo.org> | 2016-05-25 22:09:23 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2016-05-25 22:58:30 +0100 |
commit | c3e09cf89674f3499cf38adfabf4cd900d2d8f0f (patch) | |
tree | ee643c1cafaeaae7a3c5d17543d133269fc638d7 /dev-java | |
parent | dev-java/freehep-graphicsio-svg: Version bump to 2.4, EAPI bump, tests (diff) | |
download | gentoo-c3e09cf89674f3499cf38adfabf4cd900d2d8f0f.tar.gz gentoo-c3e09cf89674f3499cf38adfabf4cd900d2d8f0f.tar.bz2 gentoo-c3e09cf89674f3499cf38adfabf4cd900d2d8f0f.zip |
dev-java/freehep-graphicsio-emf: Version bump to 2.4, EAPI bump, tests
Also add emf2svg launcher and fix NPE, closes bugs #304317, #304323.
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'dev-java')
5 files changed, 99 insertions, 35 deletions
diff --git a/dev-java/freehep-graphicsio-emf/Manifest b/dev-java/freehep-graphicsio-emf/Manifest index e598c6ae3b4a..249f670c4c25 100644 --- a/dev-java/freehep-graphicsio-emf/Manifest +++ b/dev-java/freehep-graphicsio-emf/Manifest @@ -1 +1 @@ -DIST freehep-graphicsio-emf-2.1.1-sources.jar 131325 SHA256 c7b32d145be3aedf8adfe679359852c5dc8994d3a70b55f32bfeae85ebb3d629 SHA512 d5f971bb9ff8c5860b26e2e6cb02453db7a088349a2ce9840f8375b586f7911f5f1640b8e47e11c1afd8d7f04934f5f68722f276b22e8a0c28ef3d080d329cad WHIRLPOOL 8b505aaee85196dfb4b6912cfdcb9297a979ea1cf236f5a33c2664263d525012b80dad8180038f2427362ef314b637ceeb009fd47980f42e6d956d634873baf4 +DIST freehep-vectorgraphics-2.4.tar.gz 4118379 SHA256 2c7e1bbb3c056e9de83e5f7d9e0b2aeb3f46734000cdd0f18423eb43216305dd SHA512 b5cf083cc6951e7c4b438d5e648f61ca20b23e02163a8cfc4669beaaec2fa9e33338b0ba6875bfe4a3864ac48f9774acfedc2a3b2f59a7488ef99a4817e39382 WHIRLPOOL 62d61e05935348cf8b5d81033408729b02377f8a91760d08ab98a8e1451ea4d44e992a98dfb951978272ca842dbfa0d2885430cd16428dcf4da005aa092fbe76 diff --git a/dev-java/freehep-graphicsio-emf/files/github-30.patch b/dev-java/freehep-graphicsio-emf/files/github-30.patch new file mode 100644 index 000000000000..c652ec6b861b --- /dev/null +++ b/dev-java/freehep-graphicsio-emf/files/github-30.patch @@ -0,0 +1,34 @@ +https://github.com/freehep/freehep-vectorgraphics/issues/30 + +diff -Naur freehep-vectorgraphics-freehep-vectorgraphics-2.4.orig/freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/EMFConverter.java freehep-vectorgraphics-freehep-vectorgraphics-2.4/freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/EMFConverter.java +--- freehep-vectorgraphics-freehep-vectorgraphics-2.4.orig/freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/EMFConverter.java 2014-09-02 09:59:14.000000000 +0100 ++++ freehep-vectorgraphics-freehep-vectorgraphics-2.4/freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/EMFConverter.java 2016-05-25 22:50:41.859734476 +0100 +@@ -4,6 +4,7 @@ + import org.freehep.graphicsbase.util.export.ExportFileType; + + import java.util.List; ++import java.util.Properties; + import java.io.FileInputStream; + import java.io.File; + +@@ -64,9 +65,10 @@ + destFileName += type.toLowerCase(); + } + ++ Properties p = new Properties(); ++ + // TODO there is no possibility to use Constants of base class! + /* create SVG properties +- Properties p = new Properties(); + p.put(SVGGraphics2D.EMBED_FONTS, Boolean.toString(false)); + p.put(SVGGraphics2D.CLIP, Boolean.toString(true)); + p.put(SVGGraphics2D.COMPRESS, Boolean.toString(false)); +@@ -82,7 +84,7 @@ + new File(destFileName), + emfPanel, + emfPanel, +- null, ++ p, + "Freehep EMF converter"); + } catch (Exception e) { + e.printStackTrace(); diff --git a/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.1.1.ebuild b/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.1.1.ebuild deleted file mode 100644 index 528bbffab4d0..000000000000 --- a/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.1.1.ebuild +++ /dev/null @@ -1,34 +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 Enhanced Metafile Format Driver" -HOMEPAGE="http://java.freehep.org/" - -LICENSE="LGPL-2.1" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="" - -CDEPEND=">=dev-java/freehep-util-2.0.2 - >=dev-java/freehep-graphicsio-2.1.1 - >=dev-java/freehep-graphicsio-tests-2.1.1 - dev-java/jdom - dev-java/junit - dev-java/freehep-misc-deps - dev-java/freehep-util - dev-java/freehep-swing - dev-java/freehep-graphics2d - dev-java/freehep-io - dev-java/freehep-export" -DEPEND=">=virtual/jdk-1.5 - ${CDEPEND}" -RDEPEND=">=virtual/jre-1.5 - ${CDEPEND}" -JAVA_GENTOO_CLASSPATH="freehep-util,freehep-graphicsio,freehep-graphicsio-tests,jdom-1.0,junit,freehep-misc-deps,freehep-util,freehep-swing,freehep-graphics2d,freehep-io,freehep-export" diff --git a/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.4.ebuild b/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.4.ebuild new file mode 100644 index 000000000000..9df8c8288cd9 --- /dev/null +++ b/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.4.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_PN="freehep-vectorgraphics" +MY_P="${MY_PN}-${PV}" +JAVA_PKG_IUSE="doc source" + +inherit eutils java-pkg-2 java-pkg-simple + +DESCRIPTION="High Energy Physics Java library - FreeHEP Enhanced Metafile Format Driver" +HOMEPAGE="http://java.freehep.org/" +SRC_URI="https://github.com/freehep/${MY_PN}/archive/${MY_P}.tar.gz" +LICENSE="Apache-2.0 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +CDEPEND="~dev-java/freehep-graphics2d-${PV}:${SLOT} + ~dev-java/freehep-graphicsbase-${PV}:${SLOT} + ~dev-java/freehep-graphicsio-${PV}:${SLOT} + dev-java/freehep-io:0" + +DEPEND="${CDEPEND} + >=virtual/jdk-1.7 + test? ( + ~dev-java/freehep-graphicsio-tests-${PV}:${SLOT} + 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-graphics2d,freehep-graphicsbase,freehep-graphicsio,freehep-io" + +java_prepare() { + epatch "${FILESDIR}"/github-30.patch +} + +src_compile() { + java-pkg-simple_src_compile + java-pkg_addres ${PN}.jar src/main/resources +} + +src_install() { + java-pkg-simple_src_install + java-pkg_register-optional-dependency freehep-graphicsio-svg + java-pkg_dolauncher emf2svg --main org.freehep.graphicsio.emf.EMF2SVG +} + +src_test() { + local DIR=src/test/java + local CP="${DIR}:${PN}.jar:$(java-pkg_getjars junit-4,freehep-graphicsio-tests,${JAVA_GENTOO_CLASSPATH})" + + ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java") + ejunit4 -classpath "${CP}" org.freehep.graphicsio.emf.test.EMFTestSuite +} diff --git a/dev-java/freehep-graphicsio-emf/metadata.xml b/dev-java/freehep-graphicsio-emf/metadata.xml index 952a4b9b605c..696a250adce4 100644 --- a/dev-java/freehep-graphicsio-emf/metadata.xml +++ b/dev-java/freehep-graphicsio-emf/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> |