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

github.setup            bakulf libnxml 0.18.5
github.tarball_from     archive

categories              textproc devel
license                 LGPL-2.1+
maintainers             {sethm.id.au:dev @McDaMastR} \
                        openmaintainer

description             Small library for parsing XML
long_description        nXML is a C library for parsing, writing, and creating \
                        XML 1.0 and 1.1 files or streams.  It supports UTF-8, \
                        UTF-16be and UTF-16le, UCS-4 (1234, 4321, 2143, 2312).

depends_lib-append      port:curl

checksums               rmd160  58d2e5c3ec17fc19051b1622a825f84b886f8286 \
                        sha256  263d6424db3cd5f17a9f6300594548e82449ed22af59e9e5534646fa0dabd6a7 \
                        size    37357

patchfiles              fix-test-url.diff

use_autoreconf          yes

# <https://trac.macports.org/wiki/WimplicitFunctionDeclaration>
configure.checks.implicit_function_declaration.whitelist-append \
                        alignof

test.run                yes
test.target             check

post-destroot {
    set destdocdir  ${destroot}${prefix}/share/doc/${name}

    xinstall -d ${destdocdir}
    xinstall -m 644 \
        ${worksrcpath}/AUTHORS \
        ${worksrcpath}/COPYING \
        ${worksrcpath}/ChangeLog \
        ${worksrcpath}/README \
        ${destdocdir}
}
