Skip to content

Commit f0e75bc

Browse files
author
Pavel Marek
committed
Build rpart from different location than gnur directory
(cherry picked from commit 9bdf8ba089f70fae762c1bf54654c5889b334ef3)
1 parent 1516696 commit f0e75bc

File tree

1 file changed

+17
-4
lines changed
  • com.oracle.truffle.r.native.recommended

1 file changed

+17
-4
lines changed

com.oracle.truffle.r.native.recommended/Makefile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,26 @@ GNUR_RECOMMENDED_PKGNAMES := codetools
6868
endif # FASTR_RELEASE
6969
GNUR_RECOMMENDED_PKGNAMES_TS = $(GNUR_RECOMMENDED_PKGNAMES:=.ts)
7070

71+
# Recommended packages that are used by fastr in a specific version, i.e., taken from other sources than GNUR_RECOMMENDED_BINARY
72+
PKGS_WITH_CUSTOM_VERSION := cluster rpart
73+
RPART_TAR := $(FASTR_R_HOME)/libdownloads/rpart.tar.gz
74+
7175
GNUR_RECOMMENDED_TAR_DIR = $(GNUR_HOME_BINARY_UNPACKED)/src/library/Recommended/
72-
GNUR_RECOMMENDED_TARS := $(foreach pkg, $(GNUR_RECOMMENDED_PKGNAMES),$(GNUR_RECOMMENDED_TAR_DIR)/$(pkg)*.tar.gz)
76+
# We do not copy all the recommended packages from gnur's directory. Instead, there are some
77+
# packages that we take from different sources.
78+
GNUR_RECOMMENDED_TARS := \
79+
$(foreach pkg, \
80+
$(filter-out $(PKGS_WITH_CUSTOM_VERSION),$(GNUR_RECOMMENDED_PKGNAMES)), \
81+
$(GNUR_RECOMMENDED_TAR_DIR)/$(pkg)*.tar.gz \
82+
)
83+
ALL_RECOMMENDED_TARS := $(GNUR_RECOMMENDED_TARS) $(RPART_TAR)
84+
7385
## need to allow parallel installs
7486
INSTALL_OPTS = --pkglock --data-compress=xz --no-staged-install
7587

88+
$(info GNUR_RECOMMENDED_PKGNAMES = $(GNUR_RECOMMENDED_PKGNAMES))
89+
$(info ALL_RECOMMENDED_TARS = $(ALL_RECOMMENDED_TARS))
90+
7691
# in managed mode, we do nothing
7792
ifneq ($(FASTR_RFFI),managed)
7893

@@ -84,7 +99,7 @@ ifdef FASTR_RECOMMENDED_BINARY
8499

85100
$(info Using FastR recommended packages binary: $(FASTR_RECOMMENDED_BINARY))
86101

87-
install.recommended: $(GNUR_RECOMMENDED_TARS)
102+
install.recommended: $(ALL_RECOMMENDED_TARS)
88103
# @if ! (mx -p $(FASTR_R_HOME) r-pkgcache --print-api-checksum --vm fastr | tail -n 1 | diff -q $(FASTR_RECOMMENDED_BINARY)/api-checksum.txt -); then \
89104
# echo "******************************"; \
90105
# echo "ERROR:"; \
@@ -105,8 +120,6 @@ install.recommended: $(GNUR_RECOMMENDED_TARS)
105120
# If FASTR_RECOMMENDED_BINARY is not defined, we just build the packages
106121
else
107122

108-
$(info GNUR_RECOMMENDED_TARS=$(GNUR_RECOMMENDED_TARS))
109-
110123
%.ts: $(GNUR_RECOMMENDED_TAR_DIR)%.tgz
111124
@echo Installing recommended package `basename $<`
112125
@_R_CHECK_INSTALL_DEPENDS_=no FASTR_USE_F2C=true $(FASTR_R_HOME)/bin/R --polyglot CMD INSTALL $(INSTALL_OPTS) --library=$(FASTR_R_HOME)/library $< &> $@.out || (cat $@.out && exit 1)

0 commit comments

Comments
 (0)