[buildout]
extends =
  ../perl/buildout.cfg

parts =
  openblas

[openblas]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.24/OpenBLAS-0.3.24.tar.gz
md5sum = 23599a30e4ce887590957d94896789c8

build-common-options = NO_STATIC=1 USE_OPENMP=1 USE_THREAD=1 DYNAMIC_ARCH=1

# We build for multiple targets with runtime detection of the target CPU but
# you can specify more options with openblas:build-ext-options parameter.
# Example :
# * to specify the oldest model you expect to encounter
#   (see https://github.com/xianyi/OpenBLAS/blob/v0.2.18/TargetList.txt )
#   TARGET=HASWELL
build-ext-options =

# Fortran is required for LAPACK, which is required for matplotlib.
pre-configure = type gfortran

configure-command =
  make ${:build-common-options} ${:build-ext-options}
make-options =
  dummy
make-targets =
  PREFIX="@@LOCATION@@" install
environment =
  PATH={perl:location}/bin:%(PATH)s
