# -*- 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-cb
version             0.1.8
categories          office
maintainers         nomaintainer
license             zlib

description         The zathura-cb plugin adds comic book support to zathura.
long_description \
    The zathura-cb plugin adds comic book support to zathura by using the \
    libarchive library.

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

checksums           rmd160  87665dc08753a5577baea6f2fbe30dead4068aa1 \
                    sha256  67206011fc375cd2f3d0bc0d7a36b182c10eb3c41961963910992393c34aa5d5 \
                    size    6084

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

depends_lib         port:desktop-file-utils \
                    port:libarchive \
                    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-cb-(\[0-9.\]+)[quotemeta ${extract.suffix}]