# -*- 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 119942 2014-05-11 14:41:50Z mcalhoun@macports.org $

PortSystem          1.0
PortGroup           muniversal 1.0

name                isl
conflicts           isl-devel

# Do not upgrade to 0.13 until cloog is updated (0.18.3?)
#version             0.13
version             0.12.2
epoch               2

categories          devel math

maintainers         mcalhoun openmaintainer
platforms           darwin

description         isl is a library for manipulating sets and relations of integer points bounded by linear constraints.

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.

license             MIT
homepage            http://freecode.com/projects/isl
master_sites        http://isl.gforge.inria.fr

use_bzip2           yes

# See http://groups.google.com/group/isl-development/t/37ad876557e50f2c
patchfiles          patch-ax_create_pkgconfig_info.m4.diff

use_autoreconf      yes
autoreconf.args     -fvi

# version 0.13
#checksums           rmd160  418eeadbc3d82cc49b1eab51242813820b7c82c8 \
#                    sha256  7265fd897b7f9147fde76560f28ed18f2c20e5f5da7f4bd9d0e01f8a713401f1

checksums           rmd160  e8fb6bad4b579865a6a31c160fc21a0c9ad1e7b8 \
                    sha256  f4b3dbee9712850006e44f0db2103441ab3d13b406f77996d1df19ee89d11fb4

depends_lib         port:gmp

test.run            yes
test.target         check

pre-activate {
    # In r92992, cloog switched from installing it's own copy of isl to depending on isl, which means:
    #     *) cloog can't upgrade until isl is installed
    #     *) isl can't be installed until cloog is upgraded
    #
    # The "deactivate hack" forces old versions of cloog to deactivate before installing isl
    # See #34477
    #
    # Legacy port deactivation hack added 2012-05-23
    #
    if { ![catch {set cloog_installed [lindex [registry_active cloog] 0]}] } {
        # cloog is installed and active
        
        set cloog_epoch   [lindex ${cloog_installed} 5]
        
        if { ${cloog_epoch} < 1 } {
            # cloog is sufficiently old to install it's own copy of isl
            # force deactivation
            registry_deactivate_composite cloog "" [list ports_nodepcheck 1]
        }
    }
}

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