47 lines
1.5 KiB
Plaintext
47 lines
1.5 KiB
Plaintext
# Description: Optimized BLAS library
|
|
# URL: http://www.openblas.net/
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
# Packager: Pedja, predivan at mts dot rs
|
|
# Depends on: gcc-fortran
|
|
|
|
name=openblas
|
|
version=0.3.7
|
|
release=1
|
|
source=(https://github.com/xianyi/OpenBLAS/archive/v$version/OpenBLAS-$version.tar.gz)
|
|
|
|
build () {
|
|
cd OpenBLAS-$version
|
|
make NO_LAPACK=0 NO_STATIC=1 \
|
|
USE_OPENMP=1 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 NUM_THREADS=64 \
|
|
CFLAGS="$CFLAGS $CPPFLAGS" libs netlib shared
|
|
make PREFIX=$PKG/usr install
|
|
|
|
# Symlink to provide blas, cblas, lapack and lapacke
|
|
cd $PKG/usr/lib/
|
|
local _lapackver='3.8.0'
|
|
# BLAS
|
|
ln -sf libopenblas.so libblas.so
|
|
ln -sf libopenblas.so libblas.so.${_lapackver:0:1}
|
|
ln -sf libopenblas.so libblas.so.${_lapackver}
|
|
# CBLAS
|
|
ln -sf libopenblas.so libcblas.so
|
|
ln -sf libopenblas.so libcblas.so.${_lapackver:0:1}
|
|
ln -sf libopenblas.so libcblas.so.${_lapackver}
|
|
# LAPACK
|
|
ln -sf libopenblas.so liblapack.so
|
|
ln -sf libopenblas.so liblapack.so.${_lapackver:0:1}
|
|
ln -sf libopenblas.so liblapack.so.${_lapackver}
|
|
# LAPACKE
|
|
ln -sf libopenblas.so liblapacke.so
|
|
ln -sf libopenblas.so liblapacke.so.${_lapackver:0:1}
|
|
ln -sf libopenblas.so liblapacke.so.${_lapackver}
|
|
|
|
# fix paths
|
|
sed -i 's|'$PKG'||g' $PKG/usr/lib/cmake/$name/*.cmake
|
|
sed -i 's|'$PKG'||g' $PKG/usr/lib/pkgconfig/openblas.pc
|
|
|
|
# remove host CPU info if built with DYNAMIC_ARCH=1
|
|
sed -i '/#define OPENBLAS_NEEDBUNDERSCORE/,/#define OPENBLAS_VERSION/{//!d}' \
|
|
$PKG/usr/include/openblas_config.h
|
|
}
|