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

PortSystem          1.0
PortGroup           github 1.0

github.setup        chokkan liblbfgs 1.10 v
categories          math
maintainers         nomaintainer

description         A library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS)
long_description    libLBFGS is a C port of the implementation of Limited-memory \
                    Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) method written by \
                    Jorge Nocedal.

homepage            http://www.chokkan.org/software/liblbfgs/
platforms           darwin
license             MIT

checksums           rmd160  3fc1f7e7f3b46100a1ca856a082b5975ab4ceda2 \
                    sha256  ba6d8ef191c34c289f34645462ecfb8209099ad88a7a45788004841776de0a9f

depends_build       port:libtool  \
                    port:autoconf \
                    port:automake

patchfiles          patch-autogen.sh.diff

pre-configure {
    system -W ${worksrcpath} "./autogen.sh"
}

platform i386 {
    variant sse2 description {Enable SSE2} {
        configure.args-append  --enable-sse2
    }

    default_variants    +sse2
}