# -*- 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           muniversal 1.1

name                isl-devel
conflicts           isl
set my_name         isl

# for library name changes, cross-compilers do *not* show up in traditional dependency searches
# (e.g. port file all | sort -u | xargs grep -E ':isl( |$)' | cut -d / -f 13 | sort -u)
# see https://lists.macports.org/pipermail/macports-dev/2019-May/040678.html
epoch               0
version             0.27
revision            0

categories          devel math
license             MIT
maintainers         nomaintainer

description         Integer Set Library
long_description    isl is a library for manipulating sets and \
                    relations of integer points bounded by linear \
                    constraints. Supported operations on sets include \
                    intersection, union, set difference, emptiness \
                    check, convex hull, (integer) affine hull, integer \
                    projection, computing the lexicographic minimum \
                    using parametric integer programming, coalescing \
                    and parametric vertex enumeration. It also \
                    includes an ILP solver based on generalized basis \
                    reduction, transitive closures on maps (which may \
                    encode infinite graphs), dependence analysis and \
                    bounds on piecewise step-polynomials.
homepage            https://libisl.sourceforge.io

depends_lib         port:gmp

master_sites        sourceforge:libisl
distname            ${my_name}-${version}
use_bzip2           yes

checksums           rmd160  95056c9e98142c02a8884873502a6ad644da98e0 \
                    sha256  626335529331f7c89fec493de929e2e92fb3d8cc860fc7af554e0518ee0029ee \
                    size    2417649

platform darwin {
    # Be more strict about detecting C++11 for older compilers
    patchfiles-append   patch-configure_c++11.diff

    # https://trac.macports.org/ticket/65532
    if {${os.major} > 10 && ${os.major} < 18} {
        # cxx17 support on these systems is incomplete when building against libc++
        patchfiles-append   patch-configure-force-cxx17-to-fail.diff
    }

    # ./include/isl/typed_cpp.h:2132:12: error: no matching conversion for functional-style cast from 'const isl::basic_set' to 'isl::typed::basic_set<>'
    compiler.blacklist {clang < 500}
}

configure.args      --disable-silent-rules

triplet.add_build   cross

notes "
Older versions of gcc may not build against ${name}. In such a case consider installing isl port instead.
"

test.run            yes
test.target         check

livecheck.type      regex
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
