# -*- 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        uriparser uriparser 0.9.9 uriparser-
revision            0
checksums           rmd160  8a417a6579e40517a577b2cad1c3d2e013238c56 \
                    sha256  027b923c0ce89786d8cf7a842ef77dcfff3a6a097c0e67d241b447d1eae8db4c \
                    size    215434

categories          devel www
maintainers         {ryandesign @ryandesign} openmaintainer
license             BSD

description         a strictly RFC 3986 compliant parsing library for URIs

long_description    ${name} is {*}${description}. \
                    ${name} is cross-platform, fast, and supports Unicode.

homepage            https://uriparser.github.io
github.tarball_from releases
use_bzip2           yes

configure.args      -DURIPARSER_BUILD_DOCS=OFF \
                    -DURIPARSER_BUILD_TESTS=OFF

variant tests description {Enable tests} {
    configure.args-delete   -DURIPARSER_BUILD_TESTS=OFF
    depends_build-append    port:gtest

    # duplicate settings from gtest CMakeLists.txt file
    compiler.cxx_standard   2014
    configure.args-append   -DCMAKE_CXX_STANDARD=14 \
                            -DCMAKE_CXX_STANDARD_REQUIRED=ON

    test.run                yes
    test.target             check
}
