# -*- 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           compiler_blacklist_versions 1.0
PortGroup           meson 1.0

name                zathura-plugin-ps
version             0.2.6
categories          office
maintainers         nomaintainer
license             zlib

description         The zathura-ps plugin adds PostScript support to zathura.
long_description \
    The zathura-ps plugin adds PostScript support to zathura by using the \
    libspectre library.

homepage            https://git.pwmt.org/pwmt/zathura-ps
master_sites        ${homepage}/-/archive/${version}
distname            zathura-ps-${version}

checksums           rmd160  678ade07202dd92b16c1f58da384ae96182014e5 \
                    sha256  08c1927bfb8a40e201fa3638f9523d4b6d70e3444ef070bd4aa8a869b6574567 \
                    size    4710

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib         port:desktop-file-utils \
                    port:libspectre \
                    path:lib/libgirara-gtk3.dylib:girara \
                    path:bin/zathura:zathura

# blacklist compilers that don't support -std=c11
compiler.blacklist  *gcc* {clang < 300}

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}

livecheck.type      regex
livecheck.url       ${homepage}/tags
livecheck.regex     zathura-ps-(\[0-9.\]+)[quotemeta ${extract.suffix}]