# -*- 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           boost 1.0
PortGroup           cmake 1.1
PortGroup           compilers 1.0
PortGroup           github 1.0

# Match papilo and scip
boost.version       1.88

github.setup        scipopt soplex 8.0.3 v
revision            0
categories          math
license             Apache-2

maintainers         nomaintainer

description         Sequential object-oriented simPlex
long_description    SoPlex is an optimization package for solving linear programming problems (LPs) \
                    based on an advanced implementation of the primal and dual revised simplex algorithm.

homepage            https://soplex.zib.de

checksums           rmd160  9fcba929e0d3ffc6ad0ae57b2566eddd3b78c9ae \
                    sha256  224eca4c49a2509a2a893a1d4b63e510e2ddb4ff374699cc6afc36f12af4e621 \
                    size    1230157

github.tarball_from archive

compilers.setup     require_fortran

compiler.thread_local_storage yes

compiler.cxx_standard 2014

# error: "This library now requires a C++11 or later compiler - this message was generated as a result of BOOST_NO_CXX11_HDR_TYPE_TRAITS being set"
compiler.blacklist-append {clang < 800}

depends_lib-append  port:gmp \
                    port:mpfr \
                    port:onetbb \
                    path:lib/libopenblas.dylib:OpenBLAS \
                    port:zlib

configure.args      -DGMP=ON \
                    -DQUADMATH=OFF

if {[string match *gcc* ${configure.compiler}]} {
    # ___atomic_fetch_add_8
    configure.ldflags-append \
                    -latomic
}

test.run            yes
