aboutsummaryrefslogtreecommitdiff
path: root/math/librsb
diff options
context:
space:
mode:
authorStephen Montgomery-Smith <stephen@FreeBSD.org>2015-06-02 23:05:35 +0000
committerStephen Montgomery-Smith <stephen@FreeBSD.org>2015-06-02 23:05:35 +0000
commit0a5c2e68be6e677e746f9255850ba720b7c20983 (patch)
treeb4a07d98107dbf472674b8907c9d94b9113ec42b /math/librsb
parent783f2a31a62270973879acb79992e961669f56e1 (diff)
downloadports-0a5c2e68be6e677e746f9255850ba720b7c20983.tar.gz
ports-0a5c2e68be6e677e746f9255850ba720b7c20983.zip
- Make user of port understand information about memory heirarchy needs to
be provided. - Bump portrevision.
Notes
Notes: svn path=/head/; revision=388393
Diffstat (limited to 'math/librsb')
-rw-r--r--math/librsb/Makefile17
-rw-r--r--math/librsb/files/memhinfo.txt11
-rw-r--r--math/librsb/files/patch-rsb__init.c21
3 files changed, 47 insertions, 2 deletions
diff --git a/math/librsb/Makefile b/math/librsb/Makefile
index a07afb9e4e19..4556116d0818 100644
--- a/math/librsb/Makefile
+++ b/math/librsb/Makefile
@@ -3,6 +3,7 @@
PORTNAME= librsb
PORTVERSION= 1.2.0r1
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= SF/librsb
DISTNAME= ${PORTNAME}-${PORTVERSION:S/r/-rc/}
@@ -17,12 +18,24 @@ BUILD_DEPENDS= gsed:${PORTSDIR}/textproc/gsed
USES= fortran compiler:openmp gmake shebangfix
GNU_CONFIGURE= yes
-CFLAGS= -fPIC
+CFLAGS+= -fPIC
CONFIGURE_ARGS= --enable-fortran-module-install \
- --enable-matrix-types="double, double complex"
+ --enable-matrix-types="double, double complex" \
+ --with-memhinfo="${RSB_USER_SET_MEM_HIERARCHY_INFO}"
SHEBANG_FILES= scripts/*.sh
+MANUAL_PACKAGE_BUILD= Optimizes for the local machine
+
+pre-configure:
+ @if [ -z "${RSB_USER_SET_MEM_HIERARCHY_INFO}" ]; then \
+ ${CAT} ${FILESDIR}/memhinfo.txt; \
+ exit 1; \
+ fi
+
post-patch:
@${REINPLACE_CMD} -E s/sed/gsed/g ${WRKSRC}/scripts/*.sh
+check regression-test test: build
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} qtests
+
.include <bsd.port.mk>
diff --git a/math/librsb/files/memhinfo.txt b/math/librsb/files/memhinfo.txt
new file mode 100644
index 000000000000..2c3b1cf7a51c
--- /dev/null
+++ b/math/librsb/files/memhinfo.txt
@@ -0,0 +1,11 @@
+
+This port needs information about the memory cache system before building.
+You can set this in the variable RSB_USER_SET_MEM_HIERARCHY_INFO, for example
+make RSB_USER_SET_MEM_HIERARCHY_INFO="L2:12/64/3M,L1:64/8/32K"
+Finding these values is tricky, but the following steps will help:
+ 1. read the README file in the source code
+ 2. build the port misc/cpuid
+ 3. run the program cpuid
+You are on your own in figuring out how to convert the information from the
+program cpuid to the value of RSB_USER_SET_MEM_HIERARCHY_INFO.
+
diff --git a/math/librsb/files/patch-rsb__init.c b/math/librsb/files/patch-rsb__init.c
new file mode 100644
index 000000000000..b2679b31883e
--- /dev/null
+++ b/math/librsb/files/patch-rsb__init.c
@@ -0,0 +1,21 @@
+--- rsb_init.c.orig 2015-05-01 21:04:42 UTC
++++ rsb_init.c
+@@ -50,13 +50,15 @@ const rsb_char_t * rsb__init_get_mem_hie
+ if((usmhi = getenv("RSB_USER_SET_MEM_HIERARCHY_INFO"))!=NULL && *usmhi)
+ goto done;
+ #endif /* RSB_HAVE_GETENV */
++#ifdef RSB_DETECTED_MEM_HIERARCHY_INFO
++ if(verbose) RSB_INFO("Checking hardcoded RSB_DETECTED_MEM_HIERARCHY_INFO symbol\n");
++ usmhi = RSB_DETECTED_MEM_HIERARCHY_INFO;
++ if (*usmhi)
++ goto done;
+ #ifdef RSB_USER_SET_MEM_HIERARCHY_INFO
+ if(verbose) RSB_INFO("Checking hardcoded RSB_USER_SET_MEM_HIERARCHY_INFO symbol\n");
+ usmhi = RSB_USER_SET_MEM_HIERARCHY_INFO;
+ #endif /* RSB_USER_SET_MEM_HIERARCHY_INFO */
+-#ifdef RSB_DETECTED_MEM_HIERARCHY_INFO
+- if(verbose) RSB_INFO("Checking hardcoded RSB_DETECTED_MEM_HIERARCHY_INFO symbol\n");
+- usmhi = RSB_DETECTED_MEM_HIERARCHY_INFO;
+ #endif /* RSB_USER_SET_MEM_HIERARCHY_INFO */
+ done:
+ if(verbose) RSB_INFO("Available memory hierarchy info string: \"%s\"\n",usmhi);