Ticket #32924: Portfile

File Portfile, 2.4 KB (added by someuser12, 12 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 90339 2012-03-02 20:16:51Z devans@macports.org $
3
4PortSystem 1.0
5PortGroup  muniversal 1.0
6
7name        poppler
8conflicts   mupdf xpdf-tools
9version     0.18.4
10license     GPL-2+
11maintainers devans openmaintainer
12categories  graphics
13platforms   darwin
14homepage    http://${name}.freedesktop.org/
15
16description Poppler is a PDF rendering library based on the xpdf-3.0 code base.
17long_description ${description}
18
19master_sites ${homepage}
20
21checksums   rmd160  1553017e9b260cbd624d43d77fcf410afaa57e4a \
22            sha256  33421148cdc8e043da291dece2cce1cea6220d49a50c00c56d56d6435501d42e
23
24depends_build \
25    port:pkgconfig
26
27depends_lib \
28    port:curl \
29    port:gtk2 \
30    port:lcms \
31    port:openjpeg \
32    port:tiff \
33    port:libpng \
34    port:bzip2 \
35    port:zlib \
36    port:fontconfig \
37    port:freetype \
38    port:expat \
39    port:poppler-data
40
41post-patch {
42    reinplace "s|\$includedir|${prefix}/include|g" \
43        ${worksrcpath}/configure
44    reinplace "s|tests||" \
45        ${worksrcpath}/qt4/Makefile.in
46}
47
48configure.args \
49    --disable-introspection \
50    --disable-poppler-qt4 \
51    --disable-silent-rules \
52    --enable-xpdf-headers \
53    --enable-zlib \
54    --enable-libcurl \
55    --mandir=${prefix}/share/man
56
57variant quartz {
58    configure.args-append --disable-gtk-test --without-x
59}
60
61if {![variant_isset quartz]} {
62    if {[file exists ${prefix}/lib/pkgconfig/x11.pc]} {
63            configure.args-append --x-includes=${prefix}/include \
64                                  --x-libraries=${prefix}/lib
65    }
66}
67
68variant qt4 description { Support for the QT4 toolkit } {
69    configure.args-delete --disable-poppler-qt4
70    if ([variant_isset quartz]) {
71        PortGroup qt4 1.0
72    } else {
73        depends_lib-append  port:qt4-x11
74        set qt_dir ${prefix}/libexec/qt4-x11
75        configure.env-append  QTDIR=${qt_dir}
76        set env(PATH) "${qt_dir}/bin:$env(PATH)"
77        configure.pkg_config_path ${qt_dir}/lib/pkgconfig
78    }
79}
80
81variant docs conflicts universal description {Build gtk-doc documentation} {
82    depends_build-append   port:gtk-doc
83    configure.args-append  --enable-gtk-doc
84}
85
86test.run    yes
87test.dir    ${worksrcpath}/test
88test.target all
89
90livecheck.type  regex
91livecheck.url   ${master_sites}
92livecheck.regex ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)${extract.suffix}