141 lines
3.7 KiB
Bash
141 lines
3.7 KiB
Bash
# Template file for 'lapack'
|
|
pkgname=lapack
|
|
version=3.12.0
|
|
revision=1
|
|
build_style=cmake
|
|
configure_args="-DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON
|
|
-DCBLAS=ON -DLAPACKE=ON -DBUILD_DEPRECATED=ON"
|
|
hostmakedepends="gcc-fortran"
|
|
short_desc="Linear Algebra PACKage"
|
|
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://netlib.org/lapack/"
|
|
changelog="https://netlib.org/lapack/release_notes.html"
|
|
distfiles="https://github.com/Reference-LAPACK/lapack/archive/v${version}.tar.gz"
|
|
checksum=eac9570f8e0ad6f30ce4b963f4f033f0f643e7c3912fc9ee6cd99120675ad48b
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
configure_args+=" -DTEST_FORTRAN_COMPILER=OFF"
|
|
fi
|
|
|
|
pre_configure() {
|
|
cmake_builddir=build-shared
|
|
_args="$configure_args"
|
|
configure_args="$_args -DBUILD_SHARED_LIBS=ON"
|
|
if [ -z "$CROSS_BUILD" -a "$XBPS_CHECK_PKGS" ]; then
|
|
configure_args+=" -DBUILD_TESTING=ON"
|
|
fi
|
|
msg_normal "Configure for shared libs (cmake_builddir=$cmake_builddir)\n"
|
|
}
|
|
|
|
post_configure() {
|
|
cmake_builddir=build-static
|
|
configure_args="$_args -DBUILD_SHARED_LIBS=OFF"
|
|
if [ -z "$CROSS_BUILD" -a "$XBPS_CHECK_PKGS" = full ]; then
|
|
configure_args+=" -DBUILD_TESTING=ON"
|
|
fi
|
|
msg_normal "Configure for static libs (cmake_builddir=$cmake_builddir)\n"
|
|
( do_configure )
|
|
}
|
|
|
|
pre_build() {
|
|
cmake_builddir=build-shared
|
|
msg_normal "Build shared libs (cmake_builddir=$cmake_builddir)\n"
|
|
}
|
|
|
|
post_build() {
|
|
cmake_builddir=build-static
|
|
msg_normal "Build static libs (cmake_builddir=$cmake_builddir)\n"
|
|
( do_build )
|
|
}
|
|
|
|
pre_check() {
|
|
cmake_builddir=build-shared
|
|
export LD_LIBRARY_PATH=$(cd $cmake_builddir/lib && pwd)
|
|
msg_normal "Check shared libs (cmake_builddir=$cmake_builddir)\n"
|
|
}
|
|
|
|
post_check() {
|
|
if [ "$XBPS_CHECK_PKGS" = full ]; then
|
|
cmake_builddir=build-static
|
|
msg_normal "Check static libs (cmake_builddir=$cmake_builddir)\n"
|
|
( do_check )
|
|
fi
|
|
}
|
|
|
|
pre_install() {
|
|
cmake_builddir=build-static
|
|
msg_normal "Install static libs (cmake_builddir=$cmake_builddir)\n"
|
|
}
|
|
|
|
post_install() {
|
|
cmake_builddir=build-shared
|
|
msg_normal "Install shared libs (cmake_builddir=$cmake_builddir)\n"
|
|
( do_install )
|
|
# Library of Test Matrix Generators - built only for testing
|
|
rm -f $DESTDIR/usr/lib/libtmglib.*
|
|
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-*
|
|
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-*
|
|
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-*
|
|
vmove usr/lib/pkgconfig/lapacke.pc
|
|
vmove usr/lib/liblapacke.a
|
|
vmove usr/lib/liblapacke.so
|
|
}
|
|
}
|