summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Thomson <wltjr@gentoo.org>2007-05-30 17:58:38 +0000
committerWilliam Thomson <wltjr@gentoo.org>2007-05-30 17:58:38 +0000
commitc75e9773ef85007442347f3cbf112678a47690f1 (patch)
treed2c829b840ffa6dd73ac5fdb0adf0d4f0e20926f /dev-java/itext
parentRe-fix threads use-flag check if >boost-1.33, bug 180322 (diff)
downloadgentoo-2-c75e9773ef85007442347f3cbf112678a47690f1.tar.gz
gentoo-2-c75e9773ef85007442347f3cbf112678a47690f1.tar.bz2
gentoo-2-c75e9773ef85007442347f3cbf112678a47690f1.zip
Added patch that switches from com.sun.* stuff for JPEGs to ImageIO. Fix for bug # 180339
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-java/itext')
-rw-r--r--dev-java/itext/ChangeLog7
-rw-r--r--dev-java/itext/files/2.0-ImageIO.patch35
-rw-r--r--dev-java/itext/itext-2.0.3.ebuild3
3 files changed, 43 insertions, 2 deletions
diff --git a/dev-java/itext/ChangeLog b/dev-java/itext/ChangeLog
index 4782a68dd02f..54266c557e1b 100644
--- a/dev-java/itext/ChangeLog
+++ b/dev-java/itext/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-java/itext
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/itext/ChangeLog,v 1.43 2007/05/30 14:38:05 wltjr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/itext/ChangeLog,v 1.44 2007/05/30 17:58:38 wltjr Exp $
+
+ 30 May 2007; William L. Thomson Jr. <wltjr@gentoo.org>
+ +files/2.0-ImageIO.patch, itext-2.0.3.ebuild:
+ Added patch that switches from com.sun.* stuff for JPEGs to ImageIO. Fix for
+ bug # 180339
*itext-2.0.3 (30 May 2007)
diff --git a/dev-java/itext/files/2.0-ImageIO.patch b/dev-java/itext/files/2.0-ImageIO.patch
new file mode 100644
index 000000000000..e37dc904dcf0
--- /dev/null
+++ b/dev-java/itext/files/2.0-ImageIO.patch
@@ -0,0 +1,35 @@
+--- ../PdfGraphics2D.java 2007-05-30 12:38:56.000000000 -0400
++++ com/lowagie/text/pdf/PdfGraphics2D.java 2007-05-30 13:07:37.000000000 -0400
+@@ -99,6 +99,7 @@
+ import java.util.Iterator;
+ import java.util.Map;
+ import java.util.Set;
++import javax.imageio.ImageIO;
+
+ import com.lowagie.text.pdf.internal.PolylineShape;
+
+@@ -185,12 +186,6 @@
+ super();
+ dg2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
+ setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
+- try {
+- Class.forName("com.sun.image.codec.jpeg.JPEGCodec");
+- }
+- catch (Throwable t) {
+- convertImagesToJPEG = false;
+- }
+ this.convertImagesToJPEG = convertImagesToJPEG;
+ this.jpegQuality = quality;
+ this.onlyShapes = onlyShapes;
+@@ -1354,10 +1349,7 @@
+ g3.dispose();
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+- com.sun.image.codec.jpeg.JPEGImageEncoder encoder = com.sun.image.codec.jpeg.JPEGCodec.createJPEGEncoder(baos);
+- com.sun.image.codec.jpeg.JPEGEncodeParam param = com.sun.image.codec.jpeg.JPEGCodec.getDefaultJPEGEncodeParam(scaled);
+- param.setQuality(jpegQuality, true);
+- encoder.encode(scaled, param);
++ ImageIO.write(scaled,"jpg",baos);
+ scaled.flush();
+ scaled = null;
+ image = com.lowagie.text.Image.getInstance(baos.toByteArray());
diff --git a/dev-java/itext/itext-2.0.3.ebuild b/dev-java/itext/itext-2.0.3.ebuild
index 50d7c5d5449d..2141f7c8ec4f 100644
--- a/dev-java/itext/itext-2.0.3.ebuild
+++ b/dev-java/itext/itext-2.0.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/itext/itext-2.0.3.ebuild,v 1.1 2007/05/30 14:38:05 wltjr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/itext/itext-2.0.3.ebuild,v 1.2 2007/05/30 17:58:38 wltjr Exp $
JAVA_PKG_IUSE="doc source"
@@ -41,6 +41,7 @@ src_unpack() {
epatch ${FILESDIR}/2.0.2-compile_xml.patch
epatch ${FILESDIR}/2.0.2-site_xml.patch
+ epatch ${FILESDIR}/2.0-ImageIO.patch
java-ant_bsfix_files ant/*.xml || die "failed to rewrite build xml files"
mkdir -p "${WORKDIR}/build/bin" || die