# -*- 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           wxWidgets 1.0
PortGroup           legacysupport 1.1

github.setup        vslavik diff-pdf 0.5.2 v
github.tarball_from releases
revision            1

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

# This is only needed for wrappers.
legacysupport.newest_darwin_requires_legacy 0
# 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
platforms           darwin
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

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

depends_build       port:pkgconfig

use_autoconf        yes

configure.args      --with-wxdir=${wxWidgets.wxdir}
