Files
haikuports/sci-libs/superlu/superlu-5.3.0.recipe
2022-12-26 13:54:07 +01:00

88 lines
2.8 KiB
Bash

SUMMARY="A library for solution of nonsymmetric systems of linear equations"
DESCRIPTION="SuperLU is a general purpose library for the direct solution \
of large, sparse, nonsymmetric systems of linear equations. The library is \
written in C and is callable from either C or Fortran program. It uses MPI, \
OpenMP and CUDA to support various forms of parallelism. It supports both \
real and complex datatypes, both single and double precision, and 64-bit \
integer indexing. The library routines performs an LU decomposition with \
partial pivoting and triangular system solves through forward and back \
substitution. The LU factorization routines can handle non-square matrices \
but the triangular solves are performed only for square matrices. The matrix \
columns may be preordered (before factorization) either through library or \
user supplied routines. This preordering for sparsity is completely separate \
from the factorization. Working precision iterative refinement subroutines \
are provided for improved backward stability. Routines are also provided \
to equilibrate the system, estimate the condition number, calculate the \
relative backward error, and estimate error bounds for the refined solutions. \
Serial SuperLU package also contains ILU routines, using numerical \
threshold-based dropping, with partial pivoting (ILUTP)."
HOMEPAGE="https://crd.lbl.gov/~xiaoye/SuperLU/
https://github.com/xiaoyeli/superlu"
COPYRIGHT="2003 The Regents of the University of California"
LICENSE="BSD (3-clause)"
# TODO: see "External software" in License.txt
REVISION="1"
SOURCE_URI="https://github.com/xiaoyeli/superlu/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="3e464afa77335de200aeb739074a11e96d9bef6d0b519950cfa6684c4be1f350"
SOURCE_FILENAME="superlu-v$portVersion.tar.gz"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
superlu$secondaryArchSuffix = $portVersion
lib:libsuperlu$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libopenblas$secondaryArchSuffix
"
PROVIDES_devel="
superlu${secondaryArchSuffix}_devel = $portVersion
devel:libsuperlu$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
superlu$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libopenblas$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:gfortran$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-Denable_internal_blaslib=OFF \
-DBUILD_SHARED_LIBS=TRUE
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libsuperlu
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make -C build test
}