librsb : new recipe (#1952)

This commit is contained in:
miqlas
2017-12-26 20:18:15 +01:00
committed by waddlesplash
parent cc9ba09097
commit 0463fd700d
2 changed files with 111 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
SUMMARY="Recursive Sparse Blocks Matrix computations library"
DESCRIPTION="A library for sparse matrix computations featuring the Recursive \
Sparse Blocks (RSB) matrix format. This format allows cache efficient and multi\
-threaded (that is, shared memory parallel) operations on large sparse \
matrices. It provides the most common operations necessary to iterative \
solvers, like matrix-vector multiplication, triangular solution, rows/columns \
scaling, diagonal extraction / setting, blocks extraction, norm computation, \
formats conversion. The RSB format is especially well suited for symmetric \
and transposed multiplication variants."
HOMEPAGE="http://sourceforge.net/projects/librsb/"
COPYRIGHT="2008-2017 Michele Martone"
LICENSE="GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://downloads.sourceforge.net/librsb/librsb-${portVersion/\~/-}.tar.gz"
CHECKSUM_SHA256="49ac0ab07ba9ea02028dfe18c0401c6c5831bbb1f05b59256133a5b27c674a8c"
SOURCE_DIR="librsb-${portVersion/\~/-}"
PATCHES="librsb-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
librsb$secondaryArchSuffix = $portVersion
cmd:rsbench
lib:librsb$secondaryArchSuffix = 0.0.0 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgfortran$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
librsb${secondaryArchSuffix}_devel = $portVersion
cmd:librsb_config
devel:librsb$secondaryArchSuffix = 0.0.0 compat >= 0
"
REQUIRES_devel="
librsb$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgomp$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:gfortran$secondaryArchSuffix
cmd:grep
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
defineDebugInfoPackage librsb$secondaryArchSuffix \
$libDir/librsb.so.0.0.0
BUILD()
{
runConfigure ./configure \
--with-zlib \
--enable-pkg-config-install
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/librsb.la
prepareInstalledDevelLib librsb
fixPkgconfig
packageEntries devel \
$developDir \
$prefix/bin/librsb-config
}
TEST()
{
make tests
}

View File

@@ -0,0 +1,23 @@
From 2a6848eb530903c3ca5fd38e5867d4d9ba45b4a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 24 Dec 2017 13:00:38 +0100
Subject: Build fix, Haiku got no ru_maxrss
diff --git a/rsb_sys.c b/rsb_sys.c
index a2f0738..d56d6fe 100644
--- a/rsb_sys.c
+++ b/rsb_sys.c
@@ -1286,7 +1286,9 @@ rsb_err_t rsb__getrusage(void)
RSB_STDOUT("getrusage() stats:\n");
/*("ru_ixrss : %ld (integral shared memory size)\n",usage.ru_ixrss);*/
+#ifndef __HAIKU__
RSB_STDOUT("ru_maxrss: %ld (maximum resident set size -- MB)\n",usage.ru_maxrss / RSB_K);
+#endif
RSB_STDOUT("ru_stime : %0.4lgs (system CPU time used)\n",rsb_rstv(&usage.ru_stime));
RSB_STDOUT("ru_utime : %0.4lgs (user CPU time used)\n",rsb_rstv(&usage.ru_utime));
#if 0
--
2.15.0