1 |
commit: 8ad00a83d6c40935ba5145bc30f22850e28ac587 |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 27 09:33:17 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 27 09:33:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=8ad00a83 |
7 |
|
8 |
dev-java/freehep-graphicsio-emf: last-rites from ::gentoo, EAPI bump |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
12 |
|
13 |
.../freehep-graphicsio-emf/files/github-30.patch | 34 ++++++++++++ |
14 |
.../freehep-graphicsio-emf-2.4-r1.ebuild | 61 ++++++++++++++++++++++ |
15 |
dev-java/freehep-graphicsio-emf/metadata.xml | 11 ++++ |
16 |
3 files changed, 106 insertions(+) |
17 |
|
18 |
diff --git a/dev-java/freehep-graphicsio-emf/files/github-30.patch b/dev-java/freehep-graphicsio-emf/files/github-30.patch |
19 |
new file mode 100644 |
20 |
index 000000000..c652ec6b8 |
21 |
--- /dev/null |
22 |
+++ b/dev-java/freehep-graphicsio-emf/files/github-30.patch |
23 |
@@ -0,0 +1,34 @@ |
24 |
+https://github.com/freehep/freehep-vectorgraphics/issues/30 |
25 |
+ |
26 |
+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 |
27 |
+--- 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 |
28 |
++++ 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 |
29 |
+@@ -4,6 +4,7 @@ |
30 |
+ import org.freehep.graphicsbase.util.export.ExportFileType; |
31 |
+ |
32 |
+ import java.util.List; |
33 |
++import java.util.Properties; |
34 |
+ import java.io.FileInputStream; |
35 |
+ import java.io.File; |
36 |
+ |
37 |
+@@ -64,9 +65,10 @@ |
38 |
+ destFileName += type.toLowerCase(); |
39 |
+ } |
40 |
+ |
41 |
++ Properties p = new Properties(); |
42 |
++ |
43 |
+ // TODO there is no possibility to use Constants of base class! |
44 |
+ /* create SVG properties |
45 |
+- Properties p = new Properties(); |
46 |
+ p.put(SVGGraphics2D.EMBED_FONTS, Boolean.toString(false)); |
47 |
+ p.put(SVGGraphics2D.CLIP, Boolean.toString(true)); |
48 |
+ p.put(SVGGraphics2D.COMPRESS, Boolean.toString(false)); |
49 |
+@@ -82,7 +84,7 @@ |
50 |
+ new File(destFileName), |
51 |
+ emfPanel, |
52 |
+ emfPanel, |
53 |
+- null, |
54 |
++ p, |
55 |
+ "Freehep EMF converter"); |
56 |
+ } catch (Exception e) { |
57 |
+ e.printStackTrace(); |
58 |
|
59 |
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 |
60 |
new file mode 100644 |
61 |
index 000000000..16fb74322 |
62 |
--- /dev/null |
63 |
+++ b/dev-java/freehep-graphicsio-emf/freehep-graphicsio-emf-2.4-r1.ebuild |
64 |
@@ -0,0 +1,61 @@ |
65 |
+# Copyright 1999-2021 Gentoo Authors |
66 |
+# Distributed under the terms of the GNU General Public License v2 |
67 |
+ |
68 |
+EAPI=7 |
69 |
+ |
70 |
+MY_PN="freehep-vectorgraphics" |
71 |
+MY_P="${MY_PN}-${PV}" |
72 |
+JAVA_PKG_IUSE="doc source" |
73 |
+ |
74 |
+inherit java-pkg-2 java-pkg-simple |
75 |
+ |
76 |
+DESCRIPTION="High Energy Physics Java library - FreeHEP Enhanced Metafile Format Driver" |
77 |
+HOMEPAGE="http://java.freehep.org/" |
78 |
+SRC_URI="https://github.com/freehep/${MY_PN}/archive/${MY_P}.tar.gz" |
79 |
+ |
80 |
+LICENSE="Apache-2.0 LGPL-2.1" |
81 |
+SLOT="0" |
82 |
+KEYWORDS="~amd64 ~x86" |
83 |
+ |
84 |
+IUSE="test" |
85 |
+RESTRICT="!test? ( test )" |
86 |
+ |
87 |
+CDEPEND="~dev-java/freehep-graphics2d-${PV}:${SLOT} |
88 |
+ ~dev-java/freehep-graphicsbase-${PV}:${SLOT} |
89 |
+ ~dev-java/freehep-graphicsio-${PV}:${SLOT} |
90 |
+ dev-java/freehep-io:0" |
91 |
+ |
92 |
+DEPEND="${CDEPEND} |
93 |
+ >=virtual/jdk-1.7 |
94 |
+ test? ( |
95 |
+ ~dev-java/freehep-graphicsio-tests-${PV}:${SLOT} |
96 |
+ dev-java/junit:4 |
97 |
+ )" |
98 |
+ |
99 |
+RDEPEND="${CDEPEND} |
100 |
+ >=virtual/jre-1.7" |
101 |
+ |
102 |
+S="${WORKDIR}/${MY_PN}-${MY_P}/${PN}" |
103 |
+JAVA_SRC_DIR="src/main/java" |
104 |
+JAVA_GENTOO_CLASSPATH="freehep-graphics2d,freehep-graphicsbase,freehep-graphicsio,freehep-io" |
105 |
+ |
106 |
+PATCHES=( "${FILESDIR}/github-30.patch" ) |
107 |
+ |
108 |
+src_compile() { |
109 |
+ java-pkg-simple_src_compile |
110 |
+ java-pkg_addres ${PN}.jar src/main/resources |
111 |
+} |
112 |
+ |
113 |
+src_install() { |
114 |
+ java-pkg-simple_src_install |
115 |
+ java-pkg_register-optional-dependency freehep-graphicsio-svg |
116 |
+ java-pkg_dolauncher emf2svg --main org.freehep.graphicsio.emf.EMF2SVG |
117 |
+} |
118 |
+ |
119 |
+src_test() { |
120 |
+ local DIR=src/test/java |
121 |
+ local CP="${DIR}:${PN}.jar:$(java-pkg_getjars junit-4,freehep-graphicsio-tests,${JAVA_GENTOO_CLASSPATH})" |
122 |
+ |
123 |
+ ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java") |
124 |
+ ejunit4 -classpath "${CP}" org.freehep.graphicsio.emf.test.EMFTestSuite |
125 |
+} |
126 |
|
127 |
diff --git a/dev-java/freehep-graphicsio-emf/metadata.xml b/dev-java/freehep-graphicsio-emf/metadata.xml |
128 |
new file mode 100644 |
129 |
index 000000000..497d14c1c |
130 |
--- /dev/null |
131 |
+++ b/dev-java/freehep-graphicsio-emf/metadata.xml |
132 |
@@ -0,0 +1,11 @@ |
133 |
+<?xml version="1.0" encoding="UTF-8"?> |
134 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
135 |
+<pkgmetadata> |
136 |
+ <maintainer type="project"> |
137 |
+ <email>sci@g.o</email> |
138 |
+ <name>Gentoo Science Project</name> |
139 |
+ </maintainer> |
140 |
+ <upstream> |
141 |
+ <remote-id type="github">freehep/freehep-vectorgraphics</remote-id> |
142 |
+ </upstream> |
143 |
+</pkgmetadata> |