# -*- 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 # $Id$ PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup gobject_introspection 1.0 PortGroup muniversal 1.0 name poppler conflicts pdf2json xpdf-tools version 0.48.0 license GPL-2+ maintainers devans openmaintainer categories graphics platforms darwin homepage https://poppler.freedesktop.org/ description Poppler is a PDF rendering library based on the xpdf-3.0 code base. long_description ${description} master_sites ${homepage} use_xz yes checksums rmd160 7541ef7aa43cdb8ac0b45b218f7f9c4eae43b6d9 \ sha256 85a003968074c85d8e13bf320ec47cef647b496b56dcff4c790b34e5482fef93 depends_build port:pkgconfig depends_lib port:bzip2 \ port:curl \ port:expat \ port:fontconfig \ port:freetype \ port:jpeg \ path:lib/pkgconfig/glib-2.0.pc:glib2 \ path:lib/pkgconfig/cairo.pc:cairo \ port:lcms2 \ port:libpng \ port:openjpeg15 \ port:poppler-data \ port:tiff \ port:zlib gobject_introspection yes # Generate newer libtool that passes -stdlib when linking dylibs. use_autoreconf yes autoreconf.args -fvi compiler.blacklist {gcc-4.0 < 5493} configure.args --disable-poppler-qt4 \ --disable-poppler-qt5 \ --disable-gtk-test \ --disable-silent-rules \ --disable-libnss \ --enable-xpdf-headers \ --enable-zlib \ --enable-libcurl patchfiles patch-configure.ac.diff post-patch { # clang: error: unknown argument: '-fno-check-new' # Strip it out rather than --disable-compile-warnings reinplace "s:-fno-check-new::g" ${worksrcpath}/configure.ac } # TODO: # add subport for poppler-qt4-x11 when qt4-x11 builds and port group qt4 allows subport poppler-qt4-mac { PortGroup qt4 1.0 configure.env-append MOCQT4=${qt_bins_dir}/moc configure.args-delete --disable-poppler-qt4 } subport poppler-qt5 { PortGroup qt5 1.0 configure.env-append MOCQT5=${qt_bins_dir}/moc configure.args-delete --disable-poppler-qt5 } if {${subport} ne ${name}} { depends_extract-append port:git depends_lib-append port:poppler post-extract { system -W ${workpath} "${prefix}/bin/git clone --depth=1 http://anongit.freedesktop.org/git/poppler/test" } configure.args-append --disable-cairo-output \ --disable-poppler-glib \ --disable-poppler-cpp \ --disable-utils # currently poppler only provides unit tests for the Qt wrappers test.run yes test.target check post-destroot { foreach dot_h [glob -nocomplain -directory ${destroot}${prefix}/include/poppler *.h] { delete $dot_h } foreach libpoppler [glob -nocomplain ${destroot}${prefix}/lib/libpoppler.*] { delete ${libpoppler} } delete ${destroot}${prefix}/include/poppler/fofi \ ${destroot}${prefix}/include/poppler/goo \ ${destroot}${prefix}/include/poppler/splash \ ${destroot}${prefix}/lib/pkgconfig/poppler-splash.pc \ ${destroot}${prefix}/lib/pkgconfig/poppler.pc } } livecheck.type regex livecheck.url ${homepage}releases.html livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"