# -*- 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

PortSystem          1.0
PortGroup           github 1.0
PortGroup           legacysupport 1.1
PortGroup           wxWidgets 1.0

github.setup        vslavik diff-pdf 0.5.2 v
revision            2

if {${os.platform} eq "darwin" && ${os.major} > 15} {
    wxWidgets.use   wxWidgets-3.2
} else {
    wxWidgets.use   wxGTK-3.2
}

# wxGTK-3.2 needs legacy-support at least for strnlen
legacysupport.newest_darwin_requires_legacy 10
# diff-pdf(22577) malloc: *** error for object 0x1009034: Non-aligned pointer being freed
legacysupport.redirect_bins diff-pdf

categories          graphics
maintainers         {@pietvo vanoostrum.org:pieter} openmaintainer
installs_libs       no
license             GPL-2+

description         diff-pdf is a tool for visually comparing two PDFs.
long_description \
    It takes two PDF files as arguments. By default, its only output is \
    its return code, which is 0 if there are no differences and 1 if \
    the two PDFs differ. If given the `--output-diff` option, it produces \
    a PDF file with visually highlighted differences. \
    With the `--view` argument it opens a window that lets you view \
    the files' pages and zoom in on details.

homepage            https://vslavik.github.io/diff-pdf

checksums           rmd160  3c43ad55a24b9280cef00b2010470b69f5703099 \
                    sha256  7d018f05e30050a2b49dee137f084584b43aec87c7f5ee9c3bbd14c333cbfd54 \
                    size    141482
github.tarball_from releases

depends_lib         path:lib/libcairo.dylib:cairo \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    path:lib/pkgconfig/poppler.pc:poppler \
                    port:${wxWidgets.port}

compiler.cxx_standard   2011

use_autoconf        yes

depends_build       path:bin/pkg-config:pkgconfig

configure.args-append \
                    --disable-silent-rules \
                    --with-wxdir=${wxWidgets.wxdir}
