diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/rkward-kde4/Makefile | 5 | ||||
-rw-r--r-- | math/rkward-kde4/files/patch-rkward_rbackend_rkstructuregetter.cpp | 38 | ||||
-rw-r--r-- | math/rkward-kde4/pkg-plist | 1 |
3 files changed, 42 insertions, 2 deletions
diff --git a/math/rkward-kde4/Makefile b/math/rkward-kde4/Makefile index 0ecbd9a191d2..0c75a441a252 100644 --- a/math/rkward-kde4/Makefile +++ b/math/rkward-kde4/Makefile @@ -30,13 +30,11 @@ INSTALLS_ICONS= yes CFLAGS+= -I${LOCALBASE}/include DOCSDIR= ${PREFIX}/share/doc/HTML/en/rkward -MAN1= rkward.1 OPTIONS_DEFINE= RECDEP RECDEP_DESC= Recommended runtime dependencies OPTIONS_DEFAULT=RECDEP -NO_STAGE= yes .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MNLS} @@ -75,6 +73,9 @@ pre-configure: ${ECHO_MSG} "==> ${PKGNAME} requires math/R to be built WITH_LIBR" ; \ exit 1; fi) +post-install: + ${RM} ${STAGEDIR}${PREFIX}/share/apps/katepart/syntax/r.xml # Conflicts with kate + .if defined(MAINTAINER_MODE) regression-test: install @${ECHO_MSG} "To pass the tests, some CRAN packages like R2HTML" diff --git a/math/rkward-kde4/files/patch-rkward_rbackend_rkstructuregetter.cpp b/math/rkward-kde4/files/patch-rkward_rbackend_rkstructuregetter.cpp new file mode 100644 index 000000000000..53ddefc109a3 --- /dev/null +++ b/math/rkward-kde4/files/patch-rkward_rbackend_rkstructuregetter.cpp @@ -0,0 +1,38 @@ +--- rkward/rbackend/rkstructuregetter.cpp.orig 2013-03-26 17:21:34.000000000 +0100 ++++ rkward/rbackend/rkstructuregetter.cpp 2014-03-10 21:03:17.000000000 +0100 +@@ -193,22 +193,27 @@ + + // get classes + SEXP classes_s; ++ QStringList classes; + + if ((TYPEOF (value) == LANGSXP) || (TYPEOF (value) == SYMSXP)) { // if it's a call, we should NEVER send it through eval +- extern SEXP R_data_class (SEXP, Rboolean); +- classes_s = R_data_class (value, (Rboolean) 0); ++ // stripped down and adjusted from R_data_class ++ classes = RKRSupport::SEXPToStringList(Rf_getAttrib (value, R_ClassSymbol)); ++ if (classes.isEmpty ()) { ++ if (TYPEOF (value) == LANGSXP) { ++ QString cl = RKRSupport::SEXPToString (PRINTNAME (value)); ++ if ((cl != "if") && (cl != "while") && (cl != "for") && (cl != "=") && (cl != "<-") && (cl != "(") && (cl != "{")) cl = "call"; ++ classes = QStringList (cl); ++ } else { ++ classes = QStringList ("name"); ++ } ++ } + + REPROTECT (value = Rf_coerceVector (value, EXPRSXP), value_index); // make sure the object is safe for everything to come +- +- PROTECT (classes_s); + } else { + classes_s = RKRSupport::callSimpleFun (class_fun, value, baseenv); +- PROTECT (classes_s); ++ classes = RKRSupport::SEXPToStringList (classes_s); + } + +- QStringList classes = RKRSupport::SEXPToStringList (classes_s); +- UNPROTECT (1); /* classes_s */ +- + // store classes + RData *classdata = new RData; + classdata->setData (classes); diff --git a/math/rkward-kde4/pkg-plist b/math/rkward-kde4/pkg-plist index af6c3ec75c34..e11313f6e611 100644 --- a/math/rkward-kde4/pkg-plist +++ b/math/rkward-kde4/pkg-plist @@ -1,6 +1,7 @@ bin/rkward lib/kde4/libexec/rkward.frontend lib/kde4/libexec/rkward.rbackend +man/man1/rkward.1.gz share/applications/kde4/rkward.desktop share/apps/katepart/syntax/rkward.xml share/apps/rkward/00saveload/import/import_csv.js |