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

github.setup            nodejs llhttp 9.4.4 release/v
github.tarball_from     archive
revision                0

categories              devel
license                 MIT
homepage                https://llhttp.org
maintainers             {sethm.id.au:dev @McDaMastR} \
                        openmaintainer

description             Port of http_parser to llparse
long_description        {*}${description}.

checksums               rmd160  5832b09229781284789bbf1c77b8961358acf708 \
                        sha256  5600adb1498f82a9c719b8eb19310021737388e0d92362a6d47be532710d3c96 \
                        size    40336

# Upstream rejects the "MacPorts" build type.
cmake.build_type        Release

compiler.c_standard     1999

configure.args-append   -DLLHTTP_BUILD_SHARED_LIBS=ON \
                        -DLLHTTP_BUILD_STATIC_LIBS=OFF

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

    xinstall -d ${destdocdir}
    xinstall -W ${cmake.source_dir} -m 644 \
        LICENSE \
        README.md \
        ${destdocdir}
}
