aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/freehep-graphicsio-emf/Manifest1
-rw-r--r--dev-java/freehep-graphicsio-emf/files/github-30.patch34
-rw-r--r--dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.4-r1.ebuild61
-rw-r--r--dev-java/freehep-graphicsio-emf/metadata.xml11
4 files changed, 107 insertions, 0 deletions
diff --git a/dev-java/freehep-graphicsio-emf/Manifest b/dev-java/freehep-graphicsio-emf/Manifest
new file mode 100644
index 000000000..9ab19829d
--- /dev/null
+++ b/dev-java/freehep-graphicsio-emf/Manifest
@@ -0,0 +1 @@
+DIST freehep-vectorgraphics-2.4.tar.gz 4118379 BLAKE2B c8a5840ebab43398a6f87f97855a38f843b0e05267f5446b5f22a0c0124c98717c00801fe93ef3b541b2c53d07176ab1319a27ad26ed177b6dded11e3fa2e7bb SHA512 b5cf083cc6951e7c4b438d5e648f61ca20b23e02163a8cfc4669beaaec2fa9e33338b0ba6875bfe4a3864ac48f9774acfedc2a3b2f59a7488ef99a4817e39382
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 000000000..c652ec6b8
--- /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.4-r1.ebuild b/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.4-r1.ebuild
new file mode 100644
index 000000000..16fb74322
--- /dev/null
+++ b/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.4-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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 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"
+RESTRICT="!test? ( 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"
+
+PATCHES=( "${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
new file mode 100644
index 000000000..497d14c1c
--- /dev/null
+++ b/dev-java/freehep-graphicsio-emf/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">freehep/freehep-vectorgraphics</remote-id>
+ </upstream>
+</pkgmetadata>