# -*- 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    gulrak filesystem 1.5.14 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
checksums       rmd160  56d0605dbb9cab04999e033547e801a87463d104 \
                sha256  3b28457a844b006d2dbc415c201b1fa74601f3b6c6ba5cb4bf4c16b6889f739d \
                size    211180
revision        0

name            ghc-filesystem
categories      devel
platforms       any
supported_archs noarch
maintainers     nomaintainer
license         MIT
description     An implementation of C++17 std::filesystem.
long_description \
    An implementation of C++17 std::filesystem for \
    C++11/C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.

compiler.cxx_standard   2011

# Prevent MacPorts headers from being used. They're not needed since
# filesystem has no dependencies, and if a different version of googletest
# was already installed, its headers could cause the build to fail.
configure.cppflags-delete -I${prefix}/include
compiler.cpath

configure.args-append \
    -DGHC_FILESYSTEM_BUILD_EXAMPLES=OFF \
    -DGHC_FILESYSTEM_BUILD_TESTING=OFF

variant tests description "enable testing" {
    test.run    yes
    test.target test
    configure.args-replace \
        -DGHC_FILESYSTEM_BUILD_TESTING=OFF \
        -DGHC_FILESYSTEM_BUILD_TESTING=ON
}
