# -*- 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 119945 2014-05-11 16:37:46Z mcalhoun@macports.org $

PortSystem          1.0
PortGroup           muniversal 1.0

name                cloog-devel
conflicts           cloog

version             0.18.2
set git_commit      22643c94eba7b010ae4401c347289f4f52b9cd2b

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://repo.or.cz/w/cloog.git/snapshot

distname            ${git_commit}
worksrcdir          cloog

checksums           rmd160  73e2cef4d7904e7bf109ee2d1a3f4d5cf566b37c \
                    sha256  ea6b587d2cb8a19dbb34813b9497b9347f2eb99c3d4eb3a22f377d3c71bcf4ee

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

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

use_autoreconf      yes
autoreconf.args     -fvi

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    md5
livecheck.url     ${master_sites}
livecheck.md5     76cd091b8e2638038429b764b98d6c61
