1 |
commit: 274601551dff450e0f289351d73eaefab307e9ca |
2 |
Author: Bryan Gardiner <bog <AT> khumba <DOT> net> |
3 |
AuthorDate: Thu Jul 30 16:49:05 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 30 18:10:37 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=27460155 |
7 |
|
8 |
sci-mathematics/scilab: Patch to build with new versions of Java dependencies. |
9 |
|
10 |
Package-Manager: portage-2.2.20 |
11 |
|
12 |
sci-mathematics/scilab/ChangeLog | 5 ++ |
13 |
.../scilab/files/scilab-5.5.2-batik-1.8.patch | 98 ++++++++++++++++++++++ |
14 |
.../scilab/files/scilab-5.5.2-fop-2.0.patch | 38 +++++++++ |
15 |
.../scilab-5.5.2-xmlgraphics-common-2.0.patch | 91 ++++++++++++++++++++ |
16 |
sci-mathematics/scilab/scilab-5.5.2.ebuild | 17 ++-- |
17 |
5 files changed, 242 insertions(+), 7 deletions(-) |
18 |
|
19 |
diff --git a/sci-mathematics/scilab/ChangeLog b/sci-mathematics/scilab/ChangeLog |
20 |
index 9b9a0c2..27d3c2b 100644 |
21 |
--- a/sci-mathematics/scilab/ChangeLog |
22 |
+++ b/sci-mathematics/scilab/ChangeLog |
23 |
@@ -2,6 +2,11 @@ |
24 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
25 |
# $Header: $ |
26 |
|
27 |
+ 25 Jul 2015; Bryan Gardiner <bog@××××××.net> scilab-5.5.2.ebuild, |
28 |
+ +files/scilab-5.5.2-batik-1.8.patch, +files/scilab-5.5.2-fop-2.0.patch, |
29 |
+ +files/scilab-5.5.2-xmlgraphics-common-2.0.patch: |
30 |
+ Patch Scilab to build with new versions of Java dependencies. |
31 |
+ |
32 |
22 Jul 2015; Marius Brehler <marbre@××××××××××××××.de> scilab-5.5.2.ebuild: |
33 |
sci-mathematics/scilab: Fix deps |
34 |
|
35 |
|
36 |
diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-batik-1.8.patch b/sci-mathematics/scilab/files/scilab-5.5.2-batik-1.8.patch |
37 |
new file mode 100644 |
38 |
index 0000000..aaf4da8 |
39 |
--- /dev/null |
40 |
+++ b/sci-mathematics/scilab/files/scilab-5.5.2-batik-1.8.patch |
41 |
@@ -0,0 +1,98 @@ |
42 |
+From: Bryan Gardiner <bog@××××××.net> |
43 |
+Project-Bug-URL: https://bugzilla.scilab.org/show_bug.cgi?id=13813 |
44 |
+Gentoo-Bug-URL: https://github.com/gentoo-science/sci/pull/456 |
45 |
+ |
46 |
+Updates Scilab to build against (and require) Batik >=1.8, fixing an API change |
47 |
+with SAXSVGDocumentFactory being moved. This is not tested beyond "yes Scilab |
48 |
+still links to Batik to export SVGs," as I'm not sure of a good test case, and |
49 |
+it's awaiting upstream review. |
50 |
+ |
51 |
+--- a/scilab/configure |
52 |
++++ b/scilab/configure |
53 |
+@@ -16600,8 +16600,8 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar batik used |
54 |
+ fi |
55 |
+ |
56 |
+ |
57 |
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (1.7) of batik" >&5 |
58 |
+-$as_echo_n "checking minimal version (1.7) of batik... " >&6; } |
59 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (1.8) of batik" >&5 |
60 |
++$as_echo_n "checking minimal version (1.8) of batik... " >&6; } |
61 |
+ saved_ac_java_classpath=$ac_java_classpath |
62 |
+ export ac_java_classpath="$BATIK:$ac_java_classpath" |
63 |
+ if test "x" == "x"; then |
64 |
+@@ -16614,7 +16614,7 @@ import org.apache.batik.Version; |
65 |
+ |
66 |
+ public class conftest { |
67 |
+ public static void main(String[] argv) { |
68 |
+- String minVersion="1.7"; |
69 |
++ String minVersion="1.8"; |
70 |
+ |
71 |
+ System.out.println(Version.getVersion()); |
72 |
+ if (compare(minVersion, Version.getVersion()) > 0) { |
73 |
+@@ -16663,7 +16663,7 @@ EOF |
74 |
+ STDOUT=`cat conftest.java.output` |
75 |
+ fi |
76 |
+ echo "configure: CLASSPATH was $CLASSPATH" >&5 |
77 |
+- as_fn_error $? "Wrong version of batik. Expected at least 1.7. Found $STDOUT" "$LINENO" 5 |
78 |
++ as_fn_error $? "Wrong version of batik. Expected at least 1.8. Found $STDOUT" "$LINENO" 5 |
79 |
+ fi |
80 |
+ fi |
81 |
+ if test -f conftest.java.output; then |
82 |
+@@ -16673,7 +16673,7 @@ EOF |
83 |
+ echo "configure: failed program was:" >&5 |
84 |
+ cat conftest.java >&5 |
85 |
+ echo "configure: CLASSPATH was $CLASSPATH" >&5 |
86 |
+- as_fn_error $? "Wrong version of batik. Expected at least 1.7. Found $STDOUT" "$LINENO" 5 |
87 |
++ as_fn_error $? "Wrong version of batik. Expected at least 1.8. Found $STDOUT" "$LINENO" 5 |
88 |
+ fi |
89 |
+ |
90 |
+ else |
91 |
+@@ -16686,7 +16686,7 @@ import org.apache.batik.Version; |
92 |
+ |
93 |
+ public class conftest { |
94 |
+ public static void main(String[] argv) { |
95 |
+- String minVersion="1.7"; |
96 |
++ String minVersion="1.8"; |
97 |
+ |
98 |
+ System.out.println(Version.getVersion()); |
99 |
+ if (compare(minVersion, Version.getVersion()) != 0) { |
100 |
+@@ -16735,7 +16735,7 @@ EOF |
101 |
+ STDOUT=`cat conftest.java.output` |
102 |
+ fi |
103 |
+ echo "configure: CLASSPATH was $CLASSPATH" >&5 |
104 |
+- as_fn_error $? "Wrong version of batik. Expected exact version 1.7. Found $STDOUT" "$LINENO" 5 |
105 |
++ as_fn_error $? "Wrong version of batik. Expected exact version 1.8. Found $STDOUT" "$LINENO" 5 |
106 |
+ fi |
107 |
+ fi |
108 |
+ if test -f conftest.java.output; then |
109 |
+@@ -16745,7 +16745,7 @@ EOF |
110 |
+ echo "configure: failed program was:" >&5 |
111 |
+ cat conftest.java >&5 |
112 |
+ echo "configure: CLASSPATH was $CLASSPATH" >&5 |
113 |
+- as_fn_error $? "Wrong version of batik. Expected exact version 1.7. Found $STDOUT" "$LINENO" 5 |
114 |
++ as_fn_error $? "Wrong version of batik. Expected exact version 1.8. Found $STDOUT" "$LINENO" 5 |
115 |
+ fi |
116 |
+ |
117 |
+ fi |
118 |
+--- a/scilab/configure.ac |
119 |
++++ b/scilab/configure.ac |
120 |
+@@ -1038,7 +1038,7 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version |
121 |
+ BATIK=$PACKAGE_JAR_FILE |
122 |
+ fi |
123 |
+ AC_SUBST(BATIK) |
124 |
+- AC_JAVA_CHECK_VERSION_PACKAGE([batik],[import org.apache.batik.Version;],$BATIK,[1.7],[Version.getVersion()]) |
125 |
++ AC_JAVA_CHECK_VERSION_PACKAGE([batik],[import org.apache.batik.Version;],$BATIK,[1.8],[Version.getVersion()]) |
126 |
+ |
127 |
+ # Commons I/O library |
128 |
+ AC_JAVA_CHECK_PACKAGE([commons-io],[org.apache.commons.io.output.CountingOutputStream],[Commons I/O library]) |
129 |
+--- a/scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java |
130 |
++++ b/scilab/modules/graph/src/java/org/scilab/modules/graph/utils/ScilabGraphUtils.java |
131 |
+@@ -28,7 +28,7 @@ import org.apache.batik.bridge.DocumentLoader; |
132 |
+ import org.apache.batik.bridge.GVTBuilder; |
133 |
+ import org.apache.batik.bridge.UserAgent; |
134 |
+ import org.apache.batik.bridge.UserAgentAdapter; |
135 |
+-import org.apache.batik.dom.svg.SAXSVGDocumentFactory; |
136 |
++import org.apache.batik.anim.dom.SAXSVGDocumentFactory; |
137 |
+ import org.apache.batik.gvt.GraphicsNode; |
138 |
+ import org.apache.batik.util.XMLResourceDescriptor; |
139 |
+ import org.scilab.forge.jlatexmath.ParseException; |
140 |
|
141 |
diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-fop-2.0.patch b/sci-mathematics/scilab/files/scilab-5.5.2-fop-2.0.patch |
142 |
new file mode 100644 |
143 |
index 0000000..83c6f6c |
144 |
--- /dev/null |
145 |
+++ b/sci-mathematics/scilab/files/scilab-5.5.2-fop-2.0.patch |
146 |
@@ -0,0 +1,38 @@ |
147 |
+From: Bryan Gardiner <bog@××××××.net> |
148 |
+Project-Bug-URL: https://bugzilla.scilab.org/show_bug.cgi?id=14009 |
149 |
+Gentoo-Bug-URL: https://github.com/gentoo-science/sci/pull/456 |
150 |
+ |
151 |
+Updates Scilab to build against FOP >=2.0. This is not tested, as I'm not sure |
152 |
+of a test case, and it's awaiting upstream review. |
153 |
+ |
154 |
+--- a/scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java |
155 |
++++ b/scilab/modules/helptools/src/java/org/scilab/modules/helptools/FopConverter.java |
156 |
+@@ -43,10 +43,10 @@ public class FopConverter extends ContainerConverter { |
157 |
+ String fileName = outputDirectory + "/" + baseName + "." + format.name().toLowerCase(); |
158 |
+ |
159 |
+ try { |
160 |
+- FopFactory fopFactory = FopFactory.newInstance(); |
161 |
++ FopFactory fopFactory = |
162 |
++ FopFactory.newInstance(new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml")); |
163 |
+ fopFactory.addElementMapping(new JLaTeXMathElementMapping()); |
164 |
+ fopFactory.getXMLHandlerRegistry().addXMLHandler(new JLaTeXMathXMLHandler()); |
165 |
+- fopFactory.setUserConfig(new File(System.getenv("SCI") + "/modules/helptools/etc/fopconf.xml")); |
166 |
+ |
167 |
+ // Step 3: Construct fop with desired output format |
168 |
+ OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName)); |
169 |
+--- a/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java |
170 |
++++ b/scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/utils/CodeExporter.java |
171 |
+@@ -114,11 +114,11 @@ public class CodeExporter extends FOCodeConverter { |
172 |
+ * @param format the page format |
173 |
+ */ |
174 |
+ public void convert(String code, int[] lineNumberArray, String fileName, String type, String title, PageFormat format) { |
175 |
+- FopFactory fopFactory = FopFactory.newInstance(); |
176 |
+ OutputStream out = null; |
177 |
+ |
178 |
+ try { |
179 |
+- fopFactory.setUserConfig(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml")); |
180 |
++ FopFactory fopFactory = |
181 |
++ FopFactory.newInstance(new File(ScilabConstants.SCI + "/modules/helptools/etc/fopconf.xml")); |
182 |
+ FOUserAgent userAgent = fopFactory.newFOUserAgent(); |
183 |
+ userAgent.setProducer(CREATOR); |
184 |
+ userAgent.setTitle(title); |
185 |
|
186 |
diff --git a/sci-mathematics/scilab/files/scilab-5.5.2-xmlgraphics-common-2.0.patch b/sci-mathematics/scilab/files/scilab-5.5.2-xmlgraphics-common-2.0.patch |
187 |
new file mode 100644 |
188 |
index 0000000..c12df96 |
189 |
--- /dev/null |
190 |
+++ b/sci-mathematics/scilab/files/scilab-5.5.2-xmlgraphics-common-2.0.patch |
191 |
@@ -0,0 +1,91 @@ |
192 |
+From: Bryan Gardiner <bog@××××××.net> |
193 |
+Project-Bug-URL: https://bugzilla.scilab.org/show_bug.cgi?id=13724 |
194 |
+Gentoo-Bug-URL: https://github.com/gentoo-science/sci/pull/456 |
195 |
+ |
196 |
+Updates Scilab 5.5.2 to build against xmlgraphics-common >=2.0. This is not |
197 |
+tested, as I'm not sure of a test case, and a similar patch (where the |
198 |
+super.processShape calls are passed cached=true) is already awaiting upstream |
199 |
+review. |
200 |
+ |
201 |
+--- a/scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java |
202 |
++++ b/scilab/modules/graphic_export/src/java/org/scilab/modules/graphic_export/Export.java |
203 |
+@@ -857,7 +857,7 @@ public class Export { |
204 |
+ } |
205 |
+ |
206 |
+ @Override |
207 |
+- public int processShape(Shape s) throws IOException { |
208 |
++ public int processShape(Shape s, boolean cached) throws IOException { |
209 |
+ if (s instanceof Ellipse2D.Double) { |
210 |
+ Ellipse2D.Double ell = (Ellipse2D.Double) s; |
211 |
+ if (ell.height == ell.width) { |
212 |
+@@ -880,10 +880,10 @@ public class Export { |
213 |
+ buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1])); |
214 |
+ it.next(); |
215 |
+ } else { |
216 |
+- return super.processShape(s); |
217 |
++ return super.processShape(s, cached); |
218 |
+ } |
219 |
+ } else { |
220 |
+- return super.processShape(s); |
221 |
++ return super.processShape(s, cached); |
222 |
+ } |
223 |
+ |
224 |
+ for (; !it.isDone(); it.next()) { |
225 |
+@@ -891,7 +891,7 @@ public class Export { |
226 |
+ if (type == PathIterator.SEG_LINETO) { |
227 |
+ buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1])); |
228 |
+ } else { |
229 |
+- return super.processShape(s); |
230 |
++ return super.processShape(s, cached); |
231 |
+ } |
232 |
+ } |
233 |
+ buffer.append("] DP"); |
234 |
+@@ -899,7 +899,7 @@ public class Export { |
235 |
+ return PathIterator.WIND_NON_ZERO; |
236 |
+ } |
237 |
+ |
238 |
+- return super.processShape(s); |
239 |
++ return super.processShape(s, cached); |
240 |
+ } |
241 |
+ }; |
242 |
+ g2d.setGraphicContext(new GraphicContext()); |
243 |
+@@ -1029,7 +1029,7 @@ public class Export { |
244 |
+ } |
245 |
+ |
246 |
+ @Override |
247 |
+- public int processShape(Shape s) throws IOException { |
248 |
++ public int processShape(Shape s, boolean cached) throws IOException { |
249 |
+ if (s instanceof Ellipse2D.Double) { |
250 |
+ Ellipse2D.Double ell = (Ellipse2D.Double) s; |
251 |
+ if (ell.height == ell.width) { |
252 |
+@@ -1052,10 +1052,10 @@ public class Export { |
253 |
+ buffer.append("[").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1])); |
254 |
+ it.next(); |
255 |
+ } else { |
256 |
+- return super.processShape(s); |
257 |
++ return super.processShape(s, cached); |
258 |
+ } |
259 |
+ } else { |
260 |
+- return super.processShape(s); |
261 |
++ return super.processShape(s, cached); |
262 |
+ } |
263 |
+ |
264 |
+ for (; !it.isDone(); it.next()) { |
265 |
+@@ -1063,7 +1063,7 @@ public class Export { |
266 |
+ if (type == PathIterator.SEG_LINETO) { |
267 |
+ buffer.append(" ").append(gen.formatDouble(coords[0])).append(" ").append(gen.formatDouble(coords[1])); |
268 |
+ } else { |
269 |
+- return super.processShape(s); |
270 |
++ return super.processShape(s, cached); |
271 |
+ } |
272 |
+ } |
273 |
+ buffer.append("] DP"); |
274 |
+@@ -1071,7 +1071,7 @@ public class Export { |
275 |
+ return PathIterator.WIND_NON_ZERO; |
276 |
+ } |
277 |
+ |
278 |
+- return super.processShape(s); |
279 |
++ return super.processShape(s, cached); |
280 |
+ } |
281 |
+ |
282 |
+ }; |
283 |
|
284 |
diff --git a/sci-mathematics/scilab/scilab-5.5.2.ebuild b/sci-mathematics/scilab/scilab-5.5.2.ebuild |
285 |
index 668f2fd..3e48d0b 100644 |
286 |
--- a/sci-mathematics/scilab/scilab-5.5.2.ebuild |
287 |
+++ b/sci-mathematics/scilab/scilab-5.5.2.ebuild |
288 |
@@ -49,7 +49,7 @@ CDEPEND="dev-libs/libpcre |
289 |
dev-java/commons-io:1 |
290 |
dev-java/commons-logging:0 |
291 |
>=dev-java/flexdock-1.2.4:0 |
292 |
- dev-java/fop:0 |
293 |
+ >=dev-java/fop-2.0:0 |
294 |
=dev-java/gluegen-2.2.4:2.2 |
295 |
dev-java/javahelp:0 |
296 |
dev-java/jeuclid-core:0 |
297 |
@@ -74,8 +74,8 @@ DEPEND="${CDEPEND} |
298 |
virtual/pkgconfig |
299 |
debug? ( dev-util/lcov ) |
300 |
gui? ( |
301 |
- >=virtual/jdk-1.5 |
302 |
- doc? ( dev-java/batik:1.8 |
303 |
+ >=virtual/jdk-1.6 |
304 |
+ doc? ( >=dev-java/batik-1.8-r2:1.8 |
305 |
app-text/docbook-xsl-stylesheets |
306 |
dev-java/xml-commons-external:1.4 |
307 |
dev-java/saxon:9 ) |
308 |
@@ -122,9 +122,12 @@ src_prepare() { |
309 |
"${FILESDIR}/${P}-gluegen.patch" \ |
310 |
"${FILESDIR}/${P}-fix-random-runtime-failure.patch" \ |
311 |
"${FILESDIR}/${P}-accessviolation.patch" \ |
312 |
- "${FILESDIR}/${P}-missinglib.patch" |
313 |
+ "${FILESDIR}/${P}-missinglib.patch" \ |
314 |
+ "${FILESDIR}/${P}-batik-1.8.patch" \ |
315 |
+ "${FILESDIR}/${P}-fop-2.0.patch" \ |
316 |
+ "${FILESDIR}/${P}-xmlgraphics-common-2.0.patch" |
317 |
|
318 |
- # works for me on x86, but users are having |
319 |
+ # works for me on x86, but users are having |
320 |
# trouble without see #282 on github |
321 |
append-ldflags $(no-as-needed) |
322 |
|
323 |
@@ -156,7 +159,7 @@ src_prepare() { |
324 |
java-pkg_jar-from jlatexmath-1,flexdock,skinlf |
325 |
java-pkg_jar-from jgoodies-looks-2.6,jrosetta |
326 |
java-pkg_jar-from avalon-framework-4.2,jeuclid-core |
327 |
- java-pkg_jar-from xmlgraphics-commons-1.5,commons-io-1 |
328 |
+ java-pkg_jar-from xmlgraphics-commons-2,commons-io-1 |
329 |
java-pkg_jar-from jogl-2.2 jogl-all.jar jogl2.jar |
330 |
java-pkg_jar-from gluegen-2.2 gluegen-rt.jar gluegen2-rt.jar |
331 |
java-pkg_jar-from fop fop.jar |
332 |
@@ -164,7 +167,7 @@ src_prepare() { |
333 |
java-pkg_jar-from jlatexmath-fop-1 |
334 |
use xcos && java-pkg_jar-from jgraphx-2.5 |
335 |
if use doc; then |
336 |
- java-pkg_jar-from --build-only batik-1.7 batik-all.jar |
337 |
+ java-pkg_jar-from --build-only batik-1.8 batik-all.jar |
338 |
java-pkg_jar-from --build-only saxon-9 saxon.jar saxon9he.jar |
339 |
java-pkg_jar-from --build-only xml-commons-external-1.4 xml-apis-ext.jar |
340 |
fi |