# -*- 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               compilers 1.0
PortGroup               linear_algebra 1.0
PortGroup               muniversal 1.0

name                    oski
version                 1.0.1h
revision                1
categories              devel
maintainers             {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
homepage                https://bebop.cs.berkeley.edu/oski/
master_sites            sourceforge
use_bzip2               yes
license                 BSD

description             a collection of low-level C primitives that provide \
                        automatically tuned computational kernels on sparse matrices

long_description        The Optimized Sparse Kernel Interface (OSKI) Library is \
                        a collection of low-level C primitives that provide \
                        automatically tuned computational kernels on sparse matrices, \
                        for use in solver libraries and applications.

checksums               rmd160  5fef952d604334194df467712a053f60969d7695 \
                        sha256  9748a7e69067efb7d4132adc790a6d0659c7eda1cf948aa3f5fe586d0bdeb65b \
                        size    2538789

# https://trac.macports.org/ticket/70543
compiler.blacklist-append \
                        *gcc-4.0 *gcc-4.2

compilers.setup         require_fortran

# prevent precompiled binaries since the build is "automatically tuned"
archive_sites

# find local copy of lua.h
configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include

use_parallel_build      no

configure.dir           ${workpath}/build-${version}
configure.cmd           ../${worksrcdir}/configure
build.dir               ${configure.dir}
build.target            all benchmarks

test.run                yes
test.target             check

pre-configure {
    xinstall -d -m 0755 ${configure.dir}
    configure.args-append --with-blas="-L${prefix}/lib ${linalglib}"
}

livecheck.regex ${name}-(\\d+(?:\\.\\d+)*\[a-z\])
