# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
PortSystem      1.0

name            yap-devel
conflicts       yap
version         6.0.7
revision        2
categories      lang
license         Artistic-2
maintainers     nomaintainer
platforms       darwin

description YAP Prolog compiler
long_description    \
        YAP is a high-performance Prolog compiler developed at    \
        CRACS/Universidade do Porto and at COPPE Sistemas/UFRJ.   \
        Its Prolog engine is based in the WAM (Warren Abstract    \
        Machine), with several optimizations for better           \
        performance. YAP follows the Edinburgh tradition, and     \
        is largely compatible with the ISO-Prolog standard and    \
        with Quintus and SICStus Prolog.

homepage        http://www.dcc.fc.up.pt/~vsc/yap/

fetch.type      git
git.url         git://yap.dcc.fc.up.pt/yap-6
git.branch      8ee9cc2d492f7b085104798d5a34bd9545a4844b

depends_lib     port:gmp \
                port:readline

worksrcdir      yap-6

configure.args  --with-gmp=${prefix} \
                --with-readline=${prefix}

if {${os.platform} eq "darwin" && ${build_arch} eq "x86_64"} {
    configure.args-append --build=${build_arch}-apple-${os.platform}${os.version}
}

default_variants +java

variant condor {
    configure.args-append --enable-condor
}

variant debug {
    configure.args-append --enable-debug-yap
    configure.args-append --enable-low-level-tracer
}

variant java {
    configure.args-append --with-java=/Library/Java/Home
}

variant tabling {
    configure.args-append --enable-tabling
}

variant threads {
    configure.args-append --enable-threads
    configure.args-append --enable-pthread-locking
    configure.args-append --enable-or-parallelism
}

livecheck.url   ${homepage}downloads.html
livecheck.regex {yap-([0-9.]+)}
