# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           boost 1.0
PortGroup           cmake 1.1
PortGroup           github 1.0

github.setup        thliebig CSXCAD f5e47643a28d6efd42cc10b61b848903e6599581
github.tarball_from archive
version             20260207-0.6.3-[string range ${github.version} 0 7]

checksums           rmd160  58617d9251d6b834677f1d0a8539456c25e25ff3 \
                    sha256  45816ea46cc4e9f6cd5e90f2835c04c09d3ce20bc699ae3af9c7bb16d09b88e5 \
                    size    207477
revision            0

platforms           darwin macosx
categories          textproc
license             GPL-3
maintainers         {ra1nb0w @ra1nb0w} openmaintainer

description         ${name} is a C++ library to describe geometrical objects and their \
                    physical or non-physical properties
long_description    {*}${description}

# CSXCAD/CMakeLists.txt says: set(CMAKE_CXX_STANDARD 11)
# However, builds <= 10.11 get CXX-related errors.
# Might be due to advanced constructs imported in VTK include files.
# Therefore, set this port CXX standard to 2017, rather than 2011.

compiler.cxx_standard 2017

# This port should either use mpi PG, or disable MPICH.
patchfiles-append \
    patch-no-mpich.diff

# remove when upstream
patchfiles-append \
    clocale_fix.patch

depends_build-append \
    path:bin/pkg-config:pkgconfig

depends_lib-append \
    port:cgal6 \
    port:fparser \
    port:hdf5 \
    port:tinyxml \
    port:vtk

configure.args-append \
    -DFPARSER_ROOT_DIR=${prefix}
