# -*- 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.6
github.tarball_from     archive
revision                0

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  ebec1bd5774a5af813b83a698aafac0986d17369 \
                        sha256  c6de3c486f37c064eeae7d94e74f8dd25328e23effd8409a26a1170c19203ab4 \
                        size    37420

patchfiles              fix-test-url.diff

use_autoreconf          yes

configure.args-append   --enable-shared \
                        --disable-silent-rules \
                        --disable-static

configure.checks.implicit_int \
                        no
# <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}
}
