Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Nov 2013 23:05:33 GMT
From:      Kozlov Sergey <kozlov.sergey.404@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/183578: [patch] print/pdftk new version and bug fixes
Message-ID:  <201311012305.rA1N5XCE078326@oldred.freebsd.org>
Resent-Message-ID: <201311012310.rA1NA09L083819@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183578
>Category:       ports
>Synopsis:       [patch] print/pdftk new version and bug fixes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 01 23:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Kozlov Sergey
>Release:        9.2-RELEASE
>Organization:
ARC
>Environment:
FreeBSD fbsd-sandbox 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Updated port to pdftk-2.02

Changes:
- Removed LOCAL master site, no distfile there obviously
- Moved USE_ZIP after BUILD_DEPENDS due to portlint warning
- Added LICENSE due to portlint warning
- Added LIB_DEPENDS. Libraries provided by gcc required to run the binary, but gcc is registered only as build dependency. Removing the gcc after installation of pdftk is permitted but breaks pdftk
- The port doesn't install any shared libraries, so there's no point in USE_LDCONFIG
- Changed PLIST_FILES and removed MAN1 to support staging
- Removed ancient comment (mentioned gcc and FreeBSD versions are deprecated long ago)
- Prepended STAGEDIR before PREFIX to support staging
- Corrected patch-pdftk__Makefile.Base to support new version
- REMOVED FILE file/patch-pdftk__Makefile.FreeBSD (is now provided by upstream)
- REMOVED FILE file/patch-java__Makefile (patch included by upstream)

Tested build using gcc46(default) and gcc49
Port is tested by portlint 2.14.7 and porttools 0.99_8

Features tested in resulting binary:
- encrypt_128bit
- allow <permissions>
- owner_pw <owner password>
- dump_data_utf8
- update_info_utf8
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 332403)
+++ Makefile	(working copy)
@@ -2,22 +2,26 @@
 # $FreeBSD$
 
 PORTNAME=	pdftk
-PORTVERSION=	1.45
-PORTREVISION=	1
+PORTVERSION=	2.02
 CATEGORIES=	print
-MASTER_SITES=	http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ \
-		LOCAL/glarkin
+MASTER_SITES=	http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
 DISTNAME=	${PORTNAME}-${PORTVERSION}-src
 
 MAINTAINER=	glarkin@FreeBSD.org
 COMMENT=	Simple tool for doing everyday things with PDF documents
 
-USE_ZIP=	yes
+LICENSE=	GPLv2
 
+LIB_DEPENDS=	libgcj.so:${PORTSDIR}/lang/gcc${CSUFF} \
+		libstdc++.so:${PORTSDIR}/lang/gcc${CSUFF} \
+		libgcc_s.so:${PORTSDIR}/lang/gcc${CSUFF}
+
 BUILD_DEPENDS=	gcj${CSUFF}:${PORTSDIR}/lang/gcc${CSUFF} \
 		gcjh${CSUFF}:${PORTSDIR}/lang/gcc${CSUFF} \
 		cpp${CSUFF}:${PORTSDIR}/lang/gcc${CSUFF}
 
+USE_ZIP=	yes
+
 # Get GCC version suffix without the dot in USE_GCC
 CSUFF=		${_USE_GCC:S/.//}
 
@@ -24,7 +28,6 @@
 USE_GCC=	yes
 USE_GMAKE=	yes
 USES=		iconv
-USE_LDCONFIG=	${PREFIX}/lib/gcc${CSUFF}
 
 # gcj/libgcj don't exist on some platforms
 ONLY_FOR_ARCHS=		i386 amd64
@@ -37,28 +40,18 @@
 MAKE_ENV=	GCJ=gcj${CSUFF} GCJH=gcjh${CSUFF} GCPP=cpp${CSUFF} \
 		OBJCOPY=${OBJCOPY} LANG=C LC_CTYPE=C
 
-MAN1=		${PORTNAME}.1
-PLIST_FILES=	bin/pdftk
+PLIST_FILES=	bin/pdftk \
+		man/man1/pdftk.1.gz
 
-NO_STAGE=	yes
 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,
-#fix things so that it will compile. (compile tested on 5.4-STABLE)
-#
-#The resulting binary from using the 4.1 compiler suite has *NOT* been regression tested!
-#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}
 	@${REINPLACE_CMD} -e "s|LDLIBS= -lgcj|LDLIBS= -lgcj ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} ${ICONV_LIB} -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}/../${PORTNAME}.1 ${PREFIX}/man/man1
+	@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+	@${INSTALL_MAN} ${WRKSRC}/../${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
--- distinfo	(revision 332403)
+++ distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (pdftk-1.45-src.zip) = f4e1a50a9ae748dc71883182b797c80c497884fb3071e564361af57354378fcf
-SIZE (pdftk-1.45-src.zip) = 1159411
+SHA256 (pdftk-2.02-src.zip) = 118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1
+SIZE (pdftk-2.02-src.zip) = 2239008
Index: files/patch-pdftk__Makefile.Base
===================================================================
--- files/patch-pdftk__Makefile.Base	(revision 332403)
+++ files/patch-pdftk__Makefile.Base	(working copy)
@@ -1,8 +1,8 @@
---- ./pdftk/Makefile.Base.orig	2010-11-17 14:25:44.000000000 -0500
-+++ ./pdftk/Makefile.Base	2010-11-17 14:27:49.000000000 -0500
-@@ -29,21 +29,21 @@
+--- pdftk/Makefile.Base.orig	2013-10-13 16:59:09.000000000 +0300
++++ pdftk/Makefile.Base	2013-10-13 17:14:39.000000000 +0300
+@@ -28,24 +28,24 @@
  #
- CPPFLAGS+= -DPDFTK_VER=\"1.44\"
+ CPPFLAGS+= -DPDFTK_VER=\"2.02\"
  
 -all : javalib pdftk
 +all : pdftk
@@ -18,12 +18,16 @@
 +report.o : javalib report.cc report.h pdftk.h
  	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) report.cc -c
  
--pdftk.o : pdftk.cc pdftk.h attachments.h report.h $(JAVALIB) $(GCJ_LOCAL_LIB_FULL)
-+pdftk.o : javalib pdftk.cc pdftk.h attachments.h report.h $(GCJ_LOCAL_LIB_FULL)
+-passwords.o : passwords.cc passwords.h pdftk.h $(JAVALIB)
++passwords.o : javalib passwords.cc passwords.h pdftk.h
+ 	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) passwords.cc -c
+ 
+-pdftk.o : pdftk.cc pdftk.h attachments.h report.h passwords.h $(JAVALIB)
++pdftk.o : javalib pdftk.cc pdftk.h attachments.h report.h passwords.h
  	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) pdftk.cc -c
  
--pdftk : pdftk.o attachments.o report.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL)
-+pdftk : javalib pdftk.o attachments.o report.o $(GCJ_LOCAL_LIB_FULL)
- 	$(CXX) $(CXXFLAGS) attachments.o report.o pdftk.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL) $(LDLIBS) -o pdftk
+-pdftk : pdftk.o attachments.o report.o passwords.o $(JAVALIB) $(LIBGCJ_SUPPLEMENT_FULL_O)
++pdftk : javalib pdftk.o attachments.o report.o passwords.o $(LIBGCJ_SUPPLEMENT_FULL_O)
+ 	$(CXX) $(CXXFLAGS) attachments.o report.o passwords.o pdftk.o $(JAVALIB) $(LIBGCJ_SUPPLEMENT_FULL_O) $(LDLIBS) -o pdftk
  
  install:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311012305.rA1N5XCE078326>