source: trunk/dports/print/pdflib/Portfile @ 79512

Last change on this file since 79512 was 79512, checked in by mcalhoun@…, 8 years ago

pdflib: Add support for Python 2.7.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.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 79512 2011-06-16 04:49:09Z mcalhoun@macports.org $
3
4PortSystem 1.0
5
6name                    pdflib
7version                 7.0.5
8revision                1
9categories              print
10platforms               darwin
11maintainers             nomaintainer
12use_parallel_build      yes
13description                     PDFlib Lite (Source Code) is a subset of PDFlib
14long_description        \
15    ${description},     a library of C routines that allow to programmatically\
16    generate PDF, the Adobe's Portable Document File format.
17
18homepage                http://www.pdflib.com/download/free-software/pdflib-lite-7/
19master_sites    http://www.pdflib.com/binaries/PDFlib/[string map {"." ""} [strsed ${version} s/\[^0-9.\].*$//]]/
20distname                PDFlib-Lite-${version}
21
22checksums           md5     34a1cc89e2cfdc1e43ba57019e442a90 \
23                    sha1    5b2bf5edc49dba3da0997ade0e191511a37fae01 \
24                    rmd160  7f3862e70e2f74cf3143ea61e051c30e518ab2eb
25
26patchfiles              \
27    patch-perl_Makefile.diff \
28    patch-libtool.diff
29
30test.run        yes
31
32configure.args  --without-java --without-perl --without-py --without-tcl --without-ruby
33configure.ccache        no
34
35# The existence of tiff header files interferes with PDFLib (#11789).
36configure.cppflags-delete -I${prefix}/include
37configure.cppflags-append -isystem${prefix}/include
38
39post-patch {
40        reinplace "s/PYTHONLIBDIR=`cat << EOF | python/PYTHONLIBDIR=`cat << EOF | \$PYTHONBIN/g" \
41        ${worksrcpath}/configure
42}
43
44post-destroot {
45        xinstall -m 755 -d ${destroot}${prefix}/share/doc/
46        file copy ${worksrcpath}/doc/pdflib ${destroot}${prefix}/share/doc/${name}
47}
48
49variant java description {Enable Java language binding} {
50        configure.args-delete   --without-java
51        configure.args-append   --with-java=yes
52}
53
54variant perl description {Enable Perl language binding} {
55        depends_lib                             path:bin/perl:perl5
56        configure.args-delete   --without-perl
57        configure.args-append   --with-perl=${prefix}/bin/perl
58}
59
60variant python24 description {Enable Python language binding using version 2.4} conflicts python25 python26 {
61        set pyversion           2.4
62        depends_lib-append                      port:python[strsed ${pyversion} {g/[.]//}]
63        configure.args-delete   --without-py
64        configure.args-append   --with-py=${prefix} --with-pyincl=${prefix}/include/python${pyversion}
65        configure.env-append    PYTHONBIN=${prefix}/bin/python${pyversion}
66   
67        post-destroot {
68                # ${frameworks_dir}/Python.framework/Versions/2.4/lib/python2.4/ is a link, which MacPorts can not install into
69                xinstall -d -m 755 ${destroot}${prefix}/lib/python2.4/
70                foreach file [ glob ${destroot}${frameworks_dir}/Python.framework/Versions/2.4/lib/python2.4/* ] {
71                        file rename ${file} ${destroot}${prefix}/lib/python2.4/
72                }
73        }
74}
75
76variant python25 description {Enable Python language binding using version 2.5} conflicts python24 python26 python27 {
77        set pyversion           2.5
78        depends_lib-append                      port:python[strsed ${pyversion} {g/[.]//}]
79        configure.args-delete   --without-py
80        configure.args-append   --with-py=${prefix} --with-pyincl=${prefix}/include/python${pyversion}
81        configure.env-append    PYTHONBIN=${prefix}/bin/python${pyversion}
82   
83        post-destroot {
84                # ${frameworks_dir}/Python.framework/Versions/2.5/lib/python2.5/ is a link, which MacPorts can not install into
85                xinstall -d -m 755 ${destroot}${prefix}/lib/python2.5/
86                foreach file [ glob ${destroot}${frameworks_dir}/Python.framework/Versions/2.5/lib/python2.5/* ] {
87                        file rename ${file} ${destroot}${prefix}/lib/python2.5/
88                }
89        }
90}
91
92variant python26 description {Enable Python language binding using version 2.6} conflicts python24 python25 python27 {
93        set pyversion           2.6
94        depends_lib-append                      port:python[strsed ${pyversion} {g/[.]//}]
95        configure.args-delete   --without-py
96        configure.args-append \
97        --with-py=${frameworks_dir}/Python.framework/Versions/${pyversion} \
98        --with-pyincl=${frameworks_dir}/Python.framework/Versions/${pyversion}/include/python${pyversion}
99        configure.env-append    PYTHONBIN=${prefix}/bin/python${pyversion}
100}
101
102variant python27 description {Enable Python language binding using version 2.7} conflicts python24 python25 python26 {
103        set pyversion           2.7
104        depends_lib-append                      port:python[strsed ${pyversion} {g/[.]//}]
105        configure.args-delete   --without-py
106        configure.args-append \
107        --with-py=${frameworks_dir}/Python.framework/Versions/${pyversion} \
108        --with-pyincl=${frameworks_dir}/Python.framework/Versions/${pyversion}/include/python${pyversion}
109        configure.env-append    PYTHONBIN=${prefix}/bin/python${pyversion}
110}
111
112variant tcl description {Enable Tcl language binding} {
113        depends_lib-append                      path:bin/tclsh:tcl
114        configure.args-delete   --without-tcl
115        configure.args-append   --with-tcl=${prefix}/bin/tclsh
116}
117
118variant ruby description {Enable Ruby language binding} {
119        depends_lib-append                      port:ruby
120        pre-configure {
121        set rubyIncl [file dirname [glob ${prefix}/lib/ruby/*/*/ruby.h]]
122        configure.args-delete   --without-ruby
123        configure.args-append   --with-ruby=${prefix} --with-rubyincl=${rubyIncl}
124        }
125}
126
127if {[variant_isset universal]} {
128    depends_build-append port:libtool
129    post-configure {
130        file copy -force ${prefix}/bin/glibtool ${worksrcpath}/libtool
131    }
132}
133
134livecheck.type      regex
135livecheck.regex     {PDFlib-Lite-([0-9.p]+)\.tar}
Note: See TracBrowser for help on using the repository browser.