# -*- 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        rvarago absent 432fb82052dd066cf72b85dd740a83d59579348c
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version             2020.10.28
revision            0
categories          devel
license             MIT
platforms           any
supported_archs     noarch
maintainers         nomaintainer
description         Small C++17 library meant to simplify the composition of nullable types \
                    in a generic, type-safe and declarative way.
long_description    {*}${description}
checksums           rmd160  b0561e2edcdf65d0819b3e24850c6ee7b8541c09 \
                    sha256  93373d0892ad13bb3f0c6635a468095c3ad7ab5b3fd09de49bd304462d05c59d \
                    size    13972

patch.pre_args-replace  -p0 -p1
patchfiles          0001-Fix-catch2-includes.patch \
                    0002-tests-CMakeLists.txt-require-C-17.patch \
                    0003-Fix-missing-_main-on-macOS.patch

compiler.cxx_standard   2017

configure.args-append \
                    -DBUILD_TESTS=ON

# While absent is header-only library, building and running tests depend on catch2:
depends_build-append \
                    port:catch2
depends_test-append port:catch2

test.run            yes
test.cmd            ctest
