aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-12-22 08:23:17 +0000
committerTimo Teräs <timo.teras@iki.fi>2015-12-22 08:23:17 +0000
commitf050f0ec2203e7851925ce0495f99768c65558c0 (patch)
tree7072ff892228780d47bb9fc5591c2cf5e428e050
parentd5c182e6d267c2531c7da6c70843e6404cb6291c (diff)
downloadaports-f050f0ec2203e7851925ce0495f99768c65558c0.tar.bz2
aports-f050f0ec2203e7851925ce0495f99768c65558c0.tar.xz
testing/openblas: fix build on arm
-rw-r--r--testing/openblas/APKBUILD22
1 files changed, 14 insertions, 8 deletions
diff --git a/testing/openblas/APKBUILD b/testing/openblas/APKBUILD
index 51f94b936f..1ca3524e1a 100644
--- a/testing/openblas/APKBUILD
+++ b/testing/openblas/APKBUILD
@@ -25,21 +25,27 @@ prepare() {
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
+FLAGS="USE_OPENMP=0 NO_LAPACK=0 NUM_THREADS=8 MAJOR_VERSION=3 \
+ NO_AFFINITY=1 DYNAMIC_ARCH=$DYNAMIC_ARCH"
+
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
+ 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 USE_OPENMP=0 NO_LAPACK=0 NUM_THREADS=2 MAJOR_VERSION=3 \
- NO_AFFINITY=1 DYNAMIC_ARCH=1 PREFIX="$pkgdir/usr" install || return 1
+ "$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