--- Makefile.orig	2004-09-06 19:21:32.000000000 +0800
+++ Makefile	2004-09-06 19:21:49.000000000 +0800
@@ -6,10 +6,10 @@
 #
 
 PORTNAME=	pdftk
-PORTVERSION=	0.94.1
+PORTVERSION=	1.00
 CATEGORIES=	print
 MASTER_SITES=	http://www.accesspdf.com/pdftk/
-DISTNAME=	${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E}
+DISTNAME=	${PORTNAME}-${PORTVERSION:R}\.${PORTVERSION:E}
 
 MAINTAINER=	patrick_dkt@yahoo.com.hk
 COMMENT=	A simple tool for doing everyday things with PDF documents
@@ -34,10 +34,9 @@
 PLIST_FILES=	bin/pdftk
 
 post-extract:
-	@${REINPLACE_CMD} -e "s|CXXFLAGS \+\=|CXXFLAGS \+\= ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} -liconv -lz|g" ${WRKSRC}/Makefile.Base
-	@${REINPLACE_CMD} -e "s|g\+\+|g\+\+33|g" ${WRKSRC}/Makefile.Generic
-	@${REINPLACE_CMD} -e "s|MAKE)|MAKE) GXX=g++33 GCJ=gcj33 GCJH=gcjh33| " ${WRKSRC}/Makefile.Base
-
+	@${REINPLACE_CMD} -e "s|TOOLPATH\=|TOOLPATH\=\/usr\/local\/bin\/|g" ${WRKSRC}/Makefile.Generic
+	@${REINPLACE_CMD} -e "s|VERSUFF\=|VERSUFF\=33|g" ${WRKSRC}/Makefile.Generic
+	@${REINPLACE_CMD} -e "s|CXXFLAGS\= -lgcj|CXXFLAGS\= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} -liconv -lz|g" ${WRKSRC}/Makefile.Generic
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/../debian/${PORTNAME}.1 ${PREFIX}/man/man1
