diff --git a/com.oracle.truffle.r.native.recommended/.project b/com.oracle.truffle.r.native.recommended/.project new file mode 100644 index 0000000000000000000000000000000000000000..3242ad0404f293a64e20f285c8d9cc66ecbd1877 --- /dev/null +++ b/com.oracle.truffle.r.native.recommended/.project @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>com.oracle.truffle.r.native.recommended</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.cdt.core.cnature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> + <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> + </natures> +</projectDescription> diff --git a/com.oracle.truffle.r.native.recommended/Makefile b/com.oracle.truffle.r.native.recommended/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..0b26a47e96d57e4be0a80cc85d7b15b16ecc8efd --- /dev/null +++ b/com.oracle.truffle.r.native.recommended/Makefile @@ -0,0 +1,58 @@ +# +# Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# This builds the "recommended" packages that are bundled with GNU R +# It has to be built separately from the "native" project that contains +# the packages because that is built first and before FastR is completely built +# N.B. As this takes quite a while the building is conditional on the +# FASTR_RELEASE environment variable + +.PHONY: all clean + +FASTR_R_HOME := $(abspath $(CURDIR)/..) +NATIVE_PROJECT := $(subst native.recommended,native,$(CURDIR)) +R_VERSION := $(notdir $(wildcard $(NATIVE_PROJECT)/gnur/R-*)) +GNUR_HOME := $(NATIVE_PROJECT)/gnur/$(R_VERSION) +GNUR_RECOMMENDED_TARS := $(wildcard $(GNUR_HOME)/src/library/Recommended/*.tgz) +#$(info GNUR_RECOMMENDED_TARS=$(GNUR_RECOMMENDED_TARS)) +GNUR_RECOMMENDED_PKGNAMES := $(foreach tar,$(GNUR_RECOMMENDED_TARS),$(notdir $(basename $(tar)))) +#$(info GNUR_RECOMMENDED_PKGNAMES=$(GNUR_RECOMMENDED_PKGNAMES)) + +all: install.recommended + +ifdef FASTR_RELEASE +install.recommended: $(GNUR_RECOMMENDED_TARS) + for pkgtar in $(GNUR_RECOMMENDED_TARS); do \ + $(FASTR_R_HOME)/bin/R CMD INSTALL --library=$(FASTR_R_HOME)/library $$pkgtar; \ + done + touch install.recommended +else +install.recommended: +endif + +clean: + for pkgname in $(GNUR_RECOMMENDED_PKGNAMES); do \ + rm -rf $(FASTR_R_HOME)/library/$$pkgname; \ + done + rm -f install.recommended + diff --git a/com.oracle.truffle.r.native/Makefile b/com.oracle.truffle.r.native/Makefile index b56d8c118269f478873d72697f8fe47345bc71d6..2b59c073ff66292a1acdc7318c2385a98a9da7c5 100644 --- a/com.oracle.truffle.r.native/Makefile +++ b/com.oracle.truffle.r.native/Makefile @@ -27,7 +27,7 @@ export TOPDIR = $(CURDIR) export FASTR_R_HOME=$(abspath $(TOPDIR)/..) export FASTR_LIB_DIR=$(FASTR_R_HOME)/lib export FASTR_NATIVE_DIR = $(TOPDIR) -export R_VERSION = 3.2.4 +export R_VERSION = $(subst R-,,$(notdir $(basename $(basename $(wildcard $(FASTR_R_HOME)/libdownloads/R-*.gz))))) export GNUR_HOME = $(TOPDIR)/gnur/R-$(R_VERSION) all: diff --git a/com.oracle.truffle.r.native/gnur/Makefile.gnur b/com.oracle.truffle.r.native/gnur/Makefile.gnur index 238eb6c3e5a21fa21ec597b8d78257f57b055d68..852f97671b15659d6c22a5b07097048f9da89ca1 100644 --- a/com.oracle.truffle.r.native/gnur/Makefile.gnur +++ b/com.oracle.truffle.r.native/gnur/Makefile.gnur @@ -114,9 +114,13 @@ config_update: endif # end FORCE_PIC +ifndef FASTR_RELEASE +RECPKGS := "--without-recommended-packages" +endif + $(GNUR_HOME)/Makefile: ed $(GNUR_HOME)/src/extra/xz/Makefile.in < patchXzMakefile - (cd $(GNUR_HOME); ./configure --with-x=no --without-recommended-packages --enable-memory-profiling $(GNUR_CONFIG_FLAGS) > gnur_configure.log 2>&1) + (cd $(GNUR_HOME); ./configure --with-x=no $(RECPKGS) --enable-memory-profiling $(GNUR_CONFIG_FLAGS) > gnur_configure.log 2>&1) build: $(GNUR_HOME)/bin/R diff --git a/com.oracle.truffle.r.test.cran/recommended b/com.oracle.truffle.r.test.cran/recommended new file mode 100644 index 0000000000000000000000000000000000000000..f4a1fb221cc715bea3cf8a7b4baf7bb0a41ba1ca --- /dev/null +++ b/com.oracle.truffle.r.test.cran/recommended @@ -0,0 +1,15 @@ +KernSmooth +MASS +Matrix +boot +class +cluster +codetools +foreign +lattice +mgcv +nlme +nnet +rpart +spatial +survival diff --git a/mx.fastr/suite.py b/mx.fastr/suite.py index b521619330827dd75ff847ae6305e99ec8fb8dee..79f51f71e0e0e33f7d7b78a9d346c697e1f0be53 100644 --- a/mx.fastr/suite.py +++ b/mx.fastr/suite.py @@ -265,6 +265,19 @@ suite = { "class" : "FastRReleaseProject", "output" : "com.oracle.truffle.r.release" }, + + "com.oracle.truffle.r.native.recommended" : { + "sourceDirs" : [], + "dependencies" : [ + "com.oracle.truffle.r.native", + "com.oracle.truffle.r.engine", + "com.oracle.truffle.r.runtime.ffi" + ], + "native" : "true", + "output" : "com.oracle.truffle.r.native.recommended", + "workingSets" : "FastR", + }, + }, "distributions" : {