APKBUILD 1.62 KB
Newer Older
Isaac Dunham's avatar
Isaac Dunham committed
1 2 3
# Contributor: Isaac Dunham <ibid.ag@gmail.com>
# Maintainer: Isaac Dunham <ibid.ag@gmail.com>
pkgname=openblas
4
pkgver=0.2.15
5
pkgrel=0
Isaac Dunham's avatar
Isaac Dunham committed
6 7 8 9 10 11
pkgdesc="A fast BSD-licensed BLAS based on gotoBLAS2, with LAPACK"
url="http://www.openblas.net"
arch="all"
license="BSD"
depends=""
depends_dev="gfortran"
12
makedepends="$depends_dev perl linux-headers"
Isaac Dunham's avatar
Isaac Dunham committed
13 14
install=""
subpackages="$pkgname-dev $pkgname-doc"
15
source="$pkgname-$pkgver.tar.gz::http://github.com/xianyi/OpenBLAS/archive/v$pkgver.tar.gz"
Isaac Dunham's avatar
Isaac Dunham committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

_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
}

build() {
	cd "$_builddir"
#USE_OPENMP=0: see GCC bug 60035
#NO_AFFINITY: don't expect to work on musl, also breaks R
#DYNAMIC_ARCH=1 requires 00-cpuid.patch
	make USE_OPENMP=0 NO_LAPACK=0 NUM_THREADS=8 MAJOR_VERSION=3 \
	NO_AFFINITY=1 DYNAMIC_ARCH=1 PREFIX=/usr || return 1
}

package() {
	cd "$_builddir"
	mkdir -pm 0755 "$pkgdir/usr/lib" "$pkgdir/usr/include" \
	"$pkgdir/usr/share/doc/$pkgname" || return 1
	make USE_OPENMP=0 NO_LAPACK=0 NUM_THREADS=2 MAJOR_VERSION=3 \
	NO_AFFINITY=1 DYNAMIC_ARCH=1 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
}
47 48 49
md5sums="b1190f3d3471685f17cfd1ec1d252ac9  openblas-0.2.15.tar.gz"
sha256sums="73c40ace5978282224e5e122a41c8388c5a19e65a6f2329c2b7c0b61bacc9044  openblas-0.2.15.tar.gz"
sha512sums="5b61556a9bd2c622bc31ec7a1b4cbab67740e40c4f0717670b16987d687efdd83d3bd8b2c0b158a8da956ef04665cf9a00b6b1f1619b6353a206a31a5e5d6c9a  openblas-0.2.15.tar.gz"