1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00
- Removed a bunch of patches after upstream build system changes
- Added FreeBSD-specific Makefile (pushing to upstream)

Requested by:	Sid Steward <sid dot steward at pdflabs dot com> (author)
Reviewed by:	Alessandro de Manzano <demanzano at dqmicro dot it>
This commit is contained in:
Greg Larkin 2010-11-12 22:52:53 +00:00
parent ac534db8a0
commit 7c642d9fdc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=264469
17 changed files with 102 additions and 496 deletions

View File

@ -6,12 +6,11 @@
#
PORTNAME= pdftk
PORTVERSION= 1.41
PORTREVISION= 3
PORTVERSION= 1.44
CATEGORIES= print
MASTER_SITES= http://www.pdfhacks.com/pdftk/ \
http://www.accesspdf.com/pdftk/
DISTNAME= ${PORTNAME}-${PORTVERSION:R}.${PORTVERSION:E}
MASTER_SITES= http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ \
LOCAL/glarkin
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= glarkin@FreeBSD.org
COMMENT= A simple tool for doing everyday things with PDF documents
@ -21,6 +20,8 @@ COMMENT= A simple tool for doing everyday things with PDF documents
# in the base system, we need to build the port anyway to get gcj42.
BUILD_DEPENDS= gcj${CSUFF}:${PORTSDIR}/lang/gcc${CSUFF}
USE_ZIP= yes
# Get gcc version suffix without the dot in USE_GCC
CSUFF= ${_USE_GCC:S/.//}
@ -33,18 +34,18 @@ USE_LDCONFIG= ${PREFIX}/lib/gcc${CSUFF}
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= GNU gcj does not exist on this platform
WRKSRC= ${WRKDIR}/${DISTNAME}/${PORTNAME}
PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}
PATCH_WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-dist
WRKSRC= ${PATCH_WRKSRC}/${PORTNAME}
MAKEFILE= Makefile.Generic
MAKEFILE= Makefile.FreeBSD
MAKE_ENV= GCJ=gcj${CSUFF} GCJH=gcjh${CSUFF} OBJCOPY=${OBJCOPY} LANG=C
MAN1= ${PORTNAME}.1
PLIST_FILES= bin/pdftk
post-extract:
@${REINPLACE_CMD} -e "s|TOOLPATH=|TOOLPATH=${LOCALBASE}/bin/|g" ${WRKSRC}/Makefile.Generic
@${REINPLACE_CMD} -e "s|VERSUFF=|VERSUFF=${CSUFF}|g" ${WRKSRC}/Makefile.Generic
post-patch:
@${REINPLACE_CMD} -e "s|TOOLPATH=|TOOLPATH=${LOCALBASE}/bin/|g" ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e "s|VERSUFF=|VERSUFF=${CSUFF}|g" ${WRKSRC}/${MAKEFILE}
#2005-10-29 - mjoyner@vbservices.net/mjoyner@ewc.edu
#as shipped, pdftk compiles fine with 3.4 gcj, as we currently only have 4.1 gcj available,
@ -54,17 +55,13 @@ post-extract:
#Based on info found via Google USENET Search: Adam McDougall, Gerald Pfeifer
#
@${REINPLACE_CMD} -e "s|GCJFLAGS=|GCJFLAGS= -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" ${WRKSRC}/Makefile.Generic
@${REINPLACE_CMD} -e "s|CXXFLAGS= -lgcj|CXXFLAGS= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} -liconv -lz -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" \
${WRKSRC}/Makefile.Generic
@${REINPLACE_CMD} -e "s|//SID import com.lowagie.text.ImgRaw;|import com.lowagie.text.ImgRaw;|g" \
${WRKSRC}/../java_libs/com/lowagie/text/pdf/codec/PngImage.java
@${REINPLACE_CMD} -e "s|^..java_libs_root./gnu/gcj/convert/convert.a|# x-nay the convert.a|g" ${WRKSRC}/Makefile.Base
@${REINPLACE_CMD} -e "s|^..java_libs_root./gnu_local/java/security/security.a .|$$\(java_libs_root\)/gnu_local/java/security/security.a|g" ${WRKSRC}/Makefile.Base
@${REINPLACE_CMD} -e "s|GCJFLAGS=|GCJFLAGS= -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" ${WRKSRC}/${MAKEFILE}
@${REINPLACE_CMD} -e "s|LDLIBS= -lgcj|LDLIBS= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} -liconv -lz -L${LOCALBASE}/lib -Wl,-rpath=${LOCALBASE}/lib/gcc${CSUFF} -w|g" \
${WRKSRC}/${MAKEFILE}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/../debian/${PORTNAME}.1 ${PREFIX}/man/man1
@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
@${INSTALL_MAN} ${WRKSRC}/../${PORTNAME}.1 ${PREFIX}/man/man1
.include <bsd.port.pre.mk>

View File

@ -1,3 +1,2 @@
MD5 (pdftk-1.41.tar.gz) = d8057a3ae8c3af7dfc7ea110f481ad7a
SHA256 (pdftk-1.41.tar.gz) = 6b0ff22297b50600083bb8f6b4c507c68144b2d70738d31e0e19ab4091df5164
SIZE (pdftk-1.41.tar.gz) = 1011368
SHA256 (pdftk-1.44-src.zip) = d70cb3faf2af849c2bee6c35e4e829277a5090cbb595321f04b59c94d784aa24
SIZE (pdftk-1.44-src.zip) = 1137086

View File

@ -1,35 +0,0 @@
--- ./java_libs/com/lowagie/bc/asn1/Makefile.orig 2006-07-27 19:18:06.000000000 -0400
+++ ./java_libs/com/lowagie/bc/asn1/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../.. -d ../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,35 +0,0 @@
--- ./java_libs/com/lowagie/text/Makefile.orig 2006-07-26 17:14:34.000000000 -0400
+++ ./java_libs/com/lowagie/text/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../.. -d ../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,35 +0,0 @@
--- ./java_libs/com/lowagie/text/markup/Makefile.orig 2006-07-26 17:14:54.000000000 -0400
+++ ./java_libs/com/lowagie/text/markup/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../.. -d ../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,35 +0,0 @@
--- ./java_libs/com/lowagie/text/pdf/Makefile.orig 2006-07-26 17:15:10.000000000 -0400
+++ ./java_libs/com/lowagie/text/pdf/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../.. -d ../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,11 +0,0 @@
--- ./java_libs/com/lowagie/text/pdf/PdfDate.java.orig 2006-07-26 19:56:42.000000000 -0400
+++ ./java_libs/com/lowagie/text/pdf/PdfDate.java 2010-04-08 18:13:54.000000000 -0400
@@ -76,7 +76,7 @@
// ssteward; static builds of pdftk (Windows, gcc 3.3.1) would
// omit this class because of its reference by reflection;
// this treatment ensures that ld will include it
- private static Class c1= gnu.java.locale.Calendar.class;
+ private static Class c1= java.util.Calendar.class;
private static final int dateSpace[] = {Calendar.YEAR, 4, 0, Calendar.MONTH, 2, -1, Calendar.DAY_OF_MONTH, 2, 0,
Calendar.HOUR_OF_DAY, 2, 0, Calendar.MINUTE, 2, 0, Calendar.SECOND, 2, 0};

View File

@ -1,36 +0,0 @@
--- ./java_libs/com/lowagie/text/pdf/codec/Makefile.orig 2006-07-26 17:15:20.000000000 -0400
+++ ./java_libs/com/lowagie/text/pdf/codec/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,13 +11,15 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
-
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
+
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,13 +27,14 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../../.. -d ../../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+
+$(headers): $(classes)
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,37 +0,0 @@
--- ./java_libs/com/lowagie/text/pdf/codec/postscript/Makefile.orig 2006-07-27 19:21:06.000000000 -0400
+++ ./java_libs/com/lowagie/text/pdf/codec/postscript/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,13 +11,15 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
-
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
+
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../../../.. -d ../../../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,37 +0,0 @@
--- ./java_libs/com/lowagie/text/pdf/codec/wmf/Makefile.orig 2006-07-26 17:15:32.000000000 -0400
+++ ./java_libs/com/lowagie/text/pdf/codec/wmf/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,13 +11,15 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
-
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
+
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../../../.. -d ../../../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,37 +0,0 @@
--- ./java_libs/com/lowagie/text/pdf/fonts/Makefile.orig 2006-07-26 17:15:48.000000000 -0400
+++ ./java_libs/com/lowagie/text/pdf/fonts/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,6 +11,7 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
# font metric files, included as resources
afms= $(wildcard *.afm)
@@ -21,6 +22,7 @@
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -34,8 +36,7 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) --classpath="../../../../.." -d ../../../../.. $(package).$*;
##
# targets
@@ -45,6 +46,8 @@
all : $(library) $(headers) $(afm_objects)
+$(headers) : $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,35 +0,0 @@
--- ./java_libs/com/lowagie/text/xml/xmp/Makefile.orig 2006-07-26 20:53:34.000000000 -0400
+++ ./java_libs/com/lowagie/text/xml/xmp/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../../.. -d ../../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,35 +0,0 @@
--- ./java_libs/gnu/gcj/convert/Makefile.orig 2006-07-26 17:13:44.000000000 -0400
+++ ./java_libs/gnu/gcj/convert/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../.. -d ../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,35 +0,0 @@
--- ./java_libs/gnu_local/java/security/Makefile.orig 2006-07-26 17:11:32.000000000 -0400
+++ ./java_libs/gnu_local/java/security/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../.. -d ../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,35 +0,0 @@
--- ./java_libs/gnu_local/java/security/provider/Makefile.orig 2006-07-26 17:13:22.000000000 -0400
+++ ./java_libs/gnu_local/java/security/provider/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../../../.. -d ../../../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -1,35 +0,0 @@
--- ./java_libs/java_local/security/Makefile.orig 2006-07-26 17:13:04.000000000 -0400
+++ ./java_libs/java_local/security/Makefile 2010-04-08 18:13:54.000000000 -0400
@@ -11,12 +11,14 @@
objects= $(patsubst %.java, %.o, $(sources))
headers= $(patsubst %.java, %.h, $(sources))
classes= $(patsubst %.java, %.class, $(sources))
+package:=$(shell grep ^package *.java | awk -F : '{ print $$2 }' | awk -F \; '{ print $$1 } ' | awk '{ print $$2 }' | sort -u)
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
%.class : %.java
$(GCJ) $(GCJFLAGS) -C $<
@@ -25,14 +27,15 @@
# the "$*" automatic variable, here
#
%.h : %.class
- $(GCJH) --classpath="." $*;
- $(RM) $<
+ $(GCJH) -classpath ../.. -d ../.. $(package).$*;
##
# targets
all : $(library) $(headers)
+$(headers): $(classes)
+
$(library) : $(objects)
$(AR) $(ARFLAGS) $(library) $(objects);

View File

@ -0,0 +1,83 @@
--- ./pdftk/Makefile.FreeBSD.orig 2010-11-11 09:38:40.000000000 -0500
+++ ./pdftk/Makefile.FreeBSD 2010-11-11 09:39:33.000000000 -0500
@@ -0,0 +1,80 @@
+# -*- Mode: Makefile -*-
+# Makefile.FreeBSD
+# Copyright 2004, 2010 Sid Steward
+# This is part of pdftk.
+#
+# Visit: www.pdftk.com for pdftk information and articles
+# Permalink: http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
+#
+# Please email Sid Steward with questions or bug reports.
+# Include "pdftk" in the subject line to ensure successful delivery:
+# sid.steward at pdflabs dot com
+
+# Brief Instructions
+#
+# Compile: make -f Makefile.FreeBSD
+# Install (as root): make -f Makefile.FreeBSD install
+# Uninstall: make -f Makefile.FreeBSD uninstall
+# Clean: make -f Makefile.FreeBSD clean
+#
+
+# this tries to compensate for objects missing from older versions of libgcj
+# it replaces them with local implementations
+#
+# set to 1 for gcc 3.4 and other, older versions of gcc (e.g., mingw 3.4.5)
+# comment out for gcc 4.4 and other, newer versions of gcc
+#
+#export USE_LOCAL_LIBGCJ= 1
+
+# tools
+# need direct path to libgcj for gcjh (starting in gcj 4.1.2 per Aurélien GÉRÔME)
+TOOLPATH=
+export VERSUFF=
+export CXX= $(TOOLPATH)g++$(VERSUFF)
+export GCJ= $(TOOLPATH)gcj$(VERSUFF)
+export GCJH= $(TOOLPATH)gcjh$(VERSUFF)
+export GJAR= $(TOOLPATH)gjar$(VERSUFF)
+#export LIBGCJ= /usr/share/java/libgcj$(VERSUFF).jar
+export AR= ar
+export RM= rm
+export ARFLAGS= rs
+export RMFLAGS= -vf
+
+# pdftk compiler flags; 0x2f is a forward slash; 0x5c is a backslash
+# if you want pdftk to ask before overwriting a file, set
+# ASK_ABOUT_WARNINGS to true; otherwise: false; override this default
+# with the dont_ask or do_ask command-line options
+#
+# drop CXXFLAG -O3 due to template inlining causing:
+# "error: mixing C++ and Java catches in a single translation unit" per Andrew Haley;
+# fix added for gcc-4.3; this problem might be fixed in 4.4
+#
+# GCJFLAG -O3 causes pdftk to segfault (during a cat operation) when compiled on sarge using gcc 3.4.4
+# per Johann Felix Soden:
+# In gcc 4.3 "-O3" gives an error. This is fixed in PR C++/39380 which is at least in debian's gcc 4.4.1-4
+#
+# GCJFLAG -fsource=1.3 identifies the version of the java source
+#
+# when building/using a shared itext library:
+# CXXFLAGS: -fpic (or-fPIC)
+# GCJFLAGS: -Wl,-Bsymbolic -fpic (or -fPIC) -Wl,-rpath,/usr/lib/gcj
+# stock pdftk links statically against its own, modified itext library
+#
+# -findirect-dispatch
+# introduced in gcj 4:
+# "Using that option causes GCJ to generate native code for classes and methods that follow the precise same binary compatibility rules as described in the Java Language Specification."
+# http://lwn.net/Articles/130796/
+# omitted because it caused linking errors using gcc 4.4; it also seems to make a larger binary
+#
+# -Wl,--as-needed
+# see: http://www.gentoo.org/proj/en/qa/asneeded.xml
+# only effects libraries following option on the command line
+#
+#
+export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
+export CXXFLAGS= -Wall -Wextra -Weffc++ -O2
+export GCJFLAGS= -Wall -Wextra -fsource=1.3 -O2
+export GCJHFLAGS= -force
+export LDLIBS= -lgcj
+
+include Makefile.Base