community/openblas to 0.3.21-1

closes #1931
This commit is contained in:
Kevin Mihelich 2022-08-08 13:26:39 +00:00
parent 09d1941c6d
commit 24f02f2af6

View file

@ -4,10 +4,11 @@
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org> # ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set build targets # - set build targets
# - clear Makefile.arm (bad cflags overrides) # - clear Makefile.arm (bad cflags overrides)
# - fix library symlinking
pkgname=openblas pkgname=openblas
_pkgname=OpenBLAS _pkgname=OpenBLAS
pkgver=0.3.20 pkgver=0.3.21
pkgrel=1 pkgrel=1
pkgdesc="An optimized BLAS library based on GotoBLAS2 1.13 BSD" pkgdesc="An optimized BLAS library based on GotoBLAS2 1.13 BSD"
arch=('x86_64') arch=('x86_64')
@ -19,14 +20,14 @@ checkdepends=('cblas')
provides=('blas=3.9.0') provides=('blas=3.9.0')
conflicts=('blas') conflicts=('blas')
source=(${_pkgname}-v${pkgver}.tar.gz::https://github.com/xianyi/OpenBLAS/archive/v${pkgver}.tar.gz) source=(${_pkgname}-v${pkgver}.tar.gz::https://github.com/xianyi/OpenBLAS/archive/v${pkgver}.tar.gz)
sha512sums=('0742d40b74b11b781021280fd627fa5798e6856b49f2ba1111a5927aac1a7823bcb8162187555f4cf3a4dd7eadf5b1f2a4685c0b5e189847b2869166d1bc7391') sha512sums=('4625c8e6ccfa9120281fd714d3f6b7c3ba2265470c1be76121d6b25dc3dacb899d26e5d9a417ddc616d23909f1411495aa995ef8d8d6df8511cd5cefbabcb1c5')
build() { build() {
cd $_pkgname-$pkgver cd $_pkgname-$pkgver
truncate -s 0 Makefile.arm truncate -s 0 Makefile.arm
[[ $CARCH == "aarch64" ]] && CONFIG="TARGET=ARMV8" [[ $CARCH == "aarch64" ]] && CONFIG="TARGET=ARMV8"
[[ $CARCH == "armv7h" ]] && CONFIG="TARGET=ARMV7" && CFLAGS=`echo $CFLAGS | sed -e 's/vfpv3-d16/neon/'` && CXXFLAGS="$CFLAGS" [[ $CARCH == "armv7h" ]] && CONFIG="TARGET=ARMV7"
make NO_STATIC=1 NO_LAPACK=1 NO_LAPACKE=1 NO_CBLAS=1 NO_AFFINITY=1 USE_OPENMP=1 \ make NO_STATIC=1 NO_LAPACK=1 NO_LAPACKE=1 NO_CBLAS=1 NO_AFFINITY=1 USE_OPENMP=1 \
CFLAGS="$CPPFLAGS $CFLAGS" $CONFIG \ CFLAGS="$CPPFLAGS $CFLAGS" $CONFIG \
@ -47,8 +48,8 @@ package() {
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
cd "$pkgdir"/usr/lib/ cd "$pkgdir"/usr/lib/
ln -s libopenblasp-r$pkgver.so libblas.so ln -s $(readlink "libopenblas.so.3") libblas.so
ln -s libopenblasp-r$pkgver.so libblas.so.3 ln -s $(readlink "libopenblas.so.3") libblas.so.3
sed -i -e "s%$pkgdir%%" "$pkgdir"/usr/lib/cmake/openblas/OpenBLASConfig.cmake sed -i -e "s%$pkgdir%%" "$pkgdir"/usr/lib/cmake/openblas/OpenBLASConfig.cmake
sed -i -e "s%$pkgdir%%" "$pkgdir"/usr/lib/pkgconfig/openblas.pc sed -i -e "s%$pkgdir%%" "$pkgdir"/usr/lib/pkgconfig/openblas.pc
ln -s openblas.pc "$pkgdir"/usr/lib/pkgconfig/blas.pc ln -s openblas.pc "$pkgdir"/usr/lib/pkgconfig/blas.pc