# -*- 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.15
license             GPL-3
maintainers         nomaintainer
categories          textproc

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  6194fc2d5e165fce638896f8360d3178b1fa7ad9 \
                    sha256  f065f88a317e031686185952c513ce02851ecd11bae7dda33ab89fcff9964d13 \
                    size    20668

depends_build       port:pkgconfig \
                    port:python314 \
                    path:bin/vala:vala

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

patchfiles          fix-install-name.patch

post-patch {
    reinplace "s|/usr/bin/python3|${prefix}/bin/python3.14|" \
        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}"
