Commits


Neal Richardson authored and François Saint-Jacques committed 04051162c1a
ARROW-6258: [R] Add macOS build scripts When installing the R package from source on macOS, if the configure script cannot find libarrow with pkgconfig, and if `apache-arrow` has not been installed via Homebrew (neither of which is the case on CRAN), an "autobrew" step happens: a script is downloaded and sourced, which uses a fork of Homebrew to download and install binary dependencies for bundling with the R package. This patch alters the configure script to let you `FORCE_AUTOBREW`, which is useful for testing, and it will use a local `autobrew` script file, if found, rather than downloading it. The patch also adds the `autobrew` script and the `apache-arrow.rb` brew formula to the `r/tools` directory, alongside the similar script that downloads the Arrow C++ binary on Windows. The two scripts are copied exactly from their "upstream" versions (noted on L18 of each file), with two minor modifications: (1) `autobrew` will use a local `apache-arrow.rb` formula if the file exists, and (2) the formula adds the `head` reference so you can `brew install --build-from-source --HEAD apache-arrow.rb` and pull the latest master branch of `apache/arrow` from GitHub. See this in action at https://github.com/nealrichardson/arrow-r-nightly/blob/34d27bf482fa1d9f490003a8396fabdff5beea37/.travis.yml. Ordinarily I would add a Travis-CI job to `apache/arrow` for this, but I know we're anxious not to delay build times further, so I'll run this job nightly. Nightly runs will solve https://issues.apache.org/jira/browse/ARROW-5134, and it will also allow us to host an R package repository with nightly binaries for macOS (and Windows too, using the existing Appveyor config + deploy to bintray). To install a binary from that repository on macOS, `install.packages("arrow", repos="https://dl.bintray.com/nealrichardson/arrow-r")`. One TODO: get @jeroen 's approval to include these scripts here under the Apache license and add a citation to LICENSE.txt. Closes #5095 from nealrichardson/force-autobrew and squashes the following commits: 499296d37 <Neal Richardson> Add license information for autobrew a63765bd7 <Neal Richardson> :rat: 1a8a77700 <Neal Richardson> Add autobrew scripts f48e6ba1e <Neal Richardson> Check for local autobrew script 284fd871b <Neal Richardson> Add FORCE_AUTOBREW arg to r/configure to support testing Authored-by: Neal Richardson <neal.p.richardson@gmail.com> Signed-off-by: François Saint-Jacques <fsaintjacques@gmail.com>