# -*- 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            greg7mdp parallel-hashmap 1.3.12 v
revision                0
categories              devel
license                 Apache-2
# Do not set is as noarch until this issue is fixed:
# https://trac.macports.org/ticket/69317
# platforms               any
# supported_archs         noarch
maintainers             {@barracuda156 gmail.com:vital.had} openmaintainer
description             A family of header-only, very fast and memory-friendly hashmap and btree containers
long_description        {*}${description}
homepage                https://greg7mdp.github.io/parallel-hashmap
checksums               rmd160  2562cd557a276f73ac823465b4781d6bb2efc9ed \
                        sha256  0cc203144321924cfbfcc401f42d8204c0dd24e2760c7a1c091baa16d9777c08 \
                        size    2047800
github.tarball_from     archive

platform darwin {
    if {${os.major} < 14} {
        # Lion+ (with Xcode 4.1+) have git; earlier need to bring their own.
        # On 10.9 git fetch fails with ssl error.
        depends_build-append    port:git
        git.cmd                 ${prefix}/bin/git
    }
}

compiler.cxx_standard   2011
compiler.thread_local_storage yes

configure.args-append   -DPHMAP_INSTALL=ON \
                        -DPHMAP_BUILD_TESTS=ON \
                        -DPHMAP_BUILD_EXAMPLES=OFF

# https://github.com/greg7mdp/parallel-hashmap/issues/191
configure.cxxflags-append \
                         -I${worksrcpath}

test.run                 yes