source: trunk/dports/textproc/pdftk/Portfile

Last change on this file was 140766, checked in by ryandesign@…, 2 years ago

pdftk: prevent installation attempt on OS X 10.11 or greater (#48528)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
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 140766 2015-10-02 10:09:17Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    pdftk
7version                 2.02
8categories              textproc graphics pdf
9maintainers             ryandesign
10platforms               darwin
11license                 GPL-2+
12homepage                https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
13master_sites            ${homepage}
14use_zip                 yes
15use_configure           no
16universal_variant       no
17use_parallel_build      no
18
19description \
20    pdftk - PDF Toolkit, for various operations on PDF files
21
22long_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
38checksums               rmd160  4d9e75abc4a966041bd0be7b1db13bb73819d2ae \
39                        sha256  118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1
40
41distname                ${name}-${version}-src
42worksrcdir              ${name}-${version}-dist
43
44depends_lib             port:libiconv \
45                        port:zlib
46
47build.dir               ${worksrcpath}/${name}
48
49patchfiles              patch-Makefile.OSX-10.6.diff
50
51post-patch {
52    reinplace "s|@PREFIX@|${prefix}|g" ${build.dir}/Makefile.OSX-10.6
53}
54
55set versuff ""
56
57pre-build {
58    build.args-append   VERSUFF=${versuff}
59}
60
61build.args-append       -f Makefile.OSX-10.6
62
63destroot {
64    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
65    xinstall -m 755 -W ${destroot.dir} pdftk ${destroot}${prefix}/bin
66    xinstall -m 644 -W ${worksrcpath} changelog.html changelog.txt pdftk.1.html pdftk.1.txt \
67        ${destroot}${prefix}/share/doc/${name}
68    xinstall -m 644 -W ${worksrcpath} pdftk.1 \
69        ${destroot}${prefix}/share/man/man1
70}
71
72variant gcc45 conflicts gcc47 description {Build using gcc45} {
73    configure.compiler  macports-gcc-4.5
74    set versuff         -mp-4.5
75}
76
77variant gcc47 conflicts gcc45 description {Build using gcc47} {
78    configure.compiler  macports-gcc-4.7
79    set versuff         -mp-4.7
80}
81
82if {![variant_isset gcc45] && ![variant_isset gcc47]} {
83    default_variants    +gcc47
84}
85
86platform darwin {
87    pre-fetch {
88        if {${os.major} > 14} {
89            ui_error "${subport} currently does not build on OS X 10.11 or greater."
90            ui_error "See https://trac.macports.org/ticket/48528"
91            return -code error "incompatible OS X version"
92        }
93    }
94}
95
96livecheck.type          regex
97livecheck.url           https://www.pdflabs.com/docs/install-pdftk-on-redhat-or-centos/
98livecheck.regex         ${name}-(\[0-9.\]+)-src${extract.suffix}
Note: See TracBrowser for help on using the repository browser.