This is an experimental system for building static, dependent libraries for R packages. It is mainly intended to automate the maintenance of CRAN dependencies for the OS X build system, but the system is intended to be usable on other platforms as well.
The idea is for package authors to submit pull requests for dependencies their packages require such that they can be automatically installed on the build VMs.
The dependency descriptions are simple DCF files. The format should be
self-explanatory, it follows the same conventions as
files in R packages. The required fields are
Source.URL. Most common optional fields include
There is an R script that will process the recipes and create a make file which can be used to build libraries and their dependencies. For example, to build all libraries and their dependencies:
Rscript scripts/mkmk.R && cd builds && make all
Use a recipe name instead of
all to build a specific library and its
dependencies. Each library is built, packaged and installed.
Configure[.<os>[.<ver>]][.<arch>]:flags to add to the
<os>is the lowecase name of the OS as returned by
<ver>is the major version of the OS (
uname -rup to the first dot) and
<arch>is the architecture of the platform. Multiple types can be specified and they are concatenated using precedence
os, ver, arch.
Depends:list of dependent recipes
Package:name of the package (required)
Version:version of the package (required)
Source.URL:URL of the soruce tar ball (required)
Configure.subdir:subdirectory containing the sources
Special:special recipe flags, currently only
in-sourcesis supported which forces the build to be performed inside the sources.
Distribution.files:list of files (or directories) to include in the final distribution tar ball. Defaults to
Currently the build steps are
- download source tar ball
- unpack the tar ball
- move the contents to a directory with fixed naming scheme
- create a build object directory
- configure in the object directory using all the accumulated flags from the recipe
- change the ownership of content instide
usrinside the destination into a tar ball
- unpack the tar ball in the system location
Each dependency has to succeed in all the steps above before the next recipe is used. Makefile is used to determine the dependencies between the recipes.
pkgconfig is not specifically listed in most recipes
even though several of them use it, so it is advisable to use
pkgconfig before using
mkmk.R script will respect the following environment variables:
TARpath to the
tarprogram. Note that the build system assumes a tar version that is smart enough to handle all common compression formats (