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

Last change on this file since 72535 was 72535, checked in by raimue@…, 9 years ago

print/pdflib: Fix a libtool issue with +universal, closes #22737

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