rpms/itext/devel itext-2.1.7-fixpomforbc.patch, NONE, 1.1 itext-xmloutput.patch, NONE, 1.1 itext.spec, 1.22, 1.23

Andrew Overholt overholt at fedoraproject.org
Fri Aug 28 20:31:03 UTC 2009


Author: overholt

Update of /cvs/pkgs/rpms/itext/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22992

Modified Files:
	itext.spec 
Added Files:
	itext-2.1.7-fixpomforbc.patch itext-xmloutput.patch 
Log Message:
* Thu Aug 27 2009 Andrew Overholt <overholt at redhat.com> 2.1.7-4
- Patch POM file due to explicit "jdk14" requirement on bouncycastle
- Patch in XML output classes from earlier version (their license is
  clean) for maven-doxia

itext-2.1.7-fixpomforbc.patch:
 JPP-itext.pom |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- NEW FILE itext-2.1.7-fixpomforbc.patch ---
diff -up ./JPP-itext.pom.orig ./JPP-itext.pom
--- ./JPP-itext.pom.orig	2009-08-27 13:58:26.000000000 -0400
+++ ./JPP-itext.pom	2009-08-27 13:58:45.000000000 -0400
@@ -65,18 +65,18 @@
 	</scm>
 	<dependencies>
 		<dependency>
-			<groupId>bouncycastle</groupId>
-			<artifactId>bcmail-jdk14</artifactId>
+			<groupId>org.bouncycastle</groupId>
+			<artifactId>bcmail-jdk16</artifactId>
 			<version>138</version>
 		</dependency>
 		<dependency>
-			<groupId>bouncycastle</groupId>
-			<artifactId>bcprov-jdk14</artifactId>
+			<groupId>org.bouncycastle</groupId>
+			<artifactId>bcprov-jdk16</artifactId>
 			<version>138</version>
 		</dependency>
 		<dependency>
-			<groupId>bouncycastle</groupId>
-			<artifactId>bctsp-jdk14</artifactId>
+			<groupId>org.bouncycastle</groupId>
+			<artifactId>bctsp-jdk16</artifactId>
 			<version>138</version>
 		</dependency>
 	</dependencies>
@@ -97,4 +97,4 @@
 			</plugin>
 		</plugins>
 	</build>
-</project>
\ No newline at end of file
+</project>

itext-xmloutput.patch:
 markup/MarkupTags.java    |  266 +++++
 rtf/AbstractRtfField.java |  358 +++++++
 rtf/GenericRtfField.java  |  139 ++
 rtf/RtfCell.java          |  549 ++++++++++
 rtf/RtfField.java         |   84 +
 rtf/RtfHeaderFooter.java  |  114 ++
 rtf/RtfHeaderFooters.java |  160 +++
 rtf/RtfPageNumber.java    |  105 ++
 rtf/RtfRow.java           |  443 ++++++++
 rtf/RtfTOC.java           |  187 +++
 rtf/RtfTOCEntry.java      |  174 +++
 rtf/RtfTable.java         |  201 ++++
 rtf/RtfTableCell.java     |  392 +++++++
 rtf/RtfWriter.java        | 2298 ++++++++++++++++++++++++++++++++++++++++++++++
 xml/XmlToHtml.java        |  144 ++
 xml/XmlToPdf.java         |  144 ++
 xml/XmlToRtf.java         |  144 ++
 xml/XmlToXXX.java         |  147 ++
 18 files changed, 6049 insertions(+)

--- NEW FILE itext-xmloutput.patch ---
### Eclipse Workspace Patch 1.0
#P iText-2.1.7
Index: src/core/com/lowagie/text/rtf/RtfTableCell.java
===================================================================
--- src/core/com/lowagie/text/rtf/RtfTableCell.java	(revision 0)
+++ src/core/com/lowagie/text/rtf/RtfTableCell.java	(revision 0)
@@ -0,0 +1,392 @@
+/*
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * (the "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the License.
+ *
+ * The Original Code is 'iText, a free JAVA-PDF library'.
+ *
+ * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
+ * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
+ * All Rights Reserved.
+ * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
+ * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
+ *
+ * Contributor(s): all the names of the contributors are added in the source code
+ * where applicable.
+ *
+ * Alternatively, the contents of this file may be used under the terms of the
+ * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
+ * provisions of LGPL are applicable instead of those above.  If you wish to
+ * allow use of your version of this file only under the terms of the LGPL
+ * License and not to allow others to use your version of this file under
+ * the MPL, indicate your decision by deleting the provisions above and
+ * replace them with the notice and other provisions required by the LGPL.
+ * If you do not delete the provisions above, a recipient may use your version
+ * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the MPL as stated above or under the terms of the GNU
+ * Library General Public License as published by the Free Software Foundation;
+ * either version 2 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
+ * details.
+ *
+ * If you didn't download this code from the following link, you should check if
+ * you aren't using an obsolete version:
+ * http://www.lowagie.com/iText/
+ */
+
+package com.lowagie.text.rtf;
+
+import com.lowagie.text.Cell;
+import com.lowagie.text.Element;
+import com.lowagie.text.BadElementException;
+
+import java.util.Properties;
+
+/**
+ * A <code>Cell</code> with extended style attributes
+ *
+ * ONLY FOR USE WITH THE RtfWriter NOT with the RtfWriter2.
+ * @deprecated Please move to the RtfWriter2 and associated classes. com.lowagie.text.rtf.table.RtfCell replaces the functionality of this class.
+ */
+public class RtfTableCell extends Cell
+{
+    /* Table border styles */
+
+    /** Table border solid */
+    public static final int BORDER_UNDEFINED = 0;
+
+    /** Table border solid */
+    public static final int BORDER_SINGLE = 1;
+
+    /** Table border double thickness */
+    public static final int BORDER_DOUBLE_THICK = 2;
+
+    /** Table border shadowed */
+    public static final int BORDER_SHADOWED = 3;
+
+    /** Table border dotted */
+    public static final int BORDER_DOTTED = 4;
+
+    /** Table border dashed */
+    public static final int BORDER_DASHED = 5;
+
+    /** Table border hairline */
+    public static final int BORDER_HAIRLINE = 6;
+
+    /** Table border double line */
+    public static final int BORDER_DOUBLE = 7;
+
+    /** Table border dot dash line */
+    public static final int BORDER_DOT_DASH = 8;
+
+    /** Table border dot dot dash line */
+    public static final int BORDER_DOT_DOT_DASH = 9;
+
+    /** Table border triple line */
+    public static final int BORDER_TRIPLE = 10;
+
+    /** Table border line */
+    public static final int BORDER_THICK_THIN = 11;
+
+    /** Table border line */
+    public static final int BORDER_THIN_THICK = 12;
+
+    /** Table border line */
+    public static final int BORDER_THIN_THICK_THIN = 13;
+
+    /** Table border line */
+    public static final int BORDER_THICK_THIN_MED = 14;
+
+    /** Table border line */
+    public static final int BORDER_THIN_THICK_MED = 15;
+
+    /** Table border line */
+    public static final int BORDER_THIN_THICK_THIN_MED = 16;
+
+    /** Table border line */
+    public static final int BORDER_THICK_THIN_LARGE = 17;
+
+    /** Table border line */
+    public static final int BORDER_THIN_THICK_LARGE = 18;
+
+    /** Table border line */
+    public static final int BORDER_THIN_THICK_THIN_LARGE = 19;
+
+    /** Table border line */
+    public static final int BORDER_WAVY = 20;
+
+    /** Table border line */
+    public static final int BORDER_DOUBLE_WAVY = 21;
+
+    /** Table border line */
+    public static final int BORDER_STRIPED = 22;
+
+    /** Table border line */
+    public static final int BORDER_EMBOSS = 23;
+
+    /** Table border line */
+    public static final int BORDER_ENGRAVE = 24;
+
+    /* Instance variables */
+    private float topBorderWidth;
+    private float leftBorderWidth;
+    private float rightBorderWidth;
+    private float bottomBorderWidth;
+    private int topBorderStyle = 1;
+    private int leftBorderStyle = 1;
+    private int rightBorderStyle = 1;
+    private int bottomBorderStyle = 1;
+
+/**
+ * Constructs an empty <CODE>Cell</CODE> (for internal use only).
+ *
+ * @param   dummy   a dummy value
+ */
+
+    public RtfTableCell(boolean dummy) {
+        super(dummy);
+    }
+
+/**
+ * Constructs a <CODE>Cell</CODE> with a certain <CODE>Element</CODE>.
+ * <P>
+ * if the element is a <CODE>ListItem</CODE>, <CODE>Row</CODE> or
+ * <CODE>Cell</CODE>, an exception will be thrown.
+ *
+ * @param	element		the element
+ * @throws	BadElementException when the creator was called with a <CODE>ListItem</CODE>, <CODE>Row</CODE> or <CODE>Cell</CODE>
+ */
+    public RtfTableCell(Element element) throws BadElementException {
+        super(element);
+    }
+
+/**
+ * Constructs a <CODE>Cell</CODE> with a certain content.
+ * <P>
+ * The <CODE>String</CODE> will be converted into a <CODE>Paragraph</CODE>.
+ *
+ * @param	content		a <CODE>String</CODE>
+ */
+    public RtfTableCell(String content) {
+        super(content);
+    }
+
+///**
+// * Returns a <CODE>Cell</CODE> that has been constructed taking in account
+// * the value of some <VAR>attributes</VAR>.
+// *
+// * @param	attributes		Some attributes
+// */
+//
+//    public RtfTableCell(Properties attributes) {
+//        super(attributes);
+//    }
[...5797 lines suppressed...]
+ * @deprecated Please move to the RtfWriter2 and associated classes. com.lowagie.text.rtf.headerfooter.RtfHeaderFooter replaces the functionality of this class.
+ */
+public class RtfHeaderFooter extends HeaderFooter {
+
+
+    private Element content = null;
+
+        
+    /**
+     * Constructs a new header
+     * @param before
+     * @param after
+     */
+    public RtfHeaderFooter( Phrase before, Phrase after ) {
+        super( before, after );    
+    }    
+
+
+    /**
+     * Constructs a new header
+     * @param before
+     * @param numbered
+     */
+    public RtfHeaderFooter( Phrase before, boolean numbered ) {
+        super( before, numbered );
+    }    
+
+
+    /**
+     * Constructs a new header
+     * @param content
+     */
+    public RtfHeaderFooter( Element content ) {
+        super(new Phrase(content.toString()), false);
+        this.content = content;
+    }    
+
+
+    /**
+     * @return the element specified in the ctor or null;
+     */
+    public Element content() {
+        return content;
+    }
+}

Property changes on: src/core/com/lowagie/text/rtf/RtfHeaderFooter.java
___________________________________________________________________
Added: svn:executable
   + *

Index: src/core/com/lowagie/text/xml/XmlToHtml.java
===================================================================
--- src/core/com/lowagie/text/xml/XmlToHtml.java	(revision 0)
+++ src/core/com/lowagie/text/xml/XmlToHtml.java	(revision 0)
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2002 by Matt Benson.
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * (the "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the License.
+ *
+ * The Original Code is 'iText, a free JAVA-PDF library'.
+ *
+ * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
+ * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
+ * All Rights Reserved.
+ * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
+ * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
+ *
+ * Contributor(s): all the names of the contributors are added in the source code
+ * where applicable.
+ *
+ * Alternatively, the contents of this file may be used under the terms of the
+ * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
+ * provisions of LGPL are applicable instead of those above.  If you wish to
+ * allow use of your version of this file only under the terms of the LGPL
+ * License and not to allow others to use your version of this file under
+ * the MPL, indicate your decision by deleting the provisions above and
+ * replace them with the notice and other provisions required by the LGPL.
+ * If you do not delete the provisions above, a recipient may use your version
+ * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the MPL as stated above or under the terms of the GNU
+ * Library General Public License as published by the Free Software Foundation;
+ * either version 2 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
+ * details.
+ *
+ * If you didn't download this code from the following link, you should check if
+ * you aren't using an obsolete version:
+ * http://www.lowagie.com/iText/
+ */
+
+package com.lowagie.text.xml;
+
+
+import java.io.OutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+
+import com.lowagie.text.Document;
+import com.lowagie.text.DocumentException;
+import com.lowagie.text.html.HtmlWriter;
+
+
+/**
+ * HTML-specific subclass of <code>XmlToXXX</code>.
+ *
+ * @version 1.0
+ * @author <a href="mailto:orangeherbert at users.sourceforge.net">Matt Benson</a>
+ */
+public class XmlToHtml
+ extends XmlToXXX
+{
+	
+/**
+ * Construct an <CODE>XmlToHtml</CODE> with the default page size.
+ */
+	public XmlToHtml()
+	{
+		super();
+	}//end default constructor
+	
+	
+/**
+ * Construct an <CODE>XmlToHtml</CODE> with the specified page size.
+ * @param pageSize   <CODE>String</CODE> page size name from
+ * <CODE>com.lowagie.text.PageSize</CODE>.
+ */
+	public XmlToHtml(String pageSize)
+	{
+		super(pageSize);
+	}//end constructor(String)
+	
+	
+/**
+ * Add a <CODE>DocWriter</CODE> for the specified <CODE>Document</CODE> and
+ * <CODE>OutputStream</CODE>.
+ * @param doc The document to which content will be added
+ * @param out The outputstream where the HTML will be sent to
+ * @throws DocumentException if document errors occur.
+ */	
+	protected final void addWriter(Document doc, OutputStream out)
+	 throws DocumentException
+	{
+		HtmlWriter.getInstance(doc, out);
+	}//end addWriter
+	
+	
+/**
+ * Main method of the <CODE>XmlToHtml</CODE> class.
+ * @param args   <CODE>String[]</CODE> of command-line arguments.
+ */
+	public static void main(String[] args)
+	{
+		int code = 0;
+		
+		if (args.length > 1)
+		{
+			try
+			{
+				XmlToHtml x;
+				if (args.length > 2)
+				{
+					x = new XmlToHtml(args[2]);
+				}//end if at least 3 args
+				else
+				{
+					x = new XmlToHtml();
+				}//end else, only 2 args
+				
+				x.parse(new FileInputStream(args[0]), new FileOutputStream(args[1]));
+			}//end try to do everything
+			catch (Exception ex)
+			{
+				code = 2;
+				ex.printStackTrace(System.err);
+			}//end catch Exception
+		}//end if at least 2 args
+		else
+		{
+			code = 1;
+			System.err.println(
+			 "Usage:  XmlToHtml [XML file in] [PDF file out] [optional page size]");
+		}//end else, not enough arguments
+		
+		System.exit(code);
+	}//end main
+	
+}//end class XmlToHtml


Index: itext.spec
===================================================================
RCS file: /cvs/pkgs/rpms/itext/devel/itext.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- itext.spec	27 Aug 2009 15:46:26 -0000	1.22
+++ itext.spec	28 Aug 2009 20:31:01 -0000	1.23
@@ -4,13 +4,30 @@
 Summary:          A Free Java-PDF library
 Name:             itext
 Version:          2.1.7
-Release:          3%{?dist}
+Release:          4%{?dist}
 License:          (LGPLv2+ or MPLv1.1) and ASL 2.0 and BSD and MIT and LGPLv2+ and CC-BY
 URL:              http://www.lowagie.com/iText/
 Group:            Development/Libraries
 Source0:          http://downloads.sourceforge.net/itext/iText-src-%{version}.tar.gz
 Source2:          http://repo2.maven.org/maven2/com/lowagie/itext/%{version}/itext-%{version}.pom
 Patch1:           itext-2.1.5-pdftk.patch
+
+# The iText POM specifies that it requires bouncycastle's "jdk14" JARs
+# but we have "jdk16".
+Patch2:           itext-2.1.7-fixpomforbc.patch
+# Maven's Doxia plugin explicitly requires these XML output interfaces
+# of iText.  They were removed in iText 1.4.4 [1].  iText versions prior
+# to 1.5.x had questionable licensing [2] so rather than try to create
+# an itext1 package, I have forward-ported these classes.  The doxia
+# developers have told me on IRC on 2009-08-27 that the iText dependency
+# will likely be deprecated meaning we won't have to keep these forever.
+# -- Andrew Overholt, 2009-08-28
+# [1]
+# http://www.1t3xt.com/about/history.php?branch=history.10&node=14
+# [2]
+# https://bugzilla.redhat.com/show_bug.cgi?id=236309
+Patch3:           itext-xmloutput.patch
+
 BuildRequires:    ant
 BuildRequires:    bouncycastle-tsp
 BuildRequires:    dom4j
@@ -40,7 +57,7 @@ iText is a library that allows you to ge
 classes are very useful for people who need to generate read-only, platform
 independent documents containing text, lists, tables and images. The library is
 especially useful in combination with Java(TM) technology-based Servlets: The
-look and feel of HTML is browser dependent; with iText and PDF you can control 
+look and feel of HTML is browser dependent; with iText and PDF you can control
 exactly how your servlet's output will look.
 
 %package javadoc
@@ -55,6 +72,9 @@ API documentation for the %{alternate_na
 %prep
 %setup -q -c -T -a 0
 %patch1 -p1 -b .pdftk
+cp -pr %{SOURCE2} JPP-itext.pom
+%patch2 -p0 -b .fixpomforbc
+%patch3 -p0 -b .xmloutput
 
 # Remove preshipped binaries
 find . -name "*.jar" -exec rm {} \;
@@ -107,7 +127,7 @@ cp -pr build/docs/* $RPM_BUILD_ROOT%{_ja
 
 # Install the pom
 install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
-cp -pr %{SOURCE2} $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-itext.pom
+cp -pr JPP-itext.pom $RPM_BUILD_ROOT%{_mavenpomdir}
 %add_to_maven_depmap itext itext %{version} JPP itext
 %add_to_maven_depmap com.lowagie itext %{version} JPP itext
 
@@ -117,7 +137,7 @@ rm -rf $RPM_BUILD_ROOT
 %post
 %update_maven_depmap
 %if %{with_gcj}
-if [ -x %{_bindir}/rebuild-gcj-db ] 
+if [ -x %{_bindir}/rebuild-gcj-db ]
  then
   %{_bindir}/rebuild-gcj-db
  fi
@@ -126,7 +146,7 @@ if [ -x %{_bindir}/rebuild-gcj-db ] 
 %postun
 %update_maven_depmap
 %if %{with_gcj}
- if [ -x %{_bindir}/rebuild-gcj-db ] 
+ if [ -x %{_bindir}/rebuild-gcj-db ]
  then
   %{_bindir}/rebuild-gcj-db
  fi
@@ -151,6 +171,11 @@ if [ -x %{_bindir}/rebuild-gcj-db ] 
 # -----------------------------------------------------------------------------
 
 %changelog
+* Thu Aug 27 2009 Andrew Overholt <overholt at redhat.com> 2.1.7-4
+- Patch POM file due to explicit "jdk14" requirement on bouncycastle
+- Patch in XML output classes from earlier version (their license is
+  clean) for maven-doxia
+
 * Thu Aug 27 2009 Andrew Overholt <overholt at redhat.com> 2.1.7-3
 - Add maven POM file for use by other maven packages
 




More information about the fedora-extras-commits mailing list