Files
haikuports/sci-libs/lapack/lapack-3.10.0.recipe
OscarL 32733af12e lapack: switch to Python 3.9 (#8503)
Moved cmd:python3 to TEST_REQUIRES, as even if it seems like the
build needs it (for "summary tests"), it actually doesn't, and its
only for "make test" we need Python3.

Added $jobArgs, as that speeds up the build quite a lot.

Testes passed 100% with or without that set, in any case.
2023-04-24 12:55:30 +02:00

110 lines
2.6 KiB
Bash

SUMMARY="Numerical linear algebra package"
DESCRIPTION="A library of Fortran 90 with subroutines for solving \
the most commonly occurring problems in numerical linear algebra."
HOMEPAGE="http://www.netlib.org/lapack/"
COPYRIGHT="1992-2021 The LAPACK Project"
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="https://github.com/Reference-LAPACK/lapack/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="328c1bea493a32cac5257d84157dc686cc3ab0b004e2bea22044e0a59f6f8a19"
SOURCE_DIR="lapack-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
lapack$secondaryArchSuffix = $portVersion
lib:liblapack$secondaryArchSuffix = $libVersionCompat
lib:liblapacke$secondaryArchSuffix = $libVersionCompat
lib:libcblas$secondaryArchSuffix = $libVersionCompat
lib:libtmglib$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgfortran$secondaryArchSuffix
lib:libopenblas$secondaryArchSuffix
lib:libquadmath$secondaryArchSuffix
"
PROVIDES_devel="
lapack${secondaryArchSuffix}_devel = $portVersion
devel:liblapack$secondaryArchSuffix = $libVersionCompat
devel:liblapacke$secondaryArchSuffix = $libVersionCompat
devel:libcblas$secondaryArchSuffix = $libVersionCompat
devel:libtmglib$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
lapack$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libopenblas$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:gfortran$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
cmd:strip$secondaryArchSuffix
"
TEST_REQUIRES="
cmd:python3
"
defineDebugInfoPackage lapack$secondaryArchSuffix \
"$libDir"/liblapack.so.$libVersion \
"$libDir"/liblapacke.so.$libVersion \
"$libDir"/libtmglib.so.$libVersion \
"$libDir"/libcblas.so.$libVersion
BUILD()
{
rm -rf build
cmake -B build -S . \
$cmakeDirArgs \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS=1 \
-DCMAKE_Fortran_USE_RESPONSE_FILE_FOR_INCLUDES=1 \
-DUSE_OPTIMIZED_BLAS=ON \
-DBUILD_SHARED_LIBS=ON \
-DLAPACKE_WITH_TMG=ON \
-DCBLAS=ON \
-DBUILD_TESTING=ON \
-DBUILD_DEPRECATED=ON
cmake --build build $jobArgs
}
INSTALL()
{
cmake --install build
prepareInstalledDevelLibs liblapack \
liblapacke \
libcblas \
libtmglib
sed -i "1i prefix=$prefix" \
$libDir/pkgconfig/lapack.pc \
$libDir/pkgconfig/lapacke.pc
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
cd build
make test
}