2 # Licensed to the Apache Software Foundation (ASF) under one
3 # or more contributor license agreements. See the NOTICE file
4 # distributed with this work for additional information
5 # regarding copyright ownership. The ASF licenses this file
6 # to you under the Apache License, Version 2.0 (the
7 # "License"); you may not use this file except in compliance
8 # with the License. You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing,
13 # software distributed under the License is distributed on an
14 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 # KIND, either express or implied. See the License for the
16 # specific language governing permissions and limitations
23 # The Dockerfile should have put this file here
24 if [ -f "/arrow/ci/etc/rprofile" ]; then
25 # Ensure parallel R package installation, set CRAN repo mirror,
26 # and use pre-built binaries where possible
27 cat /arrow
/ci
/etc
/rprofile
>> $
(${R_BIN} RHOME
)/etc
/Rprofile.site
30 # Ensure parallel compilation of C/C++ code
31 echo "MAKEFLAGS=-j$(${R_BIN} -s -e 'cat(parallel::detectCores())')" >> $
(R RHOME
)/etc
/Renviron.site
33 # Special hacking to try to reproduce quirks on fedora-clang-devel on CRAN
34 # which uses a bespoke clang compiled to use libc++
35 # https://www.stats.ox.ac.uk/pub/bdr/Rconfig/r-devel-linux-x86_64-fedora-clang
36 if [ "$RHUB_PLATFORM" = "linux-x86_64-fedora-clang" ]; then
37 dnf
install -y libcxx-devel
38 sed -i.bak
-E -e 's/(CXX1?1? =.*)/\1 -stdlib=libc++/g' $
(${R_BIN} RHOME
)/etc
/Makeconf
39 rm -rf $
(${R_BIN} RHOME
)/etc
/Makeconf.bak
41 sed -i.bak
-E -e 's/(CXXFLAGS = )(.*)/\1 -g -O3 -Wall -pedantic -frtti -fPIC/' $
(${R_BIN} RHOME
)/etc
/Makeconf
42 rm -rf $
(${R_BIN} RHOME
)/etc
/Makeconf.bak
45 # Special hacking to try to reproduce quirks on centos using non-default build
47 if [[ "$DEVTOOLSET_VERSION" -gt 0 ]]; then
48 if [ "`which dnf`" ]; then
49 dnf
install -y centos-release-scl
50 dnf
install -y "devtoolset-$DEVTOOLSET_VERSION"
52 yum
install -y centos-release-scl
53 yum
install -y "devtoolset-$DEVTOOLSET_VERSION"
57 # Install openssl for S3 support
58 if [ "$ARROW_S3" == "ON" ] ||
[ "$ARROW_R_DEV" == "TRUE" ]; then
59 if [ "`which dnf`" ]; then
60 dnf
install -y libcurl-devel openssl-devel
61 elif [ "`which yum`" ]; then
62 yum
install -y libcurl-devel openssl-devel
63 elif [ "`which zypper`" ]; then
64 zypper
install -y libcurl-devel libopenssl-devel
67 apt-get
install -y libcurl4-openssl-dev libssl-dev
70 # The Dockerfile should have put this file here
71 if [ -f "/arrow/ci/scripts/install_minio.sh" ] && [ "`which wget`" ]; then
72 /arrow
/ci
/scripts
/install_minio.sh amd64 linux latest
/usr
/local
75 if [ -f "/arrow/ci/scripts/install_gcs_testbench.sh" ] && [ "`which pip`" ]; then
76 /arrow
/ci
/scripts
/install_gcs_testbench.sh amd64 default
80 # Workaround for html help install failure; see https://github.com/r-lib/devtools/issues/2084#issuecomment-530912786
81 Rscript
-e 'x <- file.path(R.home("doc"), "html"); if (!file.exists(x)) {dir.create(x, recursive=TRUE); file.copy(system.file("html/R.css", package="stats"), x)}'