* update openblas to 0.3.28-1

This commit is contained in:
Alexander Baldeck 2024-11-19 20:48:06 +01:00
parent 78fe320bb7
commit a721075539
3 changed files with 74 additions and 14 deletions

50
openblas/.SRCINFO Normal file
View File

@ -0,0 +1,50 @@
pkgbase = openblas
pkgdesc = An optimized BLAS library based on GotoBLAS2 1.13 BSD
pkgver = 0.3.28
pkgrel = 1
url = https://www.openblas.net/
arch = x86_64
arch = powerpc64le
arch = powerpc64
arch = powerpc
arch = riscv64
license = BSD
makedepends = git
makedepends = cmake
makedepends = perl
makedepends = gcc-fortran
depends = gcc-libs
source = git+https://github.com/xianyi/OpenBLAS#tag=v0.3.28
sha512sums = 4ccacf6467f7406a538bdefb2ae5a554a9f07cf636449582c1fb49f62ea7e340320ccb48508776c3afddaa57ff9dac492e4d678e41312fb979e9c58f9cf0b353
pkgname = openblas
pkgname = openblas64
pkgdesc = An optimized BLAS library based on GotoBLAS2 1.13 BSD (64-bit integers)
pkgname = blas-openblas
pkgdesc = An optimized BLAS library based on GotoBLAS2 1.13 BSD (Provides BLAS/CBLAS/LAPACK/LAPACKE system-wide)
depends = openblas
provides = blas=3.12.0
provides = cblas=3.12.0
provides = lapack=3.12.0
provides = lapacke=3.12.0
provides = openblas-lapack=0.3.28
conflicts = blas
conflicts = cblas
conflicts = lapack
conflicts = lapacke
conflicts = openblas-lapack
replaces = openblas-lapack
pkgname = blas64-openblas
pkgdesc = An optimized BLAS library based on GotoBLAS2 1.13 BSD (64-bit integers, provides BLAS/CBLAS/LAPACK/LAPACKE system-wide)
depends = openblas64
provides = blas64=3.12.0
provides = cblas64=3.12.0
provides = lapack64=3.12.0
provides = lapacke64=3.12.0
conflicts = blas64
conflicts = cblas64
conflicts = lapack64
conflicts = lapacke64

4
openblas/.nvchecker.toml Normal file
View File

@ -0,0 +1,4 @@
[openblas]
source = "git"
git = "https://github.com/xianyi/OpenBLAS.git"
prefix = "v"

View File

@ -5,39 +5,45 @@
pkgbase=openblas
pkgname=(openblas openblas64 blas-openblas blas64-openblas)
_pkgname=OpenBLAS
pkgver=0.3.27
pkgrel=1.1
pkgver=0.3.28
pkgrel=1
_blasver=3.12.0
pkgdesc="An optimized BLAS library based on GotoBLAS2 1.13 BSD"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://www.openblas.net/"
license=('BSD')
depends=('gcc-libs')
makedepends=('cmake' 'perl' 'gcc-fortran')
source=(${_pkgname}-v${pkgver}.tar.gz::https://github.com/xianyi/OpenBLAS/archive/v${pkgver}.tar.gz)
sha512sums=('4accc5282244946157b7940211181e011940154ff47855702c68f57a0af2fa5a306f49e47b8c22c02eeff61760c6c220465f05a316a33ee3265bfce65ca4cb84')
makedepends=('git' 'cmake' 'perl' 'gcc-fortran')
source=(git+https://github.com/xianyi/OpenBLAS#tag=v$pkgver)
sha512sums=('4ccacf6467f7406a538bdefb2ae5a554a9f07cf636449582c1fb49f62ea7e340320ccb48508776c3afddaa57ff9dac492e4d678e41312fb979e9c58f9cf0b353')
build() {
# Setting FC manually to avoid picking up f95 and breaking the cmake build
# https://github.com/xianyi/OpenBLAS/issues/4072#issuecomment-1576388332
# Setting ASM flags for CET support. Setting FFLAGS for CET support.
# Remove ` -Wformat -Werror=format-security` not supported by gcc-fortran.
case "${CARCH}" in
powerpc) _cmake_options=(-DCORE=GENERIC -DTARGET=PPC440 -DBINARY=32 -DDYNAMIC_ARCH=OFF) ;;
powerpc64) _cmake_options=(-DCORE=PPC970 -DDYNAMIC_ARCH=OFF) ;;
powerpc64le) _cmake_options=(-DCORE=POWER8 -DDYNAMIC_ARCH=OFF) ;;
riscv64) _cmake_options=(-DTARGET=RISCV64_GENERIC); _cmake_options64=(-DFCOMMON_OPT=-fdefault-integer-8) ;;
x86_64) _cmake_options=(-DCORE=CORE2 -DDYNAMIC_ARCH=ON) ;;
*) _cmake_options=(-DDYNAMIC_ARCH=ON) ;;
esac
# Setting FC manually to avoid picking up f95 and breaking the cmake build
# https://github.com/xianyi/OpenBLAS/issues/4072#issuecomment-1576388332
FC=gfortran cmake -B build -S $_pkgname-$pkgver \
ASMFLAGS=$CFLAGS FFLAGS=${CFLAGS/ -Wformat -Werror=format-security/} FC=gfortran cmake -B build -S $_pkgname \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DNO_AFFINITY=ON \
-DUSE_OPENMP=1 \
-DNO_WARMUP=1 \
-DNUM_THREADS=64 ${_cmake_options[@]}
-DNUM_THREADS=64 ${_cmake_options[@]}
cmake --build build
FC=gfortran cmake -B build64 -S $_pkgname-$pkgver \
ASMFLAGS=$CFLAGS FFLAGS=${CFLAGS/ -Wformat -Werror=format-security/} FC=gfortran cmake -B build64 -S $_pkgname \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
@ -45,7 +51,7 @@ build() {
-DUSE_OPENMP=1 \
-DNO_WARMUP=1 \
-DNUM_THREADS=64 \
-DINTERFACE64=1 ${_cmake_options[@]}
-DINTERFACE64=1 ${_cmake_options[@]} ${_cmake_options64[@]}
cmake --build build64
}
@ -59,13 +65,13 @@ check() {
package_openblas() {
DESTDIR="$pkgdir" cmake --install build
install -Dm644 $_pkgname-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
install -Dm644 $_pkgname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_openblas64() {
pkgdesc+=" (64-bit integers)"
DESTDIR="$pkgdir" cmake --install build64
install -Dm644 $_pkgname-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
install -Dm644 $_pkgname/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
cd "$pkgdir"/usr/lib/
ln -s libopenblas_64.so.${pkgver%.*} libopenblas64_.so # Needed by julia