From 0463fd700da025e5badb3175435280b8fd2e7df5 Mon Sep 17 00:00:00 2001 From: miqlas <5569059+extrowerk@users.noreply.github.com> Date: Tue, 26 Dec 2017 20:18:15 +0100 Subject: [PATCH] librsb : new recipe (#1952) --- sci-libs/librsb/librsb-1.2.0~rc7.recipe | 88 +++++++++++++++++++ .../librsb/patches/librsb-1.2.0~rc7.patchset | 23 +++++ 2 files changed, 111 insertions(+) create mode 100644 sci-libs/librsb/librsb-1.2.0~rc7.recipe create mode 100644 sci-libs/librsb/patches/librsb-1.2.0~rc7.patchset diff --git a/sci-libs/librsb/librsb-1.2.0~rc7.recipe b/sci-libs/librsb/librsb-1.2.0~rc7.recipe new file mode 100644 index 000000000..b17260938 --- /dev/null +++ b/sci-libs/librsb/librsb-1.2.0~rc7.recipe @@ -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 +} diff --git a/sci-libs/librsb/patches/librsb-1.2.0~rc7.patchset b/sci-libs/librsb/patches/librsb-1.2.0~rc7.patchset new file mode 100644 index 000000000..87e80e94e --- /dev/null +++ b/sci-libs/librsb/patches/librsb-1.2.0~rc7.patchset @@ -0,0 +1,23 @@ +From 2a6848eb530903c3ca5fd38e5867d4d9ba45b4a8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +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 +