aboutsummaryrefslogtreecommitdiffstats
path: root/java/java3d/files
diff options
context:
space:
mode:
authorstefan <stefan@FreeBSD.org>2013-06-17 01:05:55 +0800
committerstefan <stefan@FreeBSD.org>2013-06-17 01:05:55 +0800
commit8e5c4105eb9c255e81e43059417a00068ba471bf (patch)
tree0ec69890271501d6cd2384ccff717fa4bbc3c50b /java/java3d/files
parentb35b8d55ea84269cf3dbee9d127d4c424abc7c89 (diff)
downloadfreebsd-ports-gnome-8e5c4105eb9c255e81e43059417a00068ba471bf.tar.gz
freebsd-ports-gnome-8e5c4105eb9c255e81e43059417a00068ba471bf.tar.zst
freebsd-ports-gnome-8e5c4105eb9c255e81e43059417a00068ba471bf.zip
- Fix build with JDK 1.7. [1]
- Propagate Make environment to Ant to use the correct JDK and not just the one that Ant was built with. PR: 173505 [1] Submitted by: James Raynard <james.raynard@pobox.com> [1] Patch by: Piotr Smyrak <piotr.smyrak@gmail.com> [1] Obtained from: https://launchpad.net/ubuntu/+source/java3d/1.5.2+dfsg-8 [1]
Diffstat (limited to 'java/java3d/files')
-rw-r--r--java/java3d/files/patch-ImageComponentState.java50
-rw-r--r--java/java3d/files/patch-freebsd8
2 files changed, 58 insertions, 0 deletions
diff --git a/java/java3d/files/patch-ImageComponentState.java b/java/java3d/files/patch-ImageComponentState.java
new file mode 100644
index 000000000000..6eacc3fa0a09
--- /dev/null
+++ b/java/java3d/files/patch-ImageComponentState.java
@@ -0,0 +1,50 @@
+work/java3d-1.5.2/j3d-core-utils/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d
+--- j3d-core-utils/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponentState.java.orig
++++ j3d-core-utils/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponentState.java
+@@ -61,10 +61,7 @@ import com.sun.j3d.utils.scenegraph.io.r
+ import com.sun.j3d.utils.scenegraph.io.retained.SGIORuntimeException;
+ import java.awt.color.ColorSpace;
+ import java.awt.image.DataBuffer;
+-import com.sun.image.codec.jpeg.JPEGImageEncoder;
+-import com.sun.image.codec.jpeg.JPEGImageDecoder;
+-import com.sun.image.codec.jpeg.JPEGCodec;
+-import com.sun.image.codec.jpeg.JPEGEncodeParam;
++import javax.imageio.ImageIO;
+
+ public abstract class ImageComponentState extends NodeComponentState {
+
+@@ -203,10 +200,9 @@ public abstract class ImageComponentStat
+
+ private void writeBufferedImageJpegCompression( DataOutput out, BufferedImage image ) throws IOException {
+ ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
+- JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder( byteStream );
+-
+- encoder.encode( image );
+- byteStream.close();
++ if (!ImageIO.write(image, "jpeg", byteStream)) {
++ throw new AssertionError("No JPEG encoder available");
++ }
+
+ byte[] buffer = byteStream.toByteArray();
+ out.writeInt( buffer.length );
+@@ -261,11 +257,15 @@ public abstract class ImageComponentStat
+ byte[] buffer = new byte[ size ];
+ in.readFully( buffer );
+ ByteArrayInputStream byteStream = new ByteArrayInputStream( buffer );
+-
+- JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder( byteStream );
+- byteStream.close();
+-
+- return decoder.decodeAsBufferedImage();
++ try {
++ BufferedImage img = ImageIO.read(byteStream);
++ if (img == null) {
++ throw new AssertionError("No ImageReader available.");
++ }
++ return img;
++ } finally {
++ byteStream.close();
++ }
+ }
+
+ private void writeColorModel( DataOutput out, ColorModel colorModel ) throws IOException {
diff --git a/java/java3d/files/patch-freebsd b/java/java3d/files/patch-freebsd
index 13df270ee357..066f2ac3ebb8 100644
--- a/java/java3d/files/patch-freebsd
+++ b/java/java3d/files/patch-freebsd
@@ -88,6 +88,14 @@ diff -ruN ../java3d-1.5.2/j3d-core/src/native/build.xml ./j3d-core/src/native/bu
<property name="bldType" value="opt"/>
<property name="javahCoreSrc"
location="${src}/classes/share/javax/media/j3d"/>
+@@ -347,6 +360,7 @@
+ <javah destdir="${javahCoreTarget}" force="yes">
+ <classpath>
+ <pathelement path="${build}/${platform}/${bldType}/classes"/>
++ <pathelement path="${vecmath_home}/build/opt/lib/ext/vecmath.jar"/>
+ </classpath>
+
+ <class name="javax.media.j3d.Background"/>
diff -ruN ../java3d-1.5.2/j3d-core/src/native/ogl/build-freebsd.xml ./j3d-core/src/native/ogl/build-freebsd.xml
--- ../java3d-1.5.2/j3d-core/src/native/ogl/build-freebsd.xml 1970-01-01 12:00:00.000000000 +1200
+++ ./j3d-core/src/native/ogl/build-freebsd.xml 2009-07-12 13:21:41.000000000 +1200