source: trunk/dports/graphics/poppler/Portfile

Last change on this file was 153986, checked in by devans@…, 9 months ago

poppler: update to version 0.48.0, break ABI with respect to previous version.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
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 153986 2016-10-17 16:06:55Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           compiler_blacklist_versions 1.0
6PortGroup           gobject_introspection 1.0
7PortGroup           muniversal 1.0
8
9name                poppler
10conflicts           pdf2json xpdf-tools
11version             0.48.0
12license             GPL-2+
13maintainers         devans openmaintainer
14categories          graphics
15platforms           darwin
16homepage            https://poppler.freedesktop.org/
17
18description         Poppler is a PDF rendering library based on the xpdf-3.0 code base.
19long_description    ${description}
20
21master_sites        ${homepage}
22
23use_xz              yes
24
25checksums           rmd160  7541ef7aa43cdb8ac0b45b218f7f9c4eae43b6d9 \
26                    sha256  85a003968074c85d8e13bf320ec47cef647b496b56dcff4c790b34e5482fef93
27
28depends_build       port:pkgconfig
29
30depends_lib         port:bzip2 \
31                    port:curl \
32                    port:expat \
33                    port:fontconfig \
34                    port:freetype \
35                    port:jpeg \
36                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
37                    path:lib/pkgconfig/cairo.pc:cairo \
38                    port:lcms2 \
39                    port:libpng \
40                    port:openjpeg15 \
41                    port:poppler-data \
42                    port:tiff \
43                    port:zlib
44
45gobject_introspection yes
46
47# Generate newer libtool that passes -stdlib when linking dylibs.
48use_autoreconf      yes
49autoreconf.args     -fvi
50
51compiler.blacklist  {gcc-4.0 < 5493}
52
53configure.args      --disable-poppler-qt4 \
54                    --disable-poppler-qt5 \
55                    --disable-gtk-test \
56                    --disable-silent-rules \
57                    --disable-libnss \
58                    --enable-xpdf-headers \
59                    --enable-zlib \
60                    --enable-libcurl
61
62patchfiles          patch-configure.ac.diff
63
64post-patch {
65    # clang: error: unknown argument: '-fno-check-new'
66    # Strip it out rather than --disable-compile-warnings
67    reinplace "s:-fno-check-new::g" ${worksrcpath}/configure.ac
68}
69
70# TODO:
71# add subport for poppler-qt4-x11 when qt4-x11 builds and port group qt4 allows
72
73subport poppler-qt4-mac {
74    PortGroup qt4 1.0
75
76    configure.env-append    MOCQT4=${qt_bins_dir}/moc
77    configure.args-delete   --disable-poppler-qt4
78}
79
80subport poppler-qt5 {
81    PortGroup qt5 1.0
82
83    configure.env-append    MOCQT5=${qt_bins_dir}/moc
84    configure.args-delete   --disable-poppler-qt5
85}
86
87if {${subport} ne ${name}} {
88    depends_extract-append  port:git
89
90    depends_lib-append      port:poppler
91
92    post-extract {
93        system -W ${workpath} "${prefix}/bin/git clone --depth=1 http://anongit.freedesktop.org/git/poppler/test"
94    }
95
96    configure.args-append   --disable-cairo-output \
97                            --disable-poppler-glib \
98                            --disable-poppler-cpp \
99                            --disable-utils
100
101# currently poppler only provides unit tests for the Qt wrappers
102
103    test.run    yes
104    test.target check
105
106    post-destroot {
107        foreach dot_h [glob -nocomplain -directory ${destroot}${prefix}/include/poppler *.h] {
108            delete $dot_h
109        }
110        foreach libpoppler [glob -nocomplain ${destroot}${prefix}/lib/libpoppler.*] {
111            delete ${libpoppler}
112        }
113        delete  ${destroot}${prefix}/include/poppler/fofi \
114                ${destroot}${prefix}/include/poppler/goo \
115                ${destroot}${prefix}/include/poppler/splash \
116                ${destroot}${prefix}/lib/pkgconfig/poppler-splash.pc \
117                ${destroot}${prefix}/lib/pkgconfig/poppler.pc
118    }
119}
120
121livecheck.type      regex
122livecheck.url       ${homepage}releases.html
123livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Note: See TracBrowser for help on using the repository browser.