summaryrefslogtreecommitdiff
path: root/math/rpy/files/patch-rpy_tools.py
diff options
context:
space:
mode:
authorBrendan Fabeny <bf@FreeBSD.org>2013-05-28 15:15:05 +0000
committerBrendan Fabeny <bf@FreeBSD.org>2013-05-28 15:15:05 +0000
commite80e13199698384004812ef82084507a63c6db49 (patch)
tree415589d9c68c0b0770aa00cfd4495ce30df83a29 /math/rpy/files/patch-rpy_tools.py
parent- Try again to fix the UPDATING entry for ruby. Thanks to bdrewery for the help. (diff)
Update math/R to 3.0.1-patched, and adjust dependent ports;
synchronize math/rpy with upstream repository Reviewed by: wen Approved by: wen, tota
Notes
Notes: svn path=/head/; revision=319316
Diffstat (limited to 'math/rpy/files/patch-rpy_tools.py')
-rw-r--r--math/rpy/files/patch-rpy_tools.py32
1 files changed, 27 insertions, 5 deletions
diff --git a/math/rpy/files/patch-rpy_tools.py b/math/rpy/files/patch-rpy_tools.py
index 09f166003c77..3371df201690 100644
--- a/math/rpy/files/patch-rpy_tools.py
+++ b/math/rpy/files/patch-rpy_tools.py
@@ -1,13 +1,35 @@
---- rpy_tools.py.orig 2009-12-29 09:42:02.000000000 +0800
-+++ rpy_tools.py 2009-12-29 09:42:41.000000000 +0800
-@@ -97,8 +97,8 @@
+--- rpy_tools.py
++++ rpy_tools.py
+@@ -97,8 +97,7 @@ def get_R_VERSION(RHOME=None, force_exec=False):
if stat or len(output)<=0:
raise RuntimeError("Couldn't execute the R interpreter" +
" `%s'.\n" % rexec )
- # edd 05 Apr 2006 version = re.search("R +([0-9]\.[0-9]\.[0-9])", output)
- version = re.search(" +([0-9]\.[0-9]\.[0-9])", output)
-+ # edd 05 Apr 2006 version = re.search("R +([0-9]\.[0-9][0-9]\.[0-9])", output)
-+ version = re.search(" +([0-9]\.[0-9][0-9]\.[0-9])", output)
++ version = re.search(" +([0-9]+\.[0-9]+\.[0-9]+)", output)
if not version:
raise RuntimeError("Couldn't obtain version number from output\n"
"of `R --version'.\n")
+@@ -143,3 +142,20 @@ def get_PYTHON_DIR():
+ % PYTHON_DIR )
+
+ return PYTHON_DIR
++
++def get_R_LAPACK_LIB_FLAGS(RHOME=get_R_HOME()):
++ """
++ Determine the necessary link arguments for lapack
++ """
++ rexec = os.path.join(RHOME, 'bin', 'R')
++ stat, output = getstatusoutput('"%s" CMD config LAPACK_LIBS' % rexec )
++ if stat or len(output)<=0:
++ raise RuntimeError("Couldn't execute the R interpreter" +
++ " `%s'.\n" % rexec )
++
++ LAPACK_LIB_FLAGS = output.strip()
++ if not LAPACK_LIB_FLAGS:
++ raise RuntimeError("Couldn't obtain LAPACK_LIBS information from output\n"
++ "of `R CMD config LAPACK_LIBS'.\n")
++
++ return LAPACK_LIB_FLAGS
+diff --git setup.py setup.py
+index cf0fa2e..4a1f840 100644