0
0
Fork 0
haikuports/sci-libs/openblas/openblas-0.3.17.recipe

110 lines
2.5 KiB
Bash

SUMMARY="An optimized BLAS library"
DESCRIPTION="OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \
version."
HOMEPAGE="http://www.openblas.net/"
COPYRIGHT="2011-2021 The OpenBLAS Project"
LICENSE="BSD (3-clause)"
REVISION="4"
SOURCE_URI="http://github.com/xianyi/OpenBLAS/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="df2934fa33d04fd84d839ca698280df55c690c86a5a1133b3f7266fce1de279f"
SOURCE_FILENAME="OpenBLAS-$portVersion.tar.gz"
SOURCE_DIR="OpenBLAS-$portVersion"
PATCHES="openblas-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
portVersionCompat="$portVersion compat >= ${portVersion%%.*}"
libVersion="$portVersion"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
openblas$secondaryArchSuffix = $portVersionCompat
lib:libopenblas$secondaryArchSuffix = $libVersionCompat
lib:libopenblasp_r$portVersion$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgfortran$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
"
PROVIDES_devel="
openblas${secondaryArchSuffix}_devel = $portVersionCompat
devel:libopenblas$secondaryArchSuffix = $libVersionCompat
devel:libopenblasp_r$portVersion$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
openblas$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:awk
cmd:g++$secondaryArchSuffix
cmd:gfortran$secondaryArchSuffix
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage openblas$secondaryArchSuffix \
"$libDir"/libopenblas.so.0 \
"$libDir"/libopenblasp-r$portVersion.so
# DYNAMIC_ARCH is x86 only
# PPC & others should specify TARGET=
case "$effectiveTargetArchitecture" in
x86) target=NORTHWOOD;;
x86_64) target=PRESCOTT;;
*) target=;;
esac
BUILD_CONF="NO_STATIC=1 \
NO_LAPACK=1 \
NO_LAPACKE=1 \
NO_AFFINITY=1 \
NO_WARMUP=1 \
NO_AVX512=1 \
NUM_THREADS=64 \
DYNAMIC_ARCH=1 \
USE_OPENMP=1"
BUILD()
{
make MAKE_NB_JOBS=${jobArgs#-j} \
$BUILD_CONF \
${target:+TARGET=$target} \
libs shared
}
INSTALL()
{
make install PREFIX=$prefix \
OPENBLAS_LIBRARY_DIR=$libDir \
OPENBLAS_INCLUDE_DIR=$includeDir \
$BUILD_CONF \
${target:+TARGET=$target}
rm -f $libDir/*.a
prepareInstalledDevelLibs libopenblas libopenblasp-r$portVersion
fixPkgconfig
cp -P $developLibDir/libopenblas.so.0 $libDir
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make tests \
$BUILD_CONF \
${target:+TARGET=$target}
}