# -*- 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
# $Id: Portfile 119944 2014-05-11 16:30:58Z mcalhoun@macports.org $

PortSystem          1.0
PortGroup           muniversal 1.0

name                cloog
conflicts           cloog-devel

version             0.18.1
epoch               1

categories          devel math

maintainers         nomaintainer
platforms           darwin

description         CLooG, the Chunky Loop Generator, generates code for scanning Z-polyhedra

long_description    CLooG is a free software and library to generate code for scanning Z-polyhedra. \
                    That is, it finds a code (e.g. in C, FORTRAN...) that reaches each \
                    integral point of one or more parameterized polyhedra. CLooG has been \
                    originally written to solve the code generation problem for optimizing \
                    compilers based on the polytope model. Nevertheless it is used now in \
                    various area e.g. to build control automata for high-level synthesis \
                    or to find the best polynomial approximation of a function. CLooG may \
                    help in any situation where scanning polyhedra matters. While the user \
                    has full control on generated code quality, CLooG is designed to avoid \
                    control overhead and to produce a very effective code.

license             LGPL-2.1+
homepage            http://repo.or.cz/w/cloog.git
master_sites        http://www.bastoul.net/cloog/pages/download/count.php3?url=./

checksums           rmd160  5c4a182efc0d42e7d5c30e6fcca5832776a2e69a \
                    sha256  02500a4edd14875f94fe84cbeda4290425cb0c1c2474c6f75d75a303d64b4196

depends_lib         port:gmp path:lib/pkgconfig/isl.pc:isl

# prevent -L/lib from being added to LDFLAGS
# see http://groups.google.com/group/isl-development/t/37ad876557e50f2c 
patchfiles          patch-configure.diff

configure.args-append \
                    --with-isl=system \
                    --with-gmp=system \
                    --with-osl=no

variant osl description {build with openscop library (causes tests to fail)} {
    ui_warn "This variant causes tests to fail"
    depends_lib-append port:openscop
    configure.args-replace --with-osl=no --with-osl=system
}

test.run            yes
test.target         check

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