pdftk-1.41 stable port information

Package: pdftk
Version: 1.41
Revision: 1
Distribution: 10.4, 10.5
Architecture: i386, x86_64

BuildDepends: gcc42, libwmf, libjasper.1, fink (>= 0.24.12)
Depends: gcc42-shlibs, libwmf-shlibs, libjasper.1-shlibs

Source: http://www.pdfhacks.com/pdftk/%n-%v.tar.gz
Source-MD5: d8057a3ae8c3af7dfc7ea110f481ad7a

PatchFile: %n-%v.patch
PatchFile-MD5: ffb8985e15d201447ff3205f9f7b2456
PatchScript: sed 's|@PREFIX@/bin/|%p/bin/|g' < %{PatchFile} | patch -p1

CompileScript: <<
cd pdftk; make -f Makefile.MacOSX
<<

InstallScript: <<
mkdir -p %i/bin %i/share/man/man1
cp pdftk/pdftk %i/bin
cp debian/pdftk.1 %i/share/man/man1
<<

DocFiles: debian/copyright pdftk.1.txt pdftk.1.html

Description: Handy tool for manipulating PDF
DescDetail: <<
If PDF is electronic paper, then pdftk is an electronic
staple-remover, hole-punch, binder, secret-decoder-ring,
and X-Ray-glasses. Pdftk is a simple tool for doing
everyday things with PDF documents. Use it to:

* Merge PDF Documents
* Split PDF Pages into a New Document
* Decrypt Input as Necessary (Password Required)
* Encrypt Output as Desired
* Fill PDF Forms with FDF Data and/or Flatten Forms
* Apply a Background Watermark
* Report PDF Metrics such as Metadata and Bookmarks
* Update PDF Metadata
* Attach Files to PDF Pages or the PDF Document
* Unpack PDF Attachments
* Burst a PDF Document into Single Pages
* Uncompress and Re-Compress Page Streams
* Repair Corrupted PDF (Where Possible)
<<

DescPort: <<
in pdftk/Makefile.OSX, set path to gnu gcc4.2 and use g++-4
use man and html docu from debian/
<<

DescPackaging: <<
This package requires gcc42. It does not build with gcc43 or newer.
AFAIK, the problem with pdftk is that it illegally mixes C++ and Java
exceptions. gcc 4.2 was nice enough to compile it somehow, and at
least it worked. The newer gcc 4.3 just spits out the error msg and
stops. The latest version is from 2006.
<<

License: GPL
Homepage: http://www.pdfhacks.com/pdftk
Maintainer: Matthias Ringwald

pdftk-1.41 stable port .patch

Index: pdftk-1.41/java_libs/com/lowagie/text/Makefile
===================================================================
--- pdftk-1.41.orig/java_libs/com/lowagie/text/Makefile 2007-11-08 14:03:26.800010177 +0100
+++ pdftk-1.41/java_libs/com/lowagie/text/Makefile 2007-11-08 14:03:29.072639728 +0100
@@ -25,14 +25,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets

all : $(library) $(headers)

+$(classes): $(sources)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

Index: pdftk-1.41/java_libs/com/lowagie/text/xml/xmp/Makefile
===================================================================
--- pdftk-1.41.orig/java_libs/com/lowagie/text/xml/xmp/Makefile 2007-11-08 14:03:26.820015719 +0100
+++ pdftk-1.41/java_libs/com/lowagie/text/xml/xmp/Makefile 2007-11-08 14:03:29.092645270 +0100
@@ -25,8 +25,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets
Index: pdftk-1.41/java_libs/com/lowagie/text/pdf/Makefile
===================================================================
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/Makefile 2007-11-08 14:03:26.832019044 +0100
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/Makefile 2007-11-08 14:03:29.092645270 +0100
@@ -25,8 +25,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets
@@ -37,4 +36,4 @@
$(AR) $(ARFLAGS) $(library) $(objects);

clean :
- $(RM) $(RMFLAGS) *.o *.h *.class *.a
+ $(RM) $(RMFLAGS) *.o *.h *.class *.a hyphenation/*.class
Index: pdftk-1.41/java_libs/com/lowagie/text/pdf/fonts/Makefile
===================================================================
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/fonts/Makefile 2007-11-08 14:03:26.852024586 +0100
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/fonts/Makefile 2007-11-08 14:03:29.092645270 +0100
@@ -34,8 +34,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets
Index: pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/Makefile
===================================================================
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/codec/postscript/Makefile 2007-11-08 14:03:26.868029019 +0100
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/Makefile 2007-11-08 14:03:29.092645270 +0100
@@ -25,8 +25,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets
Index: 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 2007-11-08 14:03:26.908040103 +0100
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/wmf/Makefile 2007-11-08 14:03:29.092645270 +0100
@@ -25,8 +25,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets
Index: pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/Makefile
===================================================================
--- pdftk-1.41.orig/java_libs/com/lowagie/text/pdf/codec/Makefile 2007-11-08 14:03:26.928045645 +0100
+++ pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/Makefile 2007-11-08 14:03:29.100647487 +0100
@@ -25,8 +25,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets
Index: pdftk-1.41/java_libs/com/lowagie/text/markup/Makefile
===================================================================
--- pdftk-1.41.orig/java_libs/com/lowagie/text/markup/Makefile 2007-11-08 14:03:26.948051187 +0100
+++ pdftk-1.41/java_libs/com/lowagie/text/markup/Makefile 2007-11-08 14:03:29.100647487 +0100
@@ -25,8 +25,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets
Index: pdftk-1.41/java_libs/com/lowagie/bc/asn1/Makefile
===================================================================
--- pdftk-1.41.orig/java_libs/com/lowagie/bc/asn1/Makefile 2007-11-08 14:03:26.972057837 +0100
+++ pdftk-1.41/java_libs/com/lowagie/bc/asn1/Makefile 2007-11-08 14:03:29.100647487 +0100
@@ -25,8 +25,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="$(java_libs_root):." $*

##
# targets
Index: pdftk-1.41/pdftk/Makefile.Base
===================================================================
--- pdftk-1.41.orig/pdftk/Makefile.Base 2007-11-08 14:03:42.008223078 +0100
+++ pdftk-1.41/pdftk/Makefile.Base 2007-11-08 14:03:50.490572824 +0100
@@ -73,4 +73,4 @@

clean:
$(MAKE) -C $(java_libs_root) clean
- rm -vf *.o
+ rm -vf *.o pdftk
Index: pdftk/pdftk/Makefile.Base
===================================================================
--- pdftk.orig/pdftk/Makefile.Base 2007-11-14 13:26:12.343555702 +0100
+++ pdftk/pdftk/Makefile.Base 2007-11-14 13:26:12.363561247 +0100
@@ -31,18 +31,6 @@
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
#
Index: pdftk/java_libs/com/lowagie/text/pdf/PdfEncryption.java
===================================================================
--- pdftk.orig/java_libs/com/lowagie/text/pdf/PdfEncryption.java 2007-11-14 13:24:35.736779184 +0100
+++ pdftk/java_libs/com/lowagie/text/pdf/PdfEncryption.java 2007-11-14 13:26:12.363561247 +0100
@@ -50,7 +50,7 @@

package com.lowagie.text.pdf;

-import java_local.security.MessageDigest; // ssteward
+import java.security.MessageDigest;
import com.lowagie.text.ExceptionConverter;

/**
Index: pdftk/java_libs/Makefile
===================================================================
--- pdftk.orig/java_libs/Makefile 2007-11-14 13:26:12.343555702 +0100
+++ pdftk/java_libs/Makefile 2007-11-14 13:26:56.971925474 +0100
@@ -11,15 +11,9 @@
java_libs_root= $(CURDIR)

# append gcj flags
-export GCJFLAGS+= --encoding=UTF-8 --classpath="$(java_libs_root)"
+export GCJFLAGS+= -w --encoding=UTF-8 --classpath="$(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";
@@ -35,13 +29,7 @@
$(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
-
-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;
build_with_gcc-4.2
no_embedded_libs
--- pdftk-1.41/pdftk/Makefile.MacOSX 2006-09-21 19:37:16.000000000 +0200
+++ pdftk-1.41-patched/pdftk/Makefile.MacOSX 2008-03-28 10:58:07.000000000 +0100
@@ -15,9 +15,9 @@
# for an article on building GCJ on OS X, see:
# http://users.bestweb.net/~john3g/gcj_osx/gcj_on_osx.html
#
-TOOLPATH= /usr/local/gcj/bin/
+TOOLPATH= @PREFIX@/bin/
VERSUFF=
-CXX= $(TOOLPATH)g++$(VERSUFF)
+CXX= $(TOOLPATH)g++-4$(VERSUFF)
export GCJ= $(TOOLPATH)gcj$(VERSUFF)
export GCJH= $(TOOLPATH)gcjh$(VERSUFF)
export AR= ar

pdftk-1.41 _unstable_ port .patch