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

PortSystem          1.0

name                xmlbird
version             1.2.11
license             GPL-3
maintainers         nomaintainer
categories          textproc

platforms           darwin

description         XML parser written in Vala
long_description    ${description}

homepage            https://birdfont.org/${name}.php
master_sites        https://birdfont.org/${name}-releases/

use_xz              yes

distname            lib${name}-${version}

checksums           rmd160  f50b2e5fab7ed709fd200bff947e2a85baa43dee \
                    sha256  20062cf9d890690f0259b969bd25cfb6038d42c312239ed5038c5aeeb77c8bf9 \
                    size    20588

depends_build       port:pkgconfig \
                    port:python38

depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:vala

patchfiles          fix-install-name.patch

post-patch {
    reinplace "s|/usr/bin/python3|${prefix}/bin/python3.8|" \
        configure \
        build.py \
        install.py
}

configure.args      --cc=${configure.cc} \
                    --cflags="${configure.cflags}" \
                    --ldflags="${configure.ldflags}"

build.cmd           ./build.py

destroot.cmd        ./install.py --dest="${destroot}"

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     "lib${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
