# -*- 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$

PortSystem          1.0

name                gecode
version             4.4.0
revision            1
categories          devel math
platforms           darwin
maintainers         gmail.com:l.digaspero openmaintainer
license             MIT

description         Generic Constraint Development Environment

long_description    Gecode is a toolkit for developing constraint-based systems and applications.\
                    Gecode provides a constraint solver with state-of-the-art \
                    performance while being modular and extensible.

homepage            http://www.gecode.org/
master_sites        ${homepage}download/
use_7z              yes

checksums           rmd160  db3a1fa2a49c2717b14190e4b40b401af7d9700e \
                    sha256  c3da433cf1de57e1a5b7a62a1206d13788583a20c20ca4a831d1a05254f00d50

depends_build       port:boost

configure.args      --disable-doc-dot \
                    --disable-examples \
                    --disable-qt \
                    --with-boost-include=${prefix}/include/boost

variant qt4 conflicts qt5 description {Add QT 4 support} {
    depends_lib-append      port:qt4-mac
    configure.args-replace  --disable-qt --enable-qt
    configure.env    	    PATH=$env(PATH):${prefix}/libexec/qt4-mac/bin
    build.env		    PATH=$env(PATH):${prefix}/libexec/qt4-mac/bin
}

variant qt5 conflicts qt4 description {Add QT 5 support} {
    depends_lib-append      port:qt5
    configure.args-replace  --disable-qt --enable-qt
    configure.env    	    PATH=$env(PATH):${prefix}/libexec/qt5/bin
    build.env		    PATH=$env(PATH):${prefix}/libexec/qt5/bin
}

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