# -*- 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 05bdaad9d8ac44f7f9bfd242457da100bd8a8915
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
version             2021.04.12
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            https://www.chokkan.org/software/liblbfgs
license             MIT

checksums           rmd160  ae1173f48543ac788f11ae5a311d26740ffab413 \
                    sha256  1c5673b0020637b2433b6c6e6cf19dc1f2fddbf15351685ecb0242604348f117 \
                    size    53397

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

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
}
