[rkward-cvs] SF.net SVN: rkward-code:[4791] trunk/rkward/macports/kde

m-eik at users.sf.net m-eik at users.sf.net
Thu May 1 18:23:53 UTC 2014


Revision: 4791
          http://sourceforge.net/p/rkward/code/4791
Author:   m-eik
Date:     2014-05-01 18:23:52 +0000 (Thu, 01 May 2014)
Log Message:
-----------
MacPorts: moved the rkward-binary subport to rkward-devel, so the rkward portfile is now clean to by synced with MacPorts

Modified Paths:
--------------
    trunk/rkward/macports/kde/rkward/Portfile
    trunk/rkward/macports/kde/rkward-devel/Portfile

Added Paths:
-----------
    trunk/rkward/macports/kde/rkward-devel/files/
    trunk/rkward/macports/kde/rkward-devel/files/patch-rkward-rbackend-rkstructuregetter.cpp.diff

Modified: trunk/rkward/macports/kde/rkward/Portfile
===================================================================
--- trunk/rkward/macports/kde/rkward/Portfile	2014-04-30 16:19:41 UTC (rev 4790)
+++ trunk/rkward/macports/kde/rkward/Portfile	2014-05-01 18:23:52 UTC (rev 4791)
@@ -25,7 +25,7 @@
 
 homepage            http://rkward.sourceforge.net
 
-master_sites        https://sourceforge.net/projects/rkward/files/Current_Stable_Releases
+master_sites        sourceforge:projects/rkward/files/Current_Stable_Releases
 
 depends_lib         port:kdelibs4 \
                     port:kate \
@@ -43,32 +43,7 @@
         -DBUNDLE_INSTALL_DIR=${applications_dir} \
         -DR_EXECUTABLE=${frameworks_dir}/R.framework/Resources/R
 
-##############################################################################
-##  remove subport rkward-binary before committing this file to MacPorts!   ##
-## ---- %< ---------------------------------------------------------------- ##
-##  it is included here for the RKWard maintainers to ease the creation of  ##
-##  binary bundles                                                          ##
-##                                                                          ##
-# configure R to use Mac binaries by default                                 #
-# you must first install the OS X packages of CRAN R, as we'll link against  #
-# them                                                                       #
-subport rkward-binary {
-        conflicts-append rkward rkward-devel-binary
-        depends_lib-delete   port:R
-        configure.compiler   llvm-gcc-4.2
-        configure.args-delete \
-               -DR_EXECUTABLE=${frameworks_dir}/R.framework/Resources/R
-        configure.args-append \
-               -DUSE_BINARY_PACKAGES=1 \
-               -DR_EXECUTABLE=/Library/Frameworks/R.framework/Resources/R \
-               -DR_LIBDIR=${frameworks_dir}/R.framework/Resources/library
-        # create libdir if it doesn't exist
-        file mkdir ${frameworks_dir}/R.framework/Resources/library
-}
-## -------------------------------------------------------------- >% ------ ##
-##############################################################################
-
-variant rkward-debug description {Add full debugging support} {
+variant debug description {Add full debugging support} {
         depends_lib-append port:valgrind
 }
 

Modified: trunk/rkward/macports/kde/rkward-devel/Portfile
===================================================================
--- trunk/rkward/macports/kde/rkward-devel/Portfile	2014-04-30 16:19:41 UTC (rev 4790)
+++ trunk/rkward/macports/kde/rkward-devel/Portfile	2014-05-01 18:23:52 UTC (rev 4791)
@@ -24,29 +24,25 @@
 
 homepage            http://rkward.sourceforge.net
 
-master_sites        https://sourceforge.net/projects/rkward/files/Current_Stable_Releases
+master_sites        sourceforge:projects/rkward/files/Current_Stable_Releases
 
 depends_lib         port:kdelibs4 \
                     port:kate \
                     port:okular \
                     port:R
 
-post-extract {
-        file mkdir ${worksrcpath}/build
-}
-
-configure.dir       ${worksrcpath}/build
 configure.args-append \
         -DNO_R_XML=1 \
         -DRKVERSION_NUMBER=${version} \
         -DBUNDLE_INSTALL_DIR=${applications_dir} \
         -DR_EXECUTABLE=${frameworks_dir}/R.framework/Resources/R
 
+############
 # configure R to use Mac binaries by default
 # you must first install the OS X packages of CRAN R, as we'll link against them
 subport rkward-devel-binary {
         conflicts-append rkward-devel rkward-binary
-        depends_lib-delete   port:gcc48 port:R
+        depends_lib-delete   port:R
         configure.compiler   llvm-gcc-4.2
         configure.args-delete \
                -DR_EXECUTABLE=${frameworks_dir}/R.framework/Resources/R
@@ -58,8 +54,36 @@
         file mkdir ${frameworks_dir}/R.framework/Resources/library
 }
 
-# compile with full debugging support
-variant rkward-devel-debug {
+############
+# stable release, subport used for binary bundes
+subport rkward-binary {
+        conflicts-append rkward-devel rkward-devel-binary
+        configure.args-delete \
+               -DR_EXECUTABLE=${frameworks_dir}/R.framework/Resources/R \
+               -DRKVERSION_NUMBER=${version}
+        version             0.6.1
+        svn.url             http://svn.code.sf.net/p/rkward/code/branches/release_branches/rkward_${version}
+        svn.revision        4635
+        patchfiles          patch-rkward-rbackend-rkstructuregetter.cpp.diff
+        worksrcdir          rkward_${version}
+        depends_lib-delete   port:R
+        configure.compiler   llvm-gcc-4.2
+        configure.args-append \
+               -DRKVERSION_NUMBER=${version} \
+               -DUSE_BINARY_PACKAGES=1 \
+               -DR_EXECUTABLE=/Library/Frameworks/R.framework/Resources/R \
+               -DR_LIBDIR=${frameworks_dir}/R.framework/Resources/library
+        # create libdir if it doesn't exist
+        file mkdir ${frameworks_dir}/R.framework/Resources/library
+}
+
+post-extract {
+        file mkdir ${worksrcpath}/build
+}
+
+configure.dir       ${worksrcpath}/build
+
+variant debug description {Add full debugging support} {
         depends_lib-append port:valgrind
 }
 

Added: trunk/rkward/macports/kde/rkward-devel/files/patch-rkward-rbackend-rkstructuregetter.cpp.diff
===================================================================
--- trunk/rkward/macports/kde/rkward-devel/files/patch-rkward-rbackend-rkstructuregetter.cpp.diff	                        (rev 0)
+++ trunk/rkward/macports/kde/rkward-devel/files/patch-rkward-rbackend-rkstructuregetter.cpp.diff	2014-05-01 18:23:52 UTC (rev 4791)
@@ -0,0 +1,47 @@
+Index: rkward/rbackend/rkstructuregetter.cpp
+===================================================================
+--- rkward/rbackend/rkstructuregetter.cpp	(revision 4653)
++++ rkward/rbackend/rkstructuregetter.cpp	(revision 4660)
+@@ -193,22 +193,33 @@
+ 
+ 	// 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
++		PROTECT (classes_s = Rf_getAttrib (value, R_ClassSymbol));
++		if (Rf_length (classes_s)) classes = RKRSupport::SEXPToStringList(classes_s);
++		UNPROTECT (1);
++		if (classes.isEmpty ()) {
++			if (TYPEOF (value) == LANGSXP) {
++				SEXP symb = PROTECT (CAR (value));
++				QString cl;
++				if (TYPEOF (symb) == SYMSXP) cl = CHAR (PRINTNAME (symb));
++				UNPROTECT (1);
++				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);
++		PROTECT (classes_s = RKRSupport::callSimpleFun (class_fun, value, baseenv));
++		classes = RKRSupport::SEXPToStringList (classes_s);
++		UNPROTECT (1);
+ 	}
+ 
+-	QStringList classes = RKRSupport::SEXPToStringList (classes_s);
+-	UNPROTECT (1);	/* classes_s */
+-
+ 	// store classes
+ 	RData *classdata = new RData;
+ 	classdata->setData (classes);





More information about the rkward-tracker mailing list