mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/openblas to 0.3.23-3
This commit is contained in:
parent
52854d1bac
commit
78f0669ef2
1 changed files with 43 additions and 27 deletions
|
@ -6,18 +6,17 @@
|
|||
# - disable dynamic arch on v8, FTBFS starting 0.3.23
|
||||
|
||||
pkgbase=openblas
|
||||
pkgname=(openblas openblas64)
|
||||
pkgname=(openblas openblas64 blas-openblas blas64-openblas)
|
||||
_pkgname=OpenBLAS
|
||||
pkgver=0.3.23
|
||||
pkgrel=1
|
||||
_blasver=3.9.0
|
||||
pkgrel=3
|
||||
_blasver=3.11.0
|
||||
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=('cmake' 'perl' 'gcc-fortran')
|
||||
#checkdepends=('cblas')
|
||||
source=(${_pkgname}-v${pkgver}.tar.gz::https://github.com/xianyi/OpenBLAS/archive/v${pkgver}.tar.gz)
|
||||
sha512sums=('ea64c693e57eb63cc2a88e4d6ab2d8cf9ab84ae6a15048fb12090a3570dd41053e62e99c1ff9d3e02dd67ca93233591ab41b8c017d06585d0a69222e1ad3023f')
|
||||
|
||||
|
@ -25,11 +24,12 @@ build() {
|
|||
[[ $CARCH == "aarch64" ]] && CORE="ARMV8" && DYN="OFF"
|
||||
[[ $CARCH == "armv7h" ]] && CORE="ARMV7" && DYN="ON"
|
||||
|
||||
cmake -B build -S $_pkgname-$pkgver \
|
||||
# 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 \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_WITHOUT_LAPACK=ON \
|
||||
-DBUILD_WITHOUT_CBLAS=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DNO_AFFINITY=ON \
|
||||
-DUSE_OPENMP=1 \
|
||||
|
@ -39,11 +39,9 @@ build() {
|
|||
-DDYNAMIC_ARCH=$DYN
|
||||
cmake --build build
|
||||
|
||||
cmake -B build64 -S $_pkgname-$pkgver \
|
||||
FC=gfortran cmake -B build64 -S $_pkgname-$pkgver \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_WITHOUT_LAPACK=ON \
|
||||
-DBUILD_WITHOUT_CBLAS=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DNO_AFFINITY=ON \
|
||||
-DUSE_OPENMP=1 \
|
||||
|
@ -56,37 +54,55 @@ build() {
|
|||
}
|
||||
|
||||
check() {
|
||||
cd $_pkgname-$pkgver
|
||||
# TODO
|
||||
#make CFLAGS="$CPPFLAGS $CFLAGS -lcblas" TARGET=CORE2 tests
|
||||
cd "$srcdir"/build
|
||||
ctest
|
||||
|
||||
cd "$srcdir"/build64
|
||||
ctest
|
||||
}
|
||||
|
||||
package_openblas() {
|
||||
provides=("blas=$_blasver")
|
||||
conflicts=('blas')
|
||||
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
install -Dm644 $_pkgname-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
|
||||
cd "$pkgdir"/usr/lib/
|
||||
ln -s libopenblas.so.${pkgver%.*} libblas.so
|
||||
ln -s libopenblas.so.${pkgver%.*} libblas.so.3
|
||||
ln -s openblas.pc "$pkgdir"/usr/lib/pkgconfig/blas.pc
|
||||
}
|
||||
|
||||
package_openblas64() {
|
||||
pkgdesc+=" (64-bit integers)"
|
||||
provides=("blas64=$_blasver")
|
||||
conflicts=('blas64')
|
||||
|
||||
DESTDIR="$pkgdir" cmake --install build64
|
||||
install -Dm644 $_pkgname-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
||||
|
||||
cd "$pkgdir"/usr/lib/
|
||||
ln -s libopenblas_64.so.${pkgver%.*} libblas64.so
|
||||
ln -s libopenblas_64.so.${pkgver%.*} libblas64.so.3
|
||||
ln -s libopenblas_64.so.${pkgver%.*} libopenblas64_.so # Needed by julia
|
||||
ln -s openblas64.pc "$pkgdir"/usr/lib/pkgconfig/blas64.pc
|
||||
}
|
||||
|
||||
package_blas-openblas() {
|
||||
pkgdesc+=" (Provides BLAS/CBLAS/LAPACK/LAPACKE system-wide)"
|
||||
depends=('openblas')
|
||||
provides=("blas=$_blasver" "cblas=$_blasver" "lapack=$_blasver" "lapacke=$_blasver")
|
||||
conflicts=('blas' 'cblas' 'lapack' 'lapacke')
|
||||
|
||||
mkdir -p "$pkgdir"/usr/lib/pkgconfig
|
||||
cd "$pkgdir"/usr/lib/
|
||||
for _lib in blas cblas lapack lapacke; do
|
||||
ln -s libopenblas.so.${pkgver%.*} lib${_lib}.so
|
||||
ln -s libopenblas.so.${pkgver%.*} lib${_lib}.so.3
|
||||
ln -s openblas.pc "$pkgdir"/usr/lib/pkgconfig/${_lib}.pc
|
||||
done
|
||||
}
|
||||
|
||||
package_blas64-openblas() {
|
||||
pkgdesc+=" (64-bit integers, provides BLAS/CBLAS/LAPACK/LAPACKE system-wide)"
|
||||
depends=('openblas64')
|
||||
provides=("blas64=$_blasver" "cblas64=$_blasver" "lapack64=$_blasver" "lapacke64=$_blasver")
|
||||
conflicts=('blas64' 'cblas64' 'lapack64' 'lapacke64')
|
||||
|
||||
mkdir -p "$pkgdir"/usr/lib/pkgconfig
|
||||
cd "$pkgdir"/usr/lib/
|
||||
for _lib in blas64 cblas64 lapack64 lapacke64; do
|
||||
ln -s libopenblas_64.so.${pkgver%.*} lib${_lib}.so
|
||||
ln -s libopenblas_64.so.${pkgver%.*} lib${_lib}.so.3
|
||||
ln -s openblas64.pc "$pkgdir"/usr/lib/pkgconfig/${_lib}.pc
|
||||
done
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
Loading…
Reference in a new issue