mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
ATLAS : WIP recipe (#1117)
* ATLAS : WIP recipe * Trying to get it work... Broken, hovewer. * Add findutils to BUILd_PREREQ. It solved the build problem. Fixing configure. * Missing \ * Add CONFLICTS section * Extra makefiles to build shared library. * Cosmetic changes, compat, work on shared libs * Recipe cleanup, removed parallel make jobs * Do not try to extract the makefiles * Disable on every platform.
This commit is contained in:
151
sci-libs/atlas/atlas-3.10.3.recipe
Normal file
151
sci-libs/atlas/atlas-3.10.3.recipe
Normal file
@@ -0,0 +1,151 @@
|
||||
SUMMARY="Automatically Tuned Linear Algebra Software"
|
||||
DESCRIPTION="A software library for linear algebra. It provides a mature open \
|
||||
source implementation of BLAS APIs for C and Fortran77."
|
||||
HOMEPAGE="http://math-atlas.sourceforge.net/"
|
||||
COPYRIGHT="2011-2016 The ATLAS Project"
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://downloads.sf.net/math-atlas/atlas$portVersion.tar.bz2"
|
||||
CHECKSUM_SHA256="2688eb733a6c5f78a18ef32144039adcd62fabce66f2eb51dd59dde806a6d2b7"
|
||||
SOURCE_DIR="ATLAS"
|
||||
PATCHES="atlas-$portVersion.patchset"
|
||||
archlinuxCommit="286cdb8eafb3756cdb3d63f0f6c6084e55a31169"
|
||||
archlinuxRepoBaseUri="https://aur.archlinux.org/cgit/aur.git/plain/"
|
||||
SOURCE_FILENAME_2="makefile.shared.mt"
|
||||
SOURCE_FILENAME_3="makefile.shared.st"
|
||||
SOURCE_URI_2="$archlinuxRepoBaseUri/$SOURCE_FILENAME_2?h=atlas-lapack&id=$archlinuxCommit#noarchive"
|
||||
SOURCE_URI_3="$archlinuxRepoBaseUri/$SOURCE_FILENAME_3?h=atlas-lapack&id=$archlinuxCommit#noarchive"
|
||||
CHECKSUM_SHA256_2="7627446a0d598b55bc8f2795f8ff2028f134928b9ca597b76bf8dd5622dbff69"
|
||||
CHECKSUM_SHA256_3="18cfd59a104451c03c3b91020786260cf2b2581642a9c8f8598ba1d26b9cb3bf"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="!x86_gcc2 ?x86"
|
||||
|
||||
PROVIDES="
|
||||
atlas$secondaryArchSuffix = $portVersion
|
||||
lib:libatlas$secondaryArchSuffix = $portVersion compat >=3
|
||||
lib:libcblas$secondaryArchSuffix = $portVersion compat >=3
|
||||
lib:libf77blas$secondaryArchSuffix = $portVersion compat >=3
|
||||
lib:liblapack$secondaryArchSuffix = $portVersion compat >=3
|
||||
lib:libptcblas$secondaryArchSuffix = $portVersion compat >=3
|
||||
lib:libptf77blas$secondaryArchSuffix = $portVersion compat >=3
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libgfortran$secondaryArchSuffix
|
||||
lib:libgomp$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS="
|
||||
blas$secondaryArchSuffix
|
||||
cblas$secondaryArchSuffix
|
||||
lapack$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
atlas${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libatlas$secondaryArchSuffix = $portVersion compat >=3
|
||||
devel:libcblas$secondaryArchSuffix = $portVersion compat >=3
|
||||
devel:libf77blas$secondaryArchSuffix = $portVersion compat >=3
|
||||
devel:liblapack$secondaryArchSuffix = $portVersion compat >=3
|
||||
devel:libptcblas$secondaryArchSuffix = $portVersion compat >=3
|
||||
devel:libptf77blas$secondaryArchSuffix = $portVersion compat >=3
|
||||
"
|
||||
REQUIRES_devel="
|
||||
atlas$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
binutils$secondaryArchSuffix
|
||||
cmd:awk
|
||||
cmd:bzip2
|
||||
cmd:gfortran$secondaryArchSuffix
|
||||
cmd:fgrep
|
||||
cmd:find
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# Needs to be deleted!
|
||||
rm -rf haiku_build || true
|
||||
mkdir -p haiku_build
|
||||
cd haiku_build
|
||||
|
||||
CORE=`sysinfo -cpu | grep -o "\w*MHz\w*" | grep -o '[0-9]*'` # CPU freq
|
||||
NCPU=`sysinfo -cpu | grep "MHz" | awk '{print $1}'` # CPU count
|
||||
|
||||
if [ "$targetArchitecture" = "x86_64" ]; then
|
||||
ARCHITECTURE_BUILD_OPTS="-b 64 -s 2 -A x86SSE2 -V 768" # for x86_64
|
||||
else
|
||||
ARCHITECTURE_BUILD_OPTS="-b 32 -s 1 -A x86x87 -V 512" # for i686
|
||||
fi
|
||||
|
||||
echo 'Configuring ATLAS'
|
||||
# Not an autotools package
|
||||
../configure \
|
||||
--prefix=$prefix \
|
||||
--incdir=$includeDir \
|
||||
--libdir=$libDir \
|
||||
$ARCHITECTURE_BUILD_OPTS \
|
||||
-Fa alg \
|
||||
-fPIC \
|
||||
--shared \
|
||||
-D c -DPentiumCPS=$CORE \
|
||||
-O 13 \
|
||||
-t $NCPU \
|
||||
-m $CORE
|
||||
|
||||
echo 'Building ATLAS'
|
||||
make build
|
||||
|
||||
echo 'Building shared libraries'
|
||||
cd lib
|
||||
if [ 1 -lt $NCPU ]; then
|
||||
cp "$sourceDir2/$SOURCE_FILENAME_2" makefile # shared.mt
|
||||
else
|
||||
cp "$sourceDir3/$SOURCE_FILENAME_3" makefile # shared.st
|
||||
fi
|
||||
make -f makefile $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
echo 'Installing'
|
||||
cd haiku_build
|
||||
make install
|
||||
|
||||
cp -d lib/*.so* "$libDir"
|
||||
[ -e lib/libptlapack.a ] && cp lib/libptlapack.a "$libDir"
|
||||
|
||||
ln -s $libDir/libblas.so $libDir/libblas.so.3
|
||||
ln -s $libDir/liblapack.so.3 $libDir/liblapack.so
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libatlas \
|
||||
libcblas \
|
||||
libf77blas \
|
||||
liblapack \
|
||||
libptcblas \
|
||||
libptf77blas
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
|
||||
echo "This package provides a generic, not optimized version of ATLAS."
|
||||
echo "In order to improve performance, we recommend compiling a version of ATLAS"
|
||||
echo "optimized for your processor, using the atlas-lapack package in HaikuPorts"
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
echo 'Testing'
|
||||
cd haiku_build
|
||||
make check
|
||||
make ptcheck
|
||||
make time
|
||||
}
|
||||
Reference in New Issue
Block a user