mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 08:21:49 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			79 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # Contributor: Francesco Colista <fcolista@alpinelinux.org>
 | |
| # Maintainer: Francesco Colista <fcolista@alpinelinux.org>
 | |
| pkgname=lapack
 | |
| pkgver=3.11
 | |
| pkgrel=2
 | |
| pkgdesc="Linear Algebra PACKage"
 | |
| url="https://www.netlib.org/lapack/"
 | |
| arch="all"
 | |
| license="BSD-3-Clause"
 | |
| options="!check" # Tests broken
 | |
| makedepends="gfortran cmake"
 | |
| subpackages="$pkgname-dev:_dev cblas blas blas-dev"
 | |
| source="https://github.com/Reference-LAPACK/lapack/archive/v$pkgver/lapack-v$pkgver.tar.gz"
 | |
| 
 | |
| build() {
 | |
| 	cmake -B build \
 | |
| 	    -DCMAKE_BUILD_TYPE=Release \
 | |
| 	    -DCMAKE_INSTALL_PREFIX=/usr \
 | |
| 	    -DCMAKE_INSTALL_LIBDIR=lib \
 | |
| 	    -DCMAKE_SKIP_RPATH=ON \
 | |
| 	    -DBUILD_SHARED_LIBS=ON \
 | |
| 	    -DBUILD_TESTING="$(want_check && echo ON || echo OFF)" \
 | |
| 	    -DCMAKE_Fortran_COMPILER=gfortran \
 | |
| 	    -DLAPACKE=ON \
 | |
| 	    -DCBLAS=ON \
 | |
| 	    -DBUILD_DEPRECATED=ON
 | |
| 	cmake --build build
 | |
| }
 | |
| 
 | |
| check() {
 | |
| 	cd build
 | |
| 	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
 | |
| }
 | |
| 
 | |
| package() {
 | |
| 	DESTDIR="$pkgdir" cmake --build build --target install
 | |
| }
 | |
| 
 | |
| _dev() {
 | |
| 	default_dev
 | |
| 
 | |
| 	mkdir -p "$pkgdir"/usr/lib \
 | |
| 		"$pkgdir"/usr/include  \
 | |
| 		"$pkgdir"/usr/lib/pkgconfig \
 | |
| 		"$pkgdir"/usr/lib/cmake
 | |
| 
 | |
| 	# Move development files meant for blas-dev
 | |
| 	mv "$subpkgdir"/usr/lib/libblas.so \
 | |
| 		"$subpkgdir"/usr/lib/libcblas.so \
 | |
| 		"$pkgdir"/usr/lib
 | |
| 
 | |
| 	mv "$subpkgdir"/usr/lib/pkgconfig/*blas* \
 | |
| 		"$pkgdir"/usr/lib/pkgconfig
 | |
| 
 | |
| 	mv "$subpkgdir"/usr/lib/cmake/*blas-* \
 | |
| 		"$pkgdir"/usr/lib/cmake
 | |
| 
 | |
| 	mv "$subpkgdir"/usr/include/*blas* \
 | |
| 		"$pkgdir"/usr/include
 | |
| }
 | |
| 
 | |
| blas() {
 | |
| 	depends=""
 | |
| 	pkgdesc="The Basic Linear Algebra Subprograms library"
 | |
| 
 | |
| 	amove usr/lib/libblas.so.*
 | |
| }
 | |
| 
 | |
| cblas() {
 | |
| 	depends=""
 | |
| 	pkgdesc="The C Basic Linear Algebra Subprograms library"
 | |
| 
 | |
| 	amove usr/lib/libcblas.so.*
 | |
| }
 | |
| 
 | |
| sha512sums="
 | |
| d2f23c5f6ae14fb868312a25235459bd0c04f4b43b82a5ade01314776ade9a75dc518a457eb58595f29f64cb0bb86f1a12ce8beea3ec87ef9caf49493ce29fb3  lapack-v3.11.tar.gz
 | |
| "
 |