1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 114325 2013-12-05 09:20:31Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name pdftk |
---|
7 | version 1.44 |
---|
8 | categories textproc graphics pdf |
---|
9 | maintainers ryandesign |
---|
10 | platforms darwin |
---|
11 | license GPL-2+ |
---|
12 | homepage http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ |
---|
13 | master_sites ${homepage} |
---|
14 | use_zip yes |
---|
15 | use_configure no |
---|
16 | universal_variant no |
---|
17 | use_parallel_build no |
---|
18 | |
---|
19 | description \ |
---|
20 | pdftk - PDF Toolkit, for various operations on PDF files |
---|
21 | |
---|
22 | long_description \ |
---|
23 | pdftk is a simple tool for doing everyday things with PDF documents: \ |
---|
24 | Merge PDF Documents \ |
---|
25 | Split PDF Pages into a New Document \ |
---|
26 | Decrypt Input as Necessary (Password Required) \ |
---|
27 | Encrypt Output as Desired \ |
---|
28 | Fill PDF Forms with FDF Data and/or Flatten Forms \ |
---|
29 | Apply a Background Watermark \ |
---|
30 | Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels \ |
---|
31 | Update PDF Metadata \ |
---|
32 | Attach Files to PDF Pages or the PDF Document \ |
---|
33 | Unpack PDF Attachments \ |
---|
34 | Burst a PDF Document into Single Pages \ |
---|
35 | Uncompress and Re-Compress Page Streams \ |
---|
36 | Repair Corrupted PDF (Where Possible) |
---|
37 | |
---|
38 | checksums sha1 7cb137dcba885caff32ff96b7e11c9dc4ce2cba7 \ |
---|
39 | rmd160 cacd286759005f002f5a46c0af28d3a1aaad73eb |
---|
40 | |
---|
41 | distname ${name}-${version}-src |
---|
42 | worksrcdir ${name}-${version}-dist |
---|
43 | |
---|
44 | depends_lib \ |
---|
45 | port:libiconv |
---|
46 | |
---|
47 | build.dir ${worksrcpath}/${name} |
---|
48 | |
---|
49 | patchfiles patch-Makefile.OSX-10.6.diff |
---|
50 | |
---|
51 | post-patch { |
---|
52 | reinplace "s|@PREFIX@|${prefix}|g" ${build.dir}/Makefile.OSX-10.6 |
---|
53 | } |
---|
54 | |
---|
55 | set versuff "" |
---|
56 | |
---|
57 | pre-configure { |
---|
58 | if {![file exists ${prefix}/bin/gcj${versuff}]} { |
---|
59 | return -code error " |
---|
60 | |
---|
61 | Cannot build ${name} because ${prefix}/bin/gcj${versuff} |
---|
62 | is missing, possibly because of this gcc bug: |
---|
63 | |
---|
64 | http://trac.macports.org/ticket/13553 |
---|
65 | " |
---|
66 | } |
---|
67 | } |
---|
68 | |
---|
69 | pre-build { |
---|
70 | build.args-append VERSUFF=${versuff} |
---|
71 | } |
---|
72 | |
---|
73 | build.args-append -f Makefile.OSX-10.6 |
---|
74 | |
---|
75 | destroot { |
---|
76 | xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} |
---|
77 | xinstall -m 755 -W ${destroot.dir} pdftk ${destroot}${prefix}/bin |
---|
78 | xinstall -m 644 -W ${worksrcpath} changelog.html changelog.txt pdftk.1.html pdftk.1.txt \ |
---|
79 | ${destroot}${prefix}/share/doc/${name} |
---|
80 | xinstall -m 644 -W ${worksrcpath} pdftk.1 \ |
---|
81 | ${destroot}${prefix}/share/man/man1 |
---|
82 | } |
---|
83 | |
---|
84 | variant gcc42 conflicts gcc45 gcc47 gcc49 description {Build using gcc42} { |
---|
85 | patchfiles-append patch-gcj-4.2-and-older.diff |
---|
86 | configure.compiler macports-gcc-4.2 |
---|
87 | depends_build-append port:fastjar |
---|
88 | set versuff -mp-4.2 |
---|
89 | } |
---|
90 | |
---|
91 | variant gcc45 conflicts gcc42 gcc47 gcc49 description {Build using gcc45} { |
---|
92 | configure.compiler macports-gcc-4.5 |
---|
93 | set versuff -mp-4.5 |
---|
94 | } |
---|
95 | |
---|
96 | variant gcc47 conflicts gcc42 gcc45 gcc49 description {Build using gcc47} { |
---|
97 | configure.compiler macports-gcc-4.7 |
---|
98 | set versuff -mp-4.7 |
---|
99 | } |
---|
100 | |
---|
101 | variant gcc49 conflicts gcc42 gcc45 gcc47 description {Build using gcc49} { |
---|
102 | configure.compiler macports-gcc-4.9 |
---|
103 | set versuff -mp-4.9 |
---|
104 | } |
---|
105 | |
---|
106 | if {![variant_isset gcc42] && ![variant_isset gcc45] && ![variant_isset gcc47]} { |
---|
107 | if {${os.platform} eq "darwin"} { |
---|
108 | if {${os.major} < 10} { |
---|
109 | default_variants +gcc42 |
---|
110 | } elseif {${os.major} < 11} { |
---|
111 | default_variants +gcc45 |
---|
112 | } else { |
---|
113 | default_variants +gcc47 |
---|
114 | } |
---|
115 | } else { |
---|
116 | default_variants +gcc49 |
---|
117 | } |
---|
118 | } |
---|
119 | |
---|
120 | livecheck.type regex |
---|
121 | livecheck.regex ${name}-(\[0-9.\]+)-src${extract.suffix} |
---|