| 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 | |
|---|
| 4 | PortSystem 1.0 |
|---|
| 5 | PortGroup muniversal 1.0 |
|---|
| 6 | |
|---|
| 7 | name poppler |
|---|
| 8 | conflicts mupdf xpdf-tools |
|---|
| 9 | version 0.18.4 |
|---|
| 10 | license GPL-2+ |
|---|
| 11 | maintainers devans openmaintainer |
|---|
| 12 | categories graphics |
|---|
| 13 | platforms darwin |
|---|
| 14 | homepage http://${name}.freedesktop.org/ |
|---|
| 15 | |
|---|
| 16 | description Poppler is a PDF rendering library based on the xpdf-3.0 code base. |
|---|
| 17 | long_description ${description} |
|---|
| 18 | |
|---|
| 19 | master_sites ${homepage} |
|---|
| 20 | |
|---|
| 21 | checksums rmd160 1553017e9b260cbd624d43d77fcf410afaa57e4a \ |
|---|
| 22 | sha256 33421148cdc8e043da291dece2cce1cea6220d49a50c00c56d56d6435501d42e |
|---|
| 23 | |
|---|
| 24 | depends_build \ |
|---|
| 25 | port:pkgconfig |
|---|
| 26 | |
|---|
| 27 | depends_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 | |
|---|
| 41 | post-patch { |
|---|
| 42 | reinplace "s|\$includedir|${prefix}/include|g" \ |
|---|
| 43 | ${worksrcpath}/configure |
|---|
| 44 | reinplace "s|tests||" \ |
|---|
| 45 | ${worksrcpath}/qt4/Makefile.in |
|---|
| 46 | } |
|---|
| 47 | |
|---|
| 48 | configure.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 | |
|---|
| 57 | variant quartz { |
|---|
| 58 | configure.args-append --disable-gtk-test --without-x |
|---|
| 59 | } |
|---|
| 60 | |
|---|
| 61 | if {![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 | |
|---|
| 68 | variant 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 | |
|---|
| 81 | variant docs conflicts universal description {Build gtk-doc documentation} { |
|---|
| 82 | depends_build-append port:gtk-doc |
|---|
| 83 | configure.args-append --enable-gtk-doc |
|---|
| 84 | } |
|---|
| 85 | |
|---|
| 86 | test.run yes |
|---|
| 87 | test.dir ${worksrcpath}/test |
|---|
| 88 | test.target all |
|---|
| 89 | |
|---|
| 90 | livecheck.type regex |
|---|
| 91 | livecheck.url ${master_sites} |
|---|
| 92 | livecheck.regex ${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)${extract.suffix} |
|---|