diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2008-11-21 12:23:46 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2008-11-21 12:23:46 +0000 |
commit | 2665f0912bb890bb308e778281db755fc7f318eb (patch) | |
tree | 30c0374f638542d20d6b8d435e5c9a7fc0a4ddb5 /dev-java | |
parent | Version bump, bug #247669 and #247670, thank Vieri for maintenance. (diff) | |
download | gentoo-2-2665f0912bb890bb308e778281db755fc7f318eb.tar.gz gentoo-2-2665f0912bb890bb308e778281db755fc7f318eb.tar.bz2 gentoo-2-2665f0912bb890bb308e778281db755fc7f318eb.zip |
Add patch to compile against latest itext releases. Fixes bug #239586. Thanks to Arttu Valo <arttuv69@gmail.com>.
(Portage version: 2.2_rc14/cvs/Linux 2.6.27-gentoo i686)
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/flyingsaucer/ChangeLog | 9 | ||||
-rw-r--r-- | dev-java/flyingsaucer/files/7-itext-2.0.8.patch | 61 | ||||
-rw-r--r-- | dev-java/flyingsaucer/flyingsaucer-7-r1.ebuild | 73 |
3 files changed, 142 insertions, 1 deletions
diff --git a/dev-java/flyingsaucer/ChangeLog b/dev-java/flyingsaucer/ChangeLog index a75bab3c9ab0..66af98732b0d 100644 --- a/dev-java/flyingsaucer/ChangeLog +++ b/dev-java/flyingsaucer/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-java/flyingsaucer # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/flyingsaucer/ChangeLog,v 1.2 2008/01/29 08:19:05 fordfrog Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/flyingsaucer/ChangeLog,v 1.3 2008/11/21 12:23:46 betelgeuse Exp $ + +*flyingsaucer-7-r1 (21 Nov 2008) + + 21 Nov 2008; Petteri Räty <betelgeuse@gentoo.org> + +files/7-itext-2.0.8.patch, +flyingsaucer-7-r1.ebuild: + Add patch to compile against latest itext releases. Fixes bug #239586. + Thanks to Arttu Valo <arttuv69@gmail.com>. 29 Jan 2008; Miroslav Šulc <fordfrog@gentoo.org> flyingsaucer-7.ebuild: ~amd64 keyword added diff --git a/dev-java/flyingsaucer/files/7-itext-2.0.8.patch b/dev-java/flyingsaucer/files/7-itext-2.0.8.patch new file mode 100644 index 000000000000..33b4ea37b994 --- /dev/null +++ b/dev-java/flyingsaucer/files/7-itext-2.0.8.patch @@ -0,0 +1,61 @@ +diff -u -r src.old/java/org/xhtmlrenderer/pdf/ITextFSImage.java src/java/org/xhtmlrenderer/pdf/ITextFSImage.java +--- src.old/java/org/xhtmlrenderer/pdf/ITextFSImage.java 2008-10-23 19:46:53.000000000 +0300 ++++ src/java/org/xhtmlrenderer/pdf/ITextFSImage.java 2008-10-23 19:48:05.000000000 +0300 +@@ -31,11 +31,11 @@ + } + + public int getWidth() { +- return (int)_image.plainWidth(); ++ return (int)_image.getPlainWidth(); + } + + public int getHeight() { +- return (int)_image.plainHeight(); ++ return (int)_image.getPlainHeight(); + } + + public void scale(int width, int height) { +diff -u -r src.old/java/org/xhtmlrenderer/pdf/ITextRenderer.java src/java/org/xhtmlrenderer/pdf/ITextRenderer.java +--- src.old/java/org/xhtmlrenderer/pdf/ITextRenderer.java 2008-10-23 19:46:53.000000000 +0300 ++++ src/java/org/xhtmlrenderer/pdf/ITextRenderer.java 2008-10-23 19:48:56.000000000 +0300 +@@ -234,7 +234,7 @@ + + _outputDevice.start(_doc); + _outputDevice.setWriter(writer); +- _outputDevice.initializePage(writer.getDirectContent(), firstPageSize.height()); ++ _outputDevice.initializePage(writer.getDirectContent(), firstPageSize.getHeight()); + + _root.getLayer().assignPagePaintingPositions(c, Layer.PAGED_MODE_PRINT); + +@@ -254,7 +254,7 @@ + doc.setPageSize(nextPageSize); + doc.newPage(); + _outputDevice.initializePage( +- writer.getDirectContent(), nextPageSize.height()); ++ writer.getDirectContent(), nextPageSize.getHeight()); + } + } + +diff -u -r src.old/java/org/xhtmlrenderer/pdf/ITextUserAgent.java src/java/org/xhtmlrenderer/pdf/ITextUserAgent.java +--- src.old/java/org/xhtmlrenderer/pdf/ITextUserAgent.java 2008-10-23 19:46:53.000000000 +0300 ++++ src/java/org/xhtmlrenderer/pdf/ITextUserAgent.java 2008-10-23 19:50:00.000000000 +0300 +@@ -60,8 +60,8 @@ + PdfReader reader = _outputDevice.getReader(url); + PDFAsImage image = new PDFAsImage(url); + Rectangle rect = reader.getPageSizeWithRotation(1); +- image.setInitialWidth(rect.width()*_outputDevice.getDotsPerPoint()); +- image.setInitialHeight(rect.height()*_outputDevice.getDotsPerPoint()); ++ image.setInitialWidth(rect.getWidth()*_outputDevice.getDotsPerPoint()); ++ image.setInitialHeight(rect.getHeight()*_outputDevice.getDotsPerPoint()); + resource = new ImageResource(image); + } else { + Image image = Image.getInstance(url); +@@ -84,7 +84,7 @@ + + private void scaleToOutputResolution(Image image) { + float factor = _sharedContext.getDotsPerPixel(); +- image.scaleAbsolute(image.plainWidth() * factor, image.plainHeight() * factor); ++ image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor); + } + + public SharedContext getSharedContext() { diff --git a/dev-java/flyingsaucer/flyingsaucer-7-r1.ebuild b/dev-java/flyingsaucer/flyingsaucer-7-r1.ebuild new file mode 100644 index 000000000000..f91a961896f8 --- /dev/null +++ b/dev-java/flyingsaucer/flyingsaucer-7-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/flyingsaucer/flyingsaucer-7-r1.ebuild,v 1.1 2008/11/21 12:23:46 betelgeuse Exp $ + +EAPI=1 +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="100% Java XHTML+CSS renderer" +HOMEPAGE="https://xhtmlrenderer.dev.java.net/" +SRC_URI="http://www.pdoubleya.com/projects/${PN}/downloads/r${PV}/${PN}-R${PV}final-src.zip" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="minimal svg" + +COMMON_DEP=" + >=dev-java/itext-2.0.8:0 + svg? ( dev-java/svgsalamander:0 )" + +# 1.5 because svgsalamander is 1.5 +RDEPEND=" + svg? ( >=virtual/jre-1.5 ) + !svg? ( >=virtual/jre-1.4 ) + ${COMMON_DEP}" +DEPEND=" + svg? ( >=virtual/jdk-1.5 ) + !svg? ( >=virtual/jdk-1.4 ) + app-arch/unzip + ${COMMON_DEP}" + +S=${WORKDIR} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/7-itext-2.0.8.patch" + + # Save lib/minium.jar because it's not publicly available although it's in + # public domain, will separate if something else needs it + rm -v lib/itext*.jar lib/dev/*.jar lib/dev/*/*.jar || die + cd lib + java-pkg_jar-from itext + if use svg; then + java-pkg_jar-from svgsalamander + EANT_BUILD_TARGET+=" jar.svg" + fi + + use minimal || EANT_BUILD_TARGET=" jar.docbook jar.about jar.browser" + +} + +# Investigate building demos/photogallery demos/filebrowser +# seems the files are missing for jar.photogaller jar.filebrowser +EANT_BUILD_TARGET="jar.core" +EANT_DOC_TARGET="docs" + +RESTRICT="test" + +# Needs X11 +src_test() { + eant test -Djava.awt.headless=true +} + +src_install() { + dodoc README || die + java-pkg_dojar build/*.jar lib/minium.jar + use doc && java-pkg_dojavadoc doc/user/api + use source && java-pkg_dosrc src/java/org +} |