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

name                libmetalink
version             0.1.3
categories          net devel
maintainers         nomaintainer
license             MIT

description         ${name} is a library for reading Metalink XML download description files.

long_description    ${description} It is intended to help developers of C programs add \
                    Metalink functionality.

homepage            https://launchpad.net/${name}
master_sites        ${homepage}/trunk/${name}-${version}/+download/
use_xz              yes

checksums           rmd160  445dbdbd3b649ccba12caa3fc2d1c566d863267e \
                    sha256  86312620c5b64c694b91f9cc355eabbd358fa92195b3e99517504076bf9fe33a \
                    size    278592

depends_lib-append  port:expat

configure.args-append \
                    --with-libexpat \
                    --without-libxml2 \
                    --disable-xmltest

# Making a variant for this until ticket #38208 is resolved.
variant test description {Build unit tests} {
    depends_build-append \
                    port:pkgconfig \
                    port:cunit
    configure.env-append \
                    PKG_CONFIG=${prefix}/bin/pkg-config
    configure.args-delete \
                    --disable-xmltest
    configure.args-append \
                    --enable-maintainer-mode \
                    --enable-xmltest
    test.run        yes
    test.target-append \
                    check
}

livecheck.type      regex
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
