# Contributor: Isaac Dunham # Maintainer: Isaac Dunham pkgname=openblas pkgver=0.2.15 pkgrel=1 pkgdesc="A fast BSD-licensed BLAS based on gotoBLAS2, with LAPACK" url="http://www.openblas.net" arch="all" license="BSD" depends="" depends_dev="gfortran" makedepends="$depends_dev perl linux-headers" install="" subpackages="$pkgname-dev $pkgname-doc" source="$pkgname-$pkgver.tar.gz::http://github.com/xianyi/OpenBLAS/archive/v$pkgver.tar.gz" _builddir="$srcdir"/OpenBLAS-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } # DYNAMIC_ARCH: supported on x86* only, see https://github.com/xianyi/OpenBLAS/issues/709 case "$CARCH" in x86 | x86_64) DYNAMIC_ARCH=1 ;; *) DYNAMIC_ARCH=0 ;; esac # USE_OPENMP=0: see GCC bug 60035 # NO_AFFINITY: don't expect to work on musl, also breaks R # NUM_THREADS=32: match CONFIG_NR_CPUS FLAGS="USE_OPENMP=0 NO_LAPACK=0 NUM_THREADS=32 MAJOR_VERSION=3 \ NO_AFFINITY=1 DYNAMIC_ARCH=$DYNAMIC_ARCH" build() { cd "$_builddir" make $FLAGS PREFIX=/usr || return 1 } package() { cd "$_builddir" mkdir -pm 0755 "$pkgdir/usr/lib" "$pkgdir/usr/include" \ "$pkgdir/usr/share/doc/$pkgname" || return 1 make $FLAGS PREFIX="$pkgdir/usr" install || return 1 for FILE in *.txt *.md LICENSE; do install -m 0644 $FILE "$pkgdir/usr/share/doc/$pkgname" || return 1 done } md5sums="b1190f3d3471685f17cfd1ec1d252ac9 openblas-0.2.15.tar.gz" sha256sums="73c40ace5978282224e5e122a41c8388c5a19e65a6f2329c2b7c0b61bacc9044 openblas-0.2.15.tar.gz" sha512sums="5b61556a9bd2c622bc31ec7a1b4cbab67740e40c4f0717670b16987d687efdd83d3bd8b2c0b158a8da956ef04665cf9a00b6b1f1619b6353a206a31a5e5d6c9a openblas-0.2.15.tar.gz"