# -*- 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           github 1.0
PortGroup           legacysupport 1.1
PortGroup           compiler_blacklist_versions 1.0

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

github.setup        Singular Singular 4-4-0 Release-
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                singular
revision            0
version             [string map {- .} ${github.version}]
categories          math
maintainers         nomaintainer
license             {GPL-2 GPL-3}
description         the Singular computer algebra system
long_description \
    Singular is a computer algebra system for polynomial computations, with \
    special emphasis on commutative and non-commutative algebra, algebraic \
    geometry, and singularity theory.
homepage            https://www.singular.uni-kl.de/

checksums           rmd160  83126d27a2953ac7d9db7b913b731af5ebe3975a \
                    sha256  260d9a25aecfe9971186b6fcfe6cdbe2a1f63af7915d452066323c9434f39e13 \
                    size    13796887

# clang: error: unknown argument: '-fno-delete-null-pointer-checks'
# https://trac.macports.org/ticket/65804
compiler.blacklist-append {clang < 700} *gcc-4.*

depends_build-append \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib-append  port:cddlib \
                    port:flint \
                    port:gmp \
                    port:mpfr \
                    port:ncurses \
                    port:ntl \
                    port:readline

configure.cmd       ./autogen.sh && ./configure
configure.args      --enable-gfanlib \
                    --with-ntl=${prefix} \
                    --with-flint=${prefix}

test.run            yes
test.target         check