# -*- 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 108074 2013-07-12 15:57:42Z jeremyhu@macports.org $

PortSystem          1.0
PortGroup           muniversal 1.0

name                isl
version             0.12
epoch               1
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             LGPL-2.1
homepage            http://www.kotnet.org/~skimo/isl/
master_sites        ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/isl/ \
                    http://www.kotnet.org/~skimo/isl/

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

checksums           rmd160  90363b2ec1eaeb364da396f4e848ce78b760d3e9 \
                    sha256  11079ec95f9375d4e069735029e031d310baca8e15f18ef94d17676a6ca02410

depends_lib         port:gmp

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}
