This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master in repository java3d.
commit b68d90a2fff99f7b70cce299d41e46f01ed3307e Author: Niels Thykier <[email protected]> Date: Sat Jun 23 14:39:06 2012 +0000 Fix FTBFS with Java7 --- debian/changelog | 1 + debian/patches/06_java-compat.patch | 63 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 65 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4dcf5a3..8070b1d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ java3d (1.5.2+dfsg-8) UNRELEASED; urgency=low * Team upload. * Remove -G flag from ia64 compiler flags. (Closes: #650799) + * Replace use of com.sun JPEG library with ImageIO. -- Niels Thykier <[email protected]> Sat, 23 Jun 2012 16:31:55 +0200 diff --git a/debian/patches/06_java-compat.patch b/debian/patches/06_java-compat.patch new file mode 100644 index 0000000..4e26e88 --- /dev/null +++ b/debian/patches/06_java-compat.patch @@ -0,0 +1,63 @@ +Description: FTBFS with java7 + * Replace use of com.sun.image.codec.jpeg.* with ImageIO. + * Extend class-path for javah + +--- java3d-1.5.2+dfsg.orig/j3d-core-utils/src/classes/share/com/sun/j3d/utils/scenegraph/io/state/javax/media/j3d/ImageComponentState.java ++++ java3d-1.5.2+dfsg/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 { +--- java3d-1.5.2+dfsg.orig/j3d-core/src/native/build.xml ++++ java3d-1.5.2+dfsg/j3d-core/src/native/build.xml +@@ -361,6 +361,7 @@ + <javah destdir="${javahCoreTarget}" force="yes"> + <classpath> + <pathelement path="${build}/${platform}/${bldType}/classes"/> ++ <pathelement path="/usr/share/java/vecmath.jar" /> + </classpath> + + <class name="javax.media.j3d.Background"/> diff --git a/debian/patches/series b/debian/patches/series index 98b337d..29b59f4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 04_no_maxmemory.patch 05_pic_amd64.patch 05_pic_i586.patch +06_java-compat.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/java3d.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

