[rkward-cvs] SF.net SVN: rkward:[2530] trunk/rkward/rkward/rbackend
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Fri Jun 12 14:52:23 UTC 2009
Revision: 2530
http://rkward.svn.sourceforge.net/rkward/?rev=2530&view=rev
Author: tfry
Date: 2009-06-12 14:52:23 +0000 (Fri, 12 Jun 2009)
Log Message:
-----------
Fully support DESTDIR on windows, and safer calls to R for detecting installation directories.
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/FindR.cmake
trunk/rkward/rkward/rbackend/rpackages/rpackage_install.cmake.in
Modified: trunk/rkward/rkward/rbackend/FindR.cmake
===================================================================
--- trunk/rkward/rkward/rbackend/FindR.cmake 2009-06-12 14:51:13 UTC (rev 2529)
+++ trunk/rkward/rkward/rbackend/FindR.cmake 2009-06-12 14:52:23 UTC (rev 2530)
@@ -17,8 +17,7 @@
MESSAGE(STATUS "Looking for R_HOME")
IF(NOT R_HOME)
EXECUTE_PROCESS(
- COMMAND echo "cat(R.home())"
- COMMAND ${R_EXECUTABLE} "--slave" "--no-save"
+ COMMAND ${R_EXECUTABLE} "--slave" "--no-save" "-e" "cat(R.home())"
OUTPUT_VARIABLE R_HOME)
ELSE(NOT R_HOME)
MESSAGE(STATUS "Specified by user")
@@ -34,8 +33,7 @@
MESSAGE(STATUS "Looking for R include files")
IF(NOT R_INCLUDEDIR)
EXECUTE_PROCESS(
- COMMAND echo "cat(R.home('include'))"
- COMMAND ${R_EXECUTABLE} "--slave" "--no-save"
+ COMMAND ${R_EXECUTABLE} "--slave" "--no-save" "-e" "cat(R.home('include'))"
OUTPUT_VARIABLE R_INCLUDEDIR)
ELSE(NOT R_INCLUDEDIR)
MESSAGE(STATUS "Location specified by user")
@@ -125,8 +123,7 @@
MESSAGE(STATUS "Checking for R package library location to use")
IF(NOT R_LIBDIR)
EXECUTE_PROCESS(
- COMMAND echo "cat(paste(unique (c(.Library.site, .Library)), collapse='${PATH_SEP}'))"
- COMMAND ${R_EXECUTABLE} "--slave" "--no-save"
+ COMMAND ${R_EXECUTABLE} "--slave" "--no-save" "-e" "cat(paste(unique (c(.Library.site, .Library)), collapse='${PATH_SEP}'))"
OUTPUT_VARIABLE R_LIBDIR)
ELSE(NOT R_LIBDIR)
MESSAGE(STATUS "Location specified by user")
Modified: trunk/rkward/rkward/rbackend/rpackages/rpackage_install.cmake.in
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rpackage_install.cmake.in 2009-06-12 14:51:13 UTC (rev 2529)
+++ trunk/rkward/rkward/rbackend/rpackages/rpackage_install.cmake.in 2009-06-12 14:52:23 UTC (rev 2530)
@@ -3,11 +3,15 @@
MESSAGE(STATUS "Installing R support package")
IF(WIN32)
+ SET(R_LIBDIR @R_LIBDIR@)
IF(DESTDIR)
- MESSAGE(STATUS "Installation with specified DESTDIR not (yet) supported on windows")
+ # strip drive letter
+ STRING(REGEX REPLACE "^.:." "" R_LIBDIR ${R_LIBDIR})
+ SET(R_LIBDIR "${DESTDIR}/${R_LIBDIR}")
+ FILE(MAKE_DIRECTORY "${R_LIBDIR}")
ENDIF(DESTDIR)
EXECUTE_PROCESS(
- COMMAND @R_EXECUTABLE@ CMD INSTALL -c -l @R_LIBDIR@ @CMAKE_CURRENT_SOURCE_DIR@/rkward
+ COMMAND @R_EXECUTABLE@ CMD INSTALL -c -l ${R_LIBDIR} @CMAKE_CURRENT_SOURCE_DIR@/rkward
WORKING_DIRECTORY @CMAKE_CURRENT_BINARY_DIR@
)
ELSE(WIN32)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list