mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
61 lines
2 KiB
Bash
61 lines
2 KiB
Bash
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
# Contributor: Giuseppe Borzi <gborzi _AT_ ieee _DOT_ org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - set build targets
|
|
# - clear Makefile.arm (bad cflags overrides)
|
|
|
|
pkgname=openblas
|
|
_pkgname=OpenBLAS
|
|
pkgver=0.3.18
|
|
pkgrel=1
|
|
pkgdesc="An optimized BLAS library based on GotoBLAS2 1.13 BSD"
|
|
arch=('x86_64')
|
|
url="https://www.openblas.net/"
|
|
license=('BSD')
|
|
depends=('gcc-libs')
|
|
makedepends=('perl' 'gcc-fortran')
|
|
checkdepends=('cblas')
|
|
provides=('blas=3.9.0')
|
|
conflicts=('blas')
|
|
source=(${_pkgname}-v${pkgver}.tar.gz::https://github.com/xianyi/OpenBLAS/archive/v${pkgver}.tar.gz)
|
|
sha512sums=('df9a14026a61bdc5285636bfd7a52dce244d24fcf4a0c870ef4e58b8b50e412849828ca5aeac2a2435f635e78e60559762e8bae22ea7bc5dff2e865a96d81152')
|
|
|
|
build() {
|
|
cd $_pkgname-$pkgver
|
|
|
|
truncate -s 0 Makefile.arm
|
|
[[ $CARCH == "aarch64" ]] && CONFIG="TARGET=ARMV8"
|
|
[[ $CARCH == "armv7h" ]] && CONFIG="TARGET=ARMV7" && CFLAGS=`echo $CFLAGS | sed -e 's/vfpv3-d16/neon/'` && CXXFLAGS="$CFLAGS"
|
|
[[ $CARCH == "armv6h" ]] && CONFIG="TARGET=ARMV6"
|
|
[[ $CARCH == "arm" ]] && CONFIG="TARGET=ARMV5"
|
|
|
|
make NO_STATIC=1 NO_LAPACK=1 NO_LAPACKE=1 NO_CBLAS=1 NO_AFFINITY=1 USE_OPENMP=1 \
|
|
CFLAGS="$CPPFLAGS $CFLAGS" $CONFIG \
|
|
NUM_THREADS=64 MAJOR_VERSION=3 libs shared
|
|
}
|
|
|
|
check() {
|
|
cd $_pkgname-$pkgver
|
|
# TODO
|
|
#make CFLAGS="$CPPFLAGS $CFLAGS -lcblas" TARGET=CORE2 tests
|
|
}
|
|
|
|
package() {
|
|
cd $_pkgname-$pkgver
|
|
|
|
make PREFIX="$pkgdir"/usr NUM_THREADS=64 MAJOR_VERSION=3 install
|
|
rm -f "$pkgdir"/usr/include/cblas.h "$pkgdir"/usr/include/lapack*
|
|
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
cd "$pkgdir"/usr/lib/
|
|
ln -s libopenblasp-r$pkgver.so libblas.so
|
|
ln -s libopenblasp-r$pkgver.so libblas.so.3
|
|
sed -i -e "s%$pkgdir%%" "$pkgdir"/usr/lib/cmake/openblas/OpenBLASConfig.cmake
|
|
sed -i -e "s%$pkgdir%%" "$pkgdir"/usr/lib/pkgconfig/openblas.pc
|
|
ln -s openblas.pc "$pkgdir"/usr/lib/pkgconfig/blas.pc
|
|
|
|
rmdir "$pkgdir"/usr/bin
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|