[Jpackage-commits] rpms/free/itext itext-1.3-manifest.mf, 1.3, 1.4 itext-1.4.pom, 1.2, NONE itext-usefreesoftware.patch, NONE, 1.1 itext.pom, NONE, 1.1 itext.spec, 1.5, 1.6

jpackage jpackage at ryu.zarb.org
Wed Jan 21 07:42:10 CET 2009


Update of /home/projects/jpackage/cvs/rpms/free/itext
In directory ryu.zarb.org:/tmp/RIbrJ7p4VN/rpms/free/itext

Modified Files:
	itext.spec 
Added Files:
	itext-1.3-manifest.mf itext-usefreesoftware.patch itext.pom 
Removed Files:
	itext-1.4.pom 
Log Message:
1.4-3jpp.1.jpp6

Index: itext.spec
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/itext/itext.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** itext.spec	23 Nov 2007 13:46:38 -0000	1.5
--- itext.spec	21 Jan 2009 06:42:08 -0000	1.6
***************
*** 1,3 ****
! # Copyright (c) 2000-2007, JPackage Project
  # All rights reserved.
  #
--- 1,3 ----
! # Copyright (c) 2000-2005, JPackage Project
  # All rights reserved.
  #
***************
*** 34,55 ****
  Name:           itext
  Version:        1.4
! Release:        2jpp
  Epoch:          0
  License:        Mozilla Public License & LGPL
  URL:            http://www.lowagie.com/iText/
  Group:          Development/Libraries/Java
! Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
! Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
! Source0:        itext-1.4.tar.gz
! # svn export http://itext.svn.sourceforge.net/svnroot/itext/tags/iText_1_4/ itext-1.4
! Source1:        itext-1.4.pom
! 
! BuildRequires:  jpackage-utils >= 0:1.7.3
! BuildRequires:  ant >= 0:1.6.5
  BuildRequires:  ant-trax
- Requires(post):    jpackage-utils >= 0:1.7.3
- Requires(postun):  jpackage-utils >= 0:1.7.3
  BuildArch:      noarch
! BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
  
  %description
--- 34,55 ----
  Name:           itext
  Version:        1.4
! Release:        3jpp.1%{?dist}
  Epoch:          0
  License:        Mozilla Public License & LGPL
  URL:            http://www.lowagie.com/iText/
  Group:          Development/Libraries/Java
! Vendor:         JPackage Project
! Distribution:   JPackage
! Source0:        itext-src-1.4.tar.gz
! # svn export https://itext.svn.sourceforge.net/svnroot/itext/tags/iText_1_4 itext
! # tar czf itext-src-1.4.tar.gz itext
! Source2:	    itext-1.3-manifest.mf
! Source3:	    %{name}.pom
! Patch0:         %{name}-usefreesoftware.patch
! BuildRequires:  jpackage-utils >= 0:1.6
! BuildRequires:  ant
  BuildRequires:  ant-trax
  BuildArch:      noarch
! BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  
  %description
***************
*** 80,86 ****
  
  %prep
! %setup -q 
  find . -name "*.jar" -exec rm {} \;
  
  %build
  pushd src
--- 80,90 ----
  
  %prep
! %setup -q -n %{name}
! mkdir -p src/META-INF
! cp %{SOURCE2} src/META-INF/MANIFEST.MF
  find . -name "*.jar" -exec rm {} \;
  
+ %patch0
+ 
  %build
  pushd src
***************
*** 93,106 ****
  
  # jars
! install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/itext
! install -m 644 build/bin/iText.jar \
        $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
  (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
  
- # pom
- install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
- install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-itext.pom
- %add_to_maven_depmap %{name} %{name} 1.4 JPP %{name}
- 
  # javadoc
  mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
--- 97,105 ----
  
  # jars
! mkdir -p $RPM_BUILD_ROOT%{_javadir}/itext
! cp -p build/bin/iText.jar \
        $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
  (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
  
  # javadoc
  mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
***************
*** 114,120 ****
--- 113,131 ----
  cp -pr build/tutorial $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
  
+ # Install the pom
+ install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
+ cp -pr %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.itext.pom
+ %add_to_maven_depmap itext itext 1.3 JPP itext
+ %add_to_maven_depmap com.lowagie itext 1.3 JPP itext
+ 
  %clean
  rm -rf $RPM_BUILD_ROOT
  
+ %post
+ %update_maven_depmap
+ 
+ %postun
+ %update_maven_depmap
+ 
  %post javadoc
  rm -f %{_javadocdir}/%{name}
***************
*** 126,141 ****
  fi
  
- %post
- %update_maven_depmap
- 
- %postun
- %update_maven_depmap
- 
  %files
  %defattr(0644,root,root,0755)
  %doc %{_docdir}/%{name}-%{version}/MPL-1.1.txt
  %doc %{_docdir}/%{name}-%{version}/lgpl.txt
! %{_javadir}/*
! %{_datadir}/maven2/poms/*
  %{_mavendepmapfragdir}
  
--- 137,146 ----
  fi
  
  %files
  %defattr(0644,root,root,0755)
  %doc %{_docdir}/%{name}-%{version}/MPL-1.1.txt
  %doc %{_docdir}/%{name}-%{version}/lgpl.txt
! %{_javadir}
! %{_datadir}/maven2
  %{_mavendepmapfragdir}
  
***************
*** 147,160 ****
  %files manual
  %defattr(0644,root,root,0755)
! %doc %{_docdir}/%{name}-%{version}
  
! %changelog
! * Fri Nov 23 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.4-2jpp
! - Drop relocation info from pom
! - Make Vendor, Distribution based on macro
  
! * Thu Nov 22 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.4-1jpp
! - Upgrade to 1.4 (not 1.4.7 because maven-doxia BRs = 1.4)
! - Add pom and depmap frag
  
  * Fri Mar 10 2006 Fernando Nasser <fnasser at redhat.com> - 0:1.3-2jpp
--- 152,162 ----
  %files manual
  %defattr(0644,root,root,0755)
! %doc %{_docdir}
  
! # -----------------------------------------------------------------------------
  
! %changelog
! * Wed Jan 07 2009 Yong Yang <yyang at redhat.com> - 0:1.4-3jpp
! - Imported from dbhole's maven 2.0.8 packages, Initial building on JPP6
  
  * Fri Mar 10 2006 Fernando Nasser <fnasser at redhat.com> - 0:1.3-2jpp

--- NEW FILE: itext-1.3-manifest.mf ---
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Main-Class: com.lowagie.tools.Toolbox


--- NEW FILE: itext-usefreesoftware.patch ---
diff -up ./src/com/lowagie/text/pdf/PdfGraphics2D.java.sav ./com/lowagie/text/pdf/PdfGraphics2D.java
--- ./src/com/lowagie/text/pdf/PdfGraphics2D.java.sav	2008-01-22 14:05:28.000000000 -0500
+++ ./src/com/lowagie/text/pdf/PdfGraphics2D.java	2008-01-22 14:23:02.000000000 -0500
@@ -100,6 +100,11 @@ import java.util.Set;
 import java.util.Iterator;
 import java.awt.font.TextAttribute;
 
+import javax.imageio.*;
+import javax.imageio.plugins.jpeg.*;
+import javax.imageio.metadata.*;
+import javax.imageio.stream.*;
+
 public class PdfGraphics2D extends Graphics2D {
     
     private static final int FILL = 1;
@@ -1249,10 +1254,15 @@ public class PdfGraphics2D extends Graph
                 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);
+                ImageWriter encoder = (ImageWriter)ImageIO.getImageWritersByFormatName("JPEG").next();
+                JPEGImageWriteParam param = new JPEGImageWriteParam(null);
+
+                param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
+                param.setCompressionQuality(jpegQuality);
+
+                encoder.setOutput(baos);
+                encoder.write((IIOMetadata) null, new IIOImage(scaled,null,null), param);
+                
                 scaled.flush();
                 scaled = null;
                 image = com.lowagie.text.Image.getInstance(baos.toByteArray());

--- NEW FILE: itext.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>itext</groupId>
  <artifactId>itext</artifactId>
  <name>itext</name>
  <version>1.3</version>

  <distributionManagement>
    <relocation>
      <groupId>com.lowagie</groupId>
    </relocation>
  </distributionManagement>
</project>

--- itext-1.4.pom DELETED ---




More information about the JPackage-commits mailing list