summaryrefslogtreecommitdiff
path: root/math/py-rpy
diff options
context:
space:
mode:
Diffstat (limited to 'math/py-rpy')
-rw-r--r--math/py-rpy/Makefile40
-rw-r--r--math/py-rpy/distinfo2
-rw-r--r--math/py-rpy/files/patch-rpy.py12
-rw-r--r--math/py-rpy/files/patch-rpy_tools.py35
-rw-r--r--math/py-rpy/files/patch-setup.py60
-rw-r--r--math/py-rpy/files/patch-src-RPy.h27
-rw-r--r--math/py-rpy/files/patch-src-io.c13
-rw-r--r--math/py-rpy/files/patch-src-rpymodule.c13
-rw-r--r--math/py-rpy/pkg-descr8
9 files changed, 0 insertions, 210 deletions
diff --git a/math/py-rpy/Makefile b/math/py-rpy/Makefile
deleted file mode 100644
index b43196f959e1..000000000000
--- a/math/py-rpy/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# Created by: ijliao
-# $FreeBSD$
-
-PORTNAME= rpy
-PORTVERSION= 1.0.3
-PORTREVISION= 40
-CATEGORIES= math
-MASTER_SITES= SF
-PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Python interface to the R Programming Language
-
-DEPRECATED= Unmaintained, uses EOLed python27
-EXPIRATION_DATE= 2020-01-27
-
-LICENSE= GPLv2 LGPL21 MPL11
-LICENSE_COMB= dual
-
-BUILD_DEPENDS= ${PYNUMPY}
-LIB_DEPENDS= libR.so:math/R
-RUN_DEPENDS= ${PYNUMPY}
-
-USES= python:2.7
-USE_PYTHON= distutils autoplist
-LDFLAGS+= -L${LOCALBASE}/lib/R/modules -L${LOCALBASE}/lib/R/lib
-
-post-patch:
- @${REINPLACE_CMD} -e 's,^statichere ,,' ${WRKSRC}/src/rpymodule.c
- @${REINPLACE_CMD} -e 's|/usr/share|${LOCALBASE}/lib|' ${WRKSRC}/setup.py
-
-pre-configure:
- @(if [ ! -e ${LOCALBASE}/lib/R/lib/libR.so ] ; then \
- ${ECHO_MSG} "==> ${PKGNAME} requires math/R to be built WITH_LIBR" ; \
- exit 1; fi)
-
-post-install:
- @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/*.so
-
-.include <bsd.port.mk>
diff --git a/math/py-rpy/distinfo b/math/py-rpy/distinfo
deleted file mode 100644
index da8b3ec02524..000000000000
--- a/math/py-rpy/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (rpy-1.0.3.tar.gz) = 4ad23632ddcb6318a1af27a7f64526c110d59cbd166a0338c929de952f33c48b
-SIZE (rpy-1.0.3.tar.gz) = 87009
diff --git a/math/py-rpy/files/patch-rpy.py b/math/py-rpy/files/patch-rpy.py
deleted file mode 100644
index 32d3b25f1b8a..000000000000
--- a/math/py-rpy/files/patch-rpy.py
+++ /dev/null
@@ -1,12 +0,0 @@
---- rpy.py
-+++ rpy.py
-@@ -139,6 +139,7 @@ if VERBOSE:
-
- # Version
- from rpy_version import rpy_version
-+__version__ = rpy_version
-
- # Symbolic names for conversion modes
- TOP_CONVERSION = 4
-diff --git rpy_tools.py rpy_tools.py
-index f312201..6e83321 100644
diff --git a/math/py-rpy/files/patch-rpy_tools.py b/math/py-rpy/files/patch-rpy_tools.py
deleted file mode 100644
index 3371df201690..000000000000
--- a/math/py-rpy/files/patch-rpy_tools.py
+++ /dev/null
@@ -1,35 +0,0 @@
---- 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)
-+ 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
diff --git a/math/py-rpy/files/patch-setup.py b/math/py-rpy/files/patch-setup.py
deleted file mode 100644
index caeba282d087..000000000000
--- a/math/py-rpy/files/patch-setup.py
+++ /dev/null
@@ -1,60 +0,0 @@
---- setup.py
-+++ setup.py
-@@ -30,13 +30,14 @@ can be used for each of these R versions.
- See the files INSTALL.UNIX and INSTALL.WINDOWS for more details.
- """
-
--DEBUG=True
-+DEBUG=False
-
- import os, os.path, sys, shutil, re
- from distutils.core import setup, Extension
- from distutils.sysconfig import *
- from distutils.errors import *
- import rpy_tools
-+
- if sys.platform=="win32":
- import rpy_wintools
-
-@@ -85,7 +86,7 @@ for RHOME in RHOMES:
- get_config_vars()['OPT'] = '-g -Wall'
- else:
- # to avoid strict prototypes errors from R includes
-- get_config_vars()['OPT'] = '-DNDEBUG -g -O3 -Wall'
-+ get_config_vars()['OPT'] = '-DNDEBUG -O3 -Wall'
-
- # get the Python version
- if sys.version[:3] >= '2.2':
-@@ -149,22 +150,21 @@ for RHOME in RHOMES:
- library_dirs= r_libs
- runtime_libs = r_libs
- extra_compile_args=[]
-- elif sys.platform=='osf1V5':
-- include_dirs = [ os.path.join(RHOME.strip(), 'include'),
-- 'src' ]
-- libraries=['R','Rlapack']
-- library_dirs = r_libs
-- runtime_libs = r_libs
-- extra_compile_args=["-shared"]
-- source_files = source_files + ["src/setenv.c"]
-+
- else: # unix-like systems, this is known to work for Linux and Solaris
- include_dirs = [ os.path.join(RHOME.strip(), 'include'),
- 'src', '/usr/share/R/include' ]
-- libraries=['R','Rlapack']
-+
- library_dirs = r_libs
- runtime_libs = r_libs
- extra_compile_args=["-shared"]
- source_files = source_files + ["src/setenv.c"]
-+
-+ libraries=['R']
-+
-+ # Ask R to tell us how to properly link against lapack
-+ extra_compile_args += [ rpy_tools.get_R_LAPACK_LIB_FLAGS( RHOME ) ]
-+
-
- # Discover which array packages are present
- try:
-diff --git src/RPy.h src/RPy.h
-index 04faf3d..614ae5a 100644
diff --git a/math/py-rpy/files/patch-src-RPy.h b/math/py-rpy/files/patch-src-RPy.h
deleted file mode 100644
index a795ee3d31c1..000000000000
--- a/math/py-rpy/files/patch-src-RPy.h
+++ /dev/null
@@ -1,27 +0,0 @@
---- src/RPy.h
-+++ src/RPy.h
-@@ -52,6 +52,13 @@
- #include <Rdefines.h>
- #include <Rinternals.h>
- #include <Rversion.h>
-+
-+#if (R_VERSION >= R_Version(2,4,0))
-+#include <Rembedded.h>
-+#endif
-+
-+
-+
- #undef _POSIX_C_SOURCE
- #include <Python.h>
- #include <R_ext/Rdynload.h>
-@@ -74,7 +81,7 @@
- # endif
- #endif /* _WIN32 */
-
--#include <Rdevices.h> /* must follow Graphics.h */
-+#include <Rembedded.h> /* must follow Graphics.h */
-
-
- /* Missing definitions from Rinterface.h or RStartup.h */
-diff --git src/io.c src/io.c
-index 6c7c31d..cb10259 100644
diff --git a/math/py-rpy/files/patch-src-io.c b/math/py-rpy/files/patch-src-io.c
deleted file mode 100644
index dc09967eb6a3..000000000000
--- a/math/py-rpy/files/patch-src-io.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/io.c
-+++ src/io.c
-@@ -130,7 +130,7 @@ RPy_ReadConsole(char *prompt,
- PyErr_Clear();
- return 0;
- }
-- snprintf(buf, len, "%s", PyString_AsString(input_data));
-+ snprintf( (char*) buf, len, "%s", PyString_AsString(input_data));
- Py_DECREF(input_data);
- return 1;
- }
-diff --git src/rpymodule.c src/rpymodule.c
-index fe8b39f..fda1881 100644
diff --git a/math/py-rpy/files/patch-src-rpymodule.c b/math/py-rpy/files/patch-src-rpymodule.c
deleted file mode 100644
index 09f47bfb3271..000000000000
--- a/math/py-rpy/files/patch-src-rpymodule.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/rpymodule.c
-+++ src/rpymodule.c
-@@ -1772,8 +1772,10 @@ start_events(void)
-
- void r_finalize(void)
- {
-+#if (R_VERSION < R_Version(2,4,0))
- unsigned char buf[1024];
- char * tmpdir;
-+#endif
-
- R_dot_Last();
- R_RunExitFinalizers();
diff --git a/math/py-rpy/pkg-descr b/math/py-rpy/pkg-descr
deleted file mode 100644
index d0dfbb55b2bf..000000000000
--- a/math/py-rpy/pkg-descr
+++ /dev/null
@@ -1,8 +0,0 @@
-RPy is a very simple, yet robust, Python interface to the R Programming
-Language. It can manage all kinds of R objects and can execute arbitrary
-R functions (including the graphic functions). All the errors from the
-R language are converted to Python exceptions. Any module that later were
-installed on the R system, can easily be used from within Python, without
-introducing any changes.
-
-WWW: http://rpy.sourceforge.net/