[72412] trunk/dports/textproc/pdftk
ryandesign at macports.org
ryandesign at macports.org
Wed Oct 13 18:10:20 PDT 2010
Revision: 72412
http://trac.macports.org/changeset/72412
Author: ryandesign at macports.org
Date: 2010-10-13 18:10:18 -0700 (Wed, 13 Oct 2010)
Log Message:
-----------
pdftk: update to 1.43 and add gcc45 variant, so now this works on Snow Leopard; see #15420
Modified Paths:
--------------
trunk/dports/textproc/pdftk/Portfile
Added Paths:
-----------
trunk/dports/textproc/pdftk/files/patch-Makefile.OSX-10.6.diff
trunk/dports/textproc/pdftk/files/patch-gcj-4.2-and-older.diff
Removed Paths:
-------------
trunk/dports/textproc/pdftk/files/patch-report.cc.diff
Modified: trunk/dports/textproc/pdftk/Portfile
===================================================================
--- trunk/dports/textproc/pdftk/Portfile 2010-10-14 00:47:26 UTC (rev 72411)
+++ trunk/dports/textproc/pdftk/Portfile 2010-10-14 01:10:18 UTC (rev 72412)
@@ -4,15 +4,14 @@
PortSystem 1.0
name pdftk
-version 1.41
-revision 2
+version 1.43
categories textproc graphics pdf
maintainers ryandesign
platforms darwin
-homepage http://www.pdfhacks.com/pdftk/
+homepage http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
master_sites ${homepage}
-use_bzip2 yes
-worksrcdir ${distname}/${name}
+use_zip yes
+extract.suffix -src${extract.suffix}
use_configure no
universal_variant no
use_parallel_build no
@@ -36,62 +35,73 @@
Uncompress and Re-Compress Page Streams \
Repair Corrupted PDF (Where Possible)
-checksums \
- md5 7214230b937dc996d209c05b7b7b3518 \
- sha1 e5eb83dd96dbda68072efe8f2637aad59f50dffc
+checksums sha1 ab701140a4eb78f0c855144a375fd52a8e6b0734 \
+ rmd160 33206067de0e093a18458523ee3bb46bcf72864b
depends_lib \
port:libiconv
-set toolpath ${prefix}/bin/
+build.dir ${worksrcpath}/${name}
+
+patchfiles patch-Makefile.OSX-10.6.diff
+
+post-patch {
+ reinplace "s|@PREFIX@|${prefix}|g" ${build.dir}/Makefile.OSX-10.6
+}
+
set versuff ""
-pre-fetch {
- if {![file exists ${toolpath}gcj${versuff}]} {
+pre-configure {
+ if {![file exists ${prefix}/bin/gcj${versuff}]} {
return -code error "
-Cannot build ${name} because ${toolpath}gcj${versuff}
+Cannot build ${name} because ${prefix}/bin/gcj${versuff}
is missing, possibly because of this gcc bug:
-http://trac.macports.org/projects/macports/ticket/13553
+http://trac.macports.org/ticket/13553
"
}
}
pre-build {
- reinplace "s|^\\(CPPFLAGS=\\)|\\1 ${configure.cppflags}|" ${worksrcpath}/Makefile.MacOSX
- reinplace "s|^\\(CXXFLAGS=\\)|\\1 ${configure.cxxflags} ${configure.ldflags}|" ${worksrcpath}/Makefile.MacOSX
- build.args-append TOOLPATH=${toolpath} VERSUFF=${versuff}
+ build.args-append VERSUFF=${versuff}
}
-build.args \
- -f Makefile.MacOSX
+build.args-append -f Makefile.OSX-10.6
destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
- xinstall -m 755 -W ${worksrcpath} pdftk ${destroot}${prefix}/bin
- xinstall -m 644 -W ${worksrcpath}/.. pdftk.1.html pdftk.1.txt \
+ xinstall -m 755 -W ${destroot.dir} pdftk ${destroot}${prefix}/bin
+ xinstall -m 644 -W ${worksrcpath} changelog.html changelog.txt pdftk.1.html pdftk.1.txt \
${destroot}${prefix}/share/doc/${name}
- xinstall -m 644 -W ${worksrcpath}/../debian pdftk.1 \
+ xinstall -m 644 -W ${worksrcpath} pdftk.1 \
${destroot}${prefix}/share/man/man1
}
-if {${os.arch} == "powerpc"} {
-variant with_gcc41 conflicts with_gcc42 description {Build using gcc41 (PowerPC only)} {
+variant with_gcc41 requires gcc41 description {Deprecated synonym for gcc41} {}
+variant gcc41 conflicts gcc42 gcc45 description {Build using gcc41} {
+ patchfiles-append patch-gcj-4.2-and-older.diff
+ configure.compiler macports-gcc-4.1
+ depends_build-append port:fastjar
depends_lib-append port:gcc41
set versuff -mp-4.1
}
-}
-variant with_gcc42 conflicts with_gcc41 description {Build using gcc42} {
+variant with_gcc42 requires gcc42 description {Deprecated synonym for gcc42} {}
+variant gcc42 conflicts gcc41 gcc45 description {Build using gcc42} {
+ patchfiles-append patch-gcj-4.2-and-older.diff
+ configure.compiler macports-gcc-4.2
+ depends_build-append port:fastjar
depends_lib-append port:gcc42
set versuff -mp-4.2
}
-if { (![variant_exists with_gcc41] || ![variant_isset with_gcc41]) && ![variant_isset with_gcc42] } {
- default_variants +with_gcc42
+variant gcc45 conflicts gcc41 gcc42 description {Build using gcc45} {
+ configure.compiler macports-gcc-4.5
+ depends_lib-append port:gcc45
+ set versuff -mp-4.5
}
-# Patch based on handle_utf8_data_in_update_info from the Debian package pdftk.
-patchfiles patch-report.cc.diff
-patch.args -p2
+if {![variant_isset gcc41] && ![variant_isset gcc42] && ![variant_isset gcc45]} {
+ default_variants +gcc45
+}
Added: trunk/dports/textproc/pdftk/files/patch-Makefile.OSX-10.6.diff
===================================================================
--- trunk/dports/textproc/pdftk/files/patch-Makefile.OSX-10.6.diff (rev 0)
+++ trunk/dports/textproc/pdftk/files/patch-Makefile.OSX-10.6.diff 2010-10-14 01:10:18 UTC (rev 72412)
@@ -0,0 +1,32 @@
+--- pdftk/Makefile.OSX-10.6.orig 2010-09-30 15:41:52.000000000 -0500
++++ pdftk/Makefile.OSX-10.6 2010-10-13 05:29:58.000000000 -0500
+@@ -28,13 +28,13 @@
+
+ # tools
+ # need direct path to libgcj for gcjh (starting in gcj 4.1.2 per Aurélien GÉRÔME)
+-TOOLPATH=/sw/lib/gcc4.5/bin/
++TOOLPATH=@PREFIX@/bin/
+ export VERSUFF=-fsf-4.5
+ export CXX= $(TOOLPATH)g++$(VERSUFF)
+ export GCJ= $(TOOLPATH)gcj$(VERSUFF)
+ export GCJH= $(TOOLPATH)gcjh$(VERSUFF)
+ export GJAR= $(TOOLPATH)gjar$(VERSUFF)
+-export LIBGCJ= /sw/lib/gcc4.5/share/java/libgcj-4.5.0.jar
++export LIBGCJ= @PREFIX@/share/java/libgcj-$(shell $(GCJ) -dumpversion).jar
+ export AR= ar
+ export RM= rm
+ export ARFLAGS= rs
+@@ -71,11 +71,10 @@
+ # only effects libraries following option on the command line
+ #
+ #
+-export MACOSX_DEPLOYMENT_TARGET= 10.4
+-export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -mmacosx-version-min=10.4
++export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers
+ export CXXFLAGS= -Wall -Wextra -Weffc++ -O2
+ export GCJFLAGS= -Wall -fsource=1.3 -O2
+ export GCJHFLAGS= -force
+-export LDLIBS= /sw/lib/gcc4.5/lib/libgcj.dylib /sw/lib/gcc4.5/lib/libstdc++.dylib /sw/lib/gcc4.5/lib/libgcc_s.1.dylib -liconv -lz
++export LDLIBS= $(shell $(CXX) -print-file-name=libgcj.dylib) $(shell $(CXX) -print-file-name=libstdc++.dylib) $(shell $(CXX) -print-file-name=libgcc_s.1.dylib) -liconv -lz
+
+ include Makefile.Base
Added: trunk/dports/textproc/pdftk/files/patch-gcj-4.2-and-older.diff
===================================================================
--- trunk/dports/textproc/pdftk/files/patch-gcj-4.2-and-older.diff (rev 0)
+++ trunk/dports/textproc/pdftk/files/patch-gcj-4.2-and-older.diff 2010-10-14 01:10:18 UTC (rev 72412)
@@ -0,0 +1,12 @@
+--- pdftk/Makefile.OSX-10.6.orig 2010-10-13 08:09:52.000000000 -0500
++++ pdftk/Makefile.OSX-10.6 2010-10-13 08:10:48.000000000 -0500
+@@ -35,3 +35,3 @@
+ export GCJH= $(TOOLPATH)gcjh$(VERSUFF)
+-export GJAR= $(TOOLPATH)gjar$(VERSUFF)
++export GJAR= $(TOOLPATH)fastjar
+ export LIBGCJ= /opt/local/share/java/libgcj-$(shell $(GCJ) -dumpversion).jar
+@@ -75,3 +75,3 @@
+ export CXXFLAGS= -Wall -Wextra -Weffc++ -O2
+-export GCJFLAGS= -Wall -fsource=1.3 -O2
++export GCJFLAGS= -Wall -fno-assert -O2
+ export GCJHFLAGS= -force
Deleted: trunk/dports/textproc/pdftk/files/patch-report.cc.diff
===================================================================
--- trunk/dports/textproc/pdftk/files/patch-report.cc.diff 2010-10-14 00:47:26 UTC (rev 72411)
+++ trunk/dports/textproc/pdftk/files/patch-report.cc.diff 2010-10-14 01:10:18 UTC (rev 72412)
@@ -1,11 +0,0 @@
---- a/pdftk/report.cc
-+++ b/pdftk/report.cc
-@@ -1233,7 +1233,7 @@
- string_to_jcharstring( jvs, jvs_size, &jvs_len, it->second );
-
- info_p->put( new itext::PdfName( JvNewStringLatin1(it->first.c_str()) ),
-- new itext::PdfString( JvNewString(jvs, jvs_len), itext::PdfObject::TEXT_UNICODE ) );
-+ new itext::PdfString( JvNewStringUTF((char* )it->second.c_str()), (strcmp(it->first.c_str(), "ModDate") && strcmp(it->first.c_str(), "CreationDate")) ? itext::PdfObject::TEXT_UNICODE : itext::PdfObject::TEXT_PDFDOCENCODING ) );
- }
- }
- }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101013/b669af17/attachment.html>
More information about the macports-changes
mailing list