void-packages/srcpkgs/lapack/template
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

80 lines
2.2 KiB
Bash

# Template file for 'lapack'
pkgname=lapack
version=3.9.0
revision=1
build_style=cmake
configure_args="-DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON -DBUILD_TESTING=OFF
-DCMAKE_VERBOSE_MAKEFILE=ON -DCBLAS=ON -DLAPACKE=ON -DBUILD_DEPRECATED=ON"
hostmakedepends="gcc-fortran"
short_desc="Linear Algebra PACKage"
maintainer="Alessio Sergi <al3hex@gmail.com>"
license="BSD-3-Clause"
homepage="https://www.netlib.org/lapack/"
distfiles="https://github.com/Reference-LAPACK/lapack/archive/v${version}.tar.gz"
checksum=106087f1bb5f46afdfba7f569d0cbe23dacb9a07cd24733765a0e89dbe1ad573
post_install() {
vlicense LICENSE
}
lapack-devel_package() {
depends="blas-devel-${version}_${revision} ${sourcepkg}-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include/lapack.h
vmove usr/lib/cmake/lapack-${version}
vmove usr/lib/pkgconfig/lapack.pc
vmove usr/lib/liblapack.a
vmove usr/lib/liblapack.so
}
}
blas_package() {
short_desc="Basic Linear Algebra Subprograms"
pkg_install() {
vmove usr/lib/libblas.so.*
vlicense LICENSE
}
}
blas-devel_package() {
depends="blas-${version}_${revision}"
short_desc="Basic Linear Algebra Subprograms - development files"
pkg_install() {
vmove usr/lib/pkgconfig/blas.pc
vmove usr/lib/libblas.a
vmove usr/lib/libblas.so
}
}
cblas_package() {
short_desc="C interface to BLAS"
pkg_install() {
vmove usr/lib/libcblas.so.*
}
}
cblas-devel_package() {
short_desc="C interface to BLAS - development files"
depends="blas-devel-${version}_${revision} cblas-${version}_${revision}"
pkg_install() {
vmove usr/include/cblas*.h
vmove usr/lib/cmake/cblas-${version}
vmove usr/lib/pkgconfig/cblas.pc
vmove usr/lib/libcblas.a
vmove usr/lib/libcblas.so
}
}
lapacke_package() {
short_desc="C interface to LAPACK"
pkg_install() {
vmove usr/lib/liblapacke.so.*
}
}
lapacke-devel_package() {
short_desc="C interface to LAPACK - development files"
depends="lapack-devel-${version}_${revision} lapacke-${version}_${revision}"
pkg_install() {
vmove usr/include/lapacke*.h
vmove usr/lib/cmake/lapacke-${version}
vmove usr/lib/pkgconfig/lapacke.pc
vmove usr/lib/liblapacke.a
vmove usr/lib/liblapacke.so
}
}