summaryrefslogtreecommitdiff
path: root/app-text/pdftk/files/pdftk-1.41-r2.patch
blob: ee270090ea07a2f9e3d53d5e43ea8f0784904c3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/bc/asn1/Makefile pdftk-1.41/java_libs/com/lowagie/bc/asn1/Makefile
--- pdftk-1.41.orig/java_libs/com/lowagie/bc/asn1/Makefile	2006-07-27 19:18:06.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/bc/asn1/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -25,8 +25,7 @@ classes= $(patsubst %.java, %.class, $(s
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) --classpath="/usr/share/java/libgcj-4.3.jar:$(PWD):." $*;
 
 ##
 # targets
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/ImgPostscript.java pdftk-1.41/java_libs/com/lowagie/text/ImgPostscript.java
--- pdftk-1.41.orig/java_libs/com/lowagie/text/ImgPostscript.java	2006-07-26 19:12:26.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/ImgPostscript.java	2009-05-12 13:01:43.000000000 -0400
@@ -53,7 +53,6 @@ package com.lowagie.text;
 import java.io.*;
 import java.net.*;
 import com.lowagie.text.pdf.*;
-import com.lowagie.text.pdf.codec.postscript.*;
 import java.util.StringTokenizer;
 
 /**
@@ -194,7 +193,7 @@ implements Element {
      * @throws IOException on error
      * @throws DocumentException on error
      */
-    public void readPostscript(PdfTemplate template) throws IOException,
+/*    public void readPostscript(PdfTemplate template) throws IOException,
     DocumentException {
         setTemplateData(template);
         template.setWidth(width());
@@ -215,5 +214,5 @@ implements Element {
                 is.close();
             }
         }
-    }
+    } */
 }
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/Makefile pdftk-1.41/java_libs/com/lowagie/text/Makefile
--- pdftk-1.41.orig/java_libs/com/lowagie/text/Makefile	2006-07-26 17:14:34.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -25,14 +25,15 @@ classes= $(patsubst %.java, %.class, $(s
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) --classpath="/usr/share/java/libgcj-4.3.jar:$(PWD):." $*;
 
 ##
 # targets
 
 all : $(library) $(headers)
 
+$(classes): $(sources)
+
 $(library) : $(objects)
 	$(AR) $(ARFLAGS) $(library) $(objects);
 
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/markup/Makefile pdftk-1.41/java_libs/com/lowagie/text/markup/Makefile
--- pdftk-1.41.orig/java_libs/com/lowagie/text/markup/Makefile	2006-07-26 17:14:54.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/markup/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -25,8 +25,7 @@ classes= $(patsubst %.java, %.class, $(s
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) --classpath="/usr/share/java/libgcj-4.3.jar:$(PWD):." $*;
 
 ##
 # targets
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/codec/Makefile pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/Makefile
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/codec/Makefile	2006-07-26 17:15:20.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -25,8 +25,7 @@ classes= $(patsubst %.java, %.class, $(s
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) --classpath="/usr/share/java/libgcj-4.3.jar:$(PWD):." $*;
 
 ##
 # targets
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/codec/wmf/Makefile pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/wmf/Makefile
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/codec/wmf/Makefile	2006-07-26 17:15:32.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/wmf/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -25,8 +25,7 @@ classes= $(patsubst %.java, %.class, $(s
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) --classpath="/usr/share/java/libgcj-4.3.jar:$(PWD):." $*;
 
 ##
 # targets
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/fonts/Makefile pdftk-1.41/java_libs/com/lowagie/text/pdf/fonts/Makefile
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/fonts/Makefile	2006-07-26 17:15:48.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/fonts/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -34,8 +34,7 @@ afm_objects= $(patsubst %.afm, %.o, $(af
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) --classpath="/usr/share/java/libgcj-4.3.jar:$(PWD):." $*;
 
 ##
 # targets
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/Makefile pdftk-1.41/java_libs/com/lowagie/text/pdf/Makefile
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/Makefile	2006-07-26 17:15:10.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -25,8 +25,7 @@ classes= $(patsubst %.java, %.class, $(s
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) --classpath="/usr/share/java/libgcj-4.3.jar:$(PWD):." $*;
 
 ##
 # targets
@@ -37,4 +36,4 @@ $(library) : $(objects)
 	$(AR) $(ARFLAGS) $(library) $(objects);
 
 clean :
-	$(RM) $(RMFLAGS) *.o *.h *.class *.a
+	$(RM) $(RMFLAGS) *.o *.h *.class *.a hyphenation/*.class
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/PdfEncryption.java pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfEncryption.java
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/PdfEncryption.java	2006-07-26 20:02:28.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfEncryption.java	2009-05-12 13:02:16.000000000 -0400
@@ -50,7 +50,7 @@
 
 package com.lowagie.text.pdf;
 
-import java_local.security.MessageDigest; // ssteward
+import java.security.MessageDigest; // ssteward
 import com.lowagie.text.ExceptionConverter;
 
 /**
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/PdfWriter.java pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfWriter.java
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/PdfWriter.java	2006-10-24 19:43:32.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfWriter.java	2009-05-12 13:01:43.000000000 -0400
@@ -947,7 +947,7 @@ public class PdfWriter extends DocWriter
                         catch (Exception e) {
                             throw new DocumentException(e);
                         }
-                    }else{
+                    } /* else{
                         try {
                             ((ImgPostscript)image).readPostscript(getDirectContent().createTemplate(0, 0));
                         }
@@ -955,7 +955,7 @@ public class PdfWriter extends DocWriter
                             throw new DocumentException(e);
                         }
                         
-                    }
+                    } */
                 }
             }
             else {
diff -urNp pdftk-1.41.orig/java_libs/com/lowagie/text/xml/xmp/Makefile pdftk-1.41/java_libs/com/lowagie/text/xml/xmp/Makefile
--- pdftk-1.41.orig/java_libs/com/lowagie/text/xml/xmp/Makefile	2006-07-26 20:53:34.000000000 -0400
+++ pdftk-1.41/java_libs/com/lowagie/text/xml/xmp/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -25,8 +25,7 @@ classes= $(patsubst %.java, %.class, $(s
 # the "$*" automatic variable, here
 #
 %.h : %.class
-	$(GCJH) --classpath="." $*;
-	$(RM) $<
+	$(GCJH) --classpath="/usr/share/java/libgcj-4.3.jar:$(PWD):." $*;
 
 ##
 # targets
diff -urNp pdftk-1.41.orig/java_libs/Makefile pdftk-1.41/java_libs/Makefile
--- pdftk-1.41.orig/java_libs/Makefile	2006-08-29 02:44:26.000000000 -0400
+++ pdftk-1.41/java_libs/Makefile	2009-05-12 13:02:16.000000000 -0400
@@ -11,15 +11,9 @@
 java_libs_root= $(CURDIR)
 
 # append gcj flags
-export GCJFLAGS+= --encoding=UTF-8 --classpath="$(java_libs_root)"
+export GCJFLAGS+= --encoding=UTF-8 --classpath="/usr/share/java/libgcj-4.3.jar:$(java_libs_root)"
 
-all : libgcj_local itext
-
-libgcj_local :
-	$(MAKE) -C "$(java_libs_root)/gnu_local/java/security";
-	$(MAKE) -C "$(java_libs_root)/gnu_local/java/security/provider";
-	$(MAKE) -C "$(java_libs_root)/gnu/gcj/convert";
-	$(MAKE) -C "$(java_libs_root)/java_local/security";
+all : itext
 
 itext :
 	$(MAKE) -C "$(java_libs_root)/com/lowagie/text";
@@ -33,15 +27,9 @@ itext :
 	$(MAKE) -C "$(java_libs_root)/com/lowagie/text/pdf/fonts";
 	$(MAKE) -C "$(java_libs_root)/com/lowagie/text/xml/xmp";
 	$(MAKE) -C "$(java_libs_root)/com/lowagie/bc/asn1";
-	$(MAKE) -C "$(java_libs_root)/com/lowagie/text/pdf/codec/postscript";
-
-clean : libgcj_local_clean itext_clean
+#	$(MAKE) -C "$(java_libs_root)/com/lowagie/text/pdf/codec/postscript";
 
-libgcj_local_clean :
-	$(MAKE) -iC "$(java_libs_root)/gnu_local/java/security" clean;
-	$(MAKE) -iC "$(java_libs_root)/gnu_local/java/security/provider" clean;
-	$(MAKE) -iC "$(java_libs_root)/gnu/gcj/convert" clean;
-	$(MAKE) -iC "$(java_libs_root)/java_local/security" clean;
+clean : itext_clean
 
 itext_clean :
 	$(MAKE) -iC "$(java_libs_root)/com/lowagie/text" clean;
@@ -55,4 +43,4 @@ itext_clean :
 	$(MAKE) -iC "$(java_libs_root)/com/lowagie/text/pdf/fonts" clean;
 	$(MAKE) -iC "$(java_libs_root)/com/lowagie/text/xml/xmp" clean;
 	$(MAKE) -iC "$(java_libs_root)/com/lowagie/bc/asn1" clean;
-	$(MAKE) -iC "$(java_libs_root)/com/lowagie/text/pdf/codec/postscript" clean;
+#	$(MAKE) -iC "$(java_libs_root)/com/lowagie/text/pdf/codec/postscript" clean;
diff -urNp pdftk-1.41.orig/pdftk/Makefile.Base pdftk-1.41/pdftk/Makefile.Base
--- pdftk-1.41.orig/pdftk/Makefile.Base	2006-10-24 19:44:06.000000000 -0400
+++ pdftk-1.41/pdftk/Makefile.Base	2009-05-12 13:02:16.000000000 -0400
@@ -25,24 +25,13 @@ $(java_libs_root)/com/lowagie/text/pdf/f
 $(java_libs_root)/com/lowagie/text/markup/markup.a \
 $(java_libs_root)/com/lowagie/text/xml/xmp/xmp.a \
 $(java_libs_root)/com/lowagie/bc/asn1/asn1.a \
-$(java_libs_root)/com/lowagie/text/pdf/codec/postscript/postscript.a \
+
+# $(java_libs_root)/com/lowagie/text/pdf/codec/postscript/postscript.a \
 
 # font metric files, included as resources
 afms= $(wildcard $(java_libs_root)/com/lowagie/text/pdf/fonts/*.afm)
 afm_objects= $(patsubst %.afm, %.o, $(afms))
 
-# older versions of libgcj might not have the MD5 algorithm,
-# so I added it here; these *_local java files were grabbed from
-# libgcj CVS on March 7, 2004; diffed September 5, 2006 w/ gcc 4.1.1
-#
-# gnu/gcj/convert/Input_UnicodeBig.java was grabbed March 26, 2004; diffed September 5, 2006 w/ gcc 4.1.1
-#
-libgcj_local_libs = \
-$(java_libs_root)/java_local/security/security.a \
-$(java_libs_root)/gnu_local/java/security/provider/provider.a \
-$(java_libs_root)/gnu_local/java/security/security.a \
-$(java_libs_root)/gnu/gcj/convert/convert.a
-
 # this must already be set according to your platform Makefile;
 # we're just appending to it, here
 #
diff -urNp pdftk-1.41.orig/pdftk/pdftk.cc pdftk-1.41/pdftk/pdftk.cc
--- pdftk-1.41.orig/pdftk/pdftk.cc	2006-11-28 17:51:36.000000000 -0500
+++ pdftk-1.41/pdftk/pdftk.cc	2009-05-12 13:02:44.000000000 -0400
@@ -71,6 +71,8 @@
 #include "com/lowagie/text/pdf/PdfIndirectObject.h"
 #include "com/lowagie/text/pdf/PdfFileSpecification.h"
 #include "com/lowagie/text/pdf/PdfBoolean.h"
+#include "com/lowagie/text/pdf/PdfEncodings.h"
+#include "com/lowagie/text/pdf/BaseFont.h"
 
 #include "com/lowagie/text/pdf/RandomAccessFileOrArray.h" // for InputStreamToArray()
 
@@ -2672,6 +2674,8 @@ int main(int argc, char** argv)
 			JvInitClass(&itext::PdfDictionary::class$);
 			JvInitClass(&itext::PdfOutline::class$);
 			JvInitClass(&itext::PdfBoolean::class$);
+			JvInitClass(&itext::PdfEncodings::class$);
+			JvInitClass(&itext::BaseFont::class$);
 
 			TK_Session tk_session( argc, argv );