File: winlibs.R

package info (click to toggle)
r-cran-v8 2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 476 kB
  • sloc: cpp: 977; sh: 68; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Build against mingw-w64 build of libv8
VERSION <- commandArgs(TRUE)
LIBDIR <- paste0("../windows/libv8-", VERSION)
if(!file.exists(paste0(LIBDIR, "/include/v8.h"))){
  if(getRversion() < "3.3.0") stop("This library requires R 3.3 or newer")
  download.file(sprintf("https://github.com/rwinlib/libv8/archive/v%s.zip", VERSION), "v8.zip", quiet = TRUE)
  dir.create("../windows", showWarnings = FALSE)
  unzip("v8.zip", exdir = "../windows")
  setwd(LIBDIR)
  unzip("lib-4.9.3.zip")
  if(getRversion() >= "3.6.0") unzip("lib.zip")
  unlink("v8.zip")
}