[buildout]
parts =
  libatlas

[lapack-download]
recipe = hexagonit.recipe.download
version = 3.5.0
filename = lapack-${:version}.tgz
url = http://www.netlib.org/lapack/${:filename}
md5sum = b1d3e3e425b2e44a06760ff173104bdf
download-only = true
mode = 0644

[libatlas]
recipe = slapos.recipe.cmmi
version = 3.10.2
url = http://downloads.sourceforge.net/project/math-atlas/Stable/${:version}/atlas${:version}.tar.bz2
md5sum = a4e21f343dec8f22e7415e339f09f6da
# http://stackoverflow.com/questions/14592401/atlas-install-really-need-to-get-past-cpu-throttle-check
# http://sourceforge.net/p/math-atlas/support-requests/886/
patches =
  ${:_profile_base_location_}/skip-throttle-check.patch#17c8471d67c99fac80ace05273ce0817
  ${:_profile_base_location_}/add-rpath.patch#44672b68960a14b3fb4970cd1e76f8fe
patch-options = -p1
configure-command =
  mkdir build
  cd build
  ../configure
configure-options =
  --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
  --with-netlib-lapack-tarfile=${lapack-download:location}/${lapack-download:filename}
  --shared
  -b "$(uname -p | grep -q 64 && echo 64 || echo 32)"
  -Fa alg '-fPIC'
make-options =
  -C build
environment =
  PATH=${gcc-fortran:location}/bin:%(PATH)s
  LD_LIBRARY_PATH=${gcc-fortran:location}/lib:${gcc-fortran:location}/lib64
