mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
105 lines
2.4 KiB
Bash
105 lines
2.4 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-2018 The OpenBLAS Project"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="2"
|
|
SOURCE_URI="http://github.com/xianyi/OpenBLAS/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="0950c14bd77c90a6427e26210d6dab422271bc86f9fc69126725833ecdaa0e85"
|
|
SOURCE_FILENAME="OpenBLAS-$portVersion.tar.gz"
|
|
SOURCE_DIR="OpenBLAS-$portVersion"
|
|
|
|
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
|
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_LAPACKE=1 \
|
|
NO_AFFINITY=1 \
|
|
NO_WARMUP=1 \
|
|
NO_AVX=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}
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install PREFIX=$prefix \
|
|
OPENBLAS_LIBRARY_DIR=$libDir \
|
|
OPENBLAS_INCLUDE_DIR=$includeDir \
|
|
$BUILD_CONF \
|
|
${target:+TARGET=$target}
|
|
|
|
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}
|
|
}
|