-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Windows: use libv8 9.1 on all versions of R (drops support for win vi…
…sta)
- Loading branch information
Showing
9 changed files
with
64 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Package: V8 | ||
Type: Package | ||
Title: Embedded JavaScript and WebAssembly Engine for R | ||
Version: 4.2.2.9000 | ||
Version: 4.3.0 | ||
Authors@R: c( | ||
person("Jeroen", "Ooms", role = c("aut", "cre"), email = "[email protected]", | ||
comment = c(ORCID = "0000-0002-4035-0289")), | ||
|
@@ -32,3 +32,4 @@ RoxygenNote: 7.2.3 | |
Roxygen: list(load = "installed", markdown = TRUE) | ||
Language: en-US | ||
Encoding: UTF-8 | ||
Biarch: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
# Temp fixups R-3.6 or CRAN legacy Vista server | ||
if [ "${R_VERSION:0:1}" = "3" ] || [ "$LOCAL_SOFT" = "d:/Compiler/gcc-4.9.3/local330" ]; then | ||
cp -f tools/legacy.win src/Makevars.win | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
VERSION = 6.2.414.50-vista | ||
CXX_STD = CXX11 | ||
RWINLIB =../windows/libv8-$(VERSION) | ||
PKG_CPPFLAGS = -I$(RWINLIB)/include -DV8_ENABLE_CHECKS | ||
CXX_STD = CXX17 | ||
RWINLIB =../windows/mingw$(WIN) | ||
PKG_CPPFLAGS = -I$(RWINLIB)/include $(subst $(WIN),,-DV8_COMPRESS_POINTERS64) | ||
PKG_LIBS = \ | ||
-L$(RWINLIB)/lib${subst gcc ,-,${R_COMPILED_BY}}${R_ARCH} \ | ||
-L$(RWINLIB)/lib${R_ARCH} \ | ||
-lv8_base -lv8_libplatform -lv8_nosnapshot \ | ||
-lv8_libbase -lv8_libsampler -lv8_builtins_setup -lv8_builtins_generators \ | ||
-lws2_32 -lwinmm -ldbghelp -lshlwapi | ||
-L$(RWINLIB)/lib \ | ||
-lv8_monolith \ | ||
-lws2_32 -lwinmm -ldbghelp -lshlwapi -lssp -lz | ||
|
||
all: clean winlibs | ||
|
||
clean: | ||
rm -f $(SHLIB) $(OBJECTS) | ||
|
||
winlibs: | ||
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" $(VERSION) | ||
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" | ||
|
||
.PHONY: all winlibs clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
VERSION = 6.2.414.50-vista | ||
CXX_STD = CXX11 | ||
RWINLIB =../windows/libv8-$(VERSION) | ||
PKG_CPPFLAGS = -I$(RWINLIB)/include -DV8_ENABLE_CHECKS | ||
PKG_LIBS = \ | ||
-L$(RWINLIB)/lib${subst gcc ,-,${R_COMPILED_BY}}${R_ARCH} \ | ||
-L$(RWINLIB)/lib${R_ARCH} \ | ||
-lv8_base -lv8_libplatform -lv8_nosnapshot \ | ||
-lv8_libbase -lv8_libsampler -lv8_builtins_setup -lv8_builtins_generators \ | ||
-lws2_32 -lwinmm -ldbghelp -lshlwapi | ||
|
||
all: clean winlibs | ||
|
||
clean: | ||
rm -f $(SHLIB) $(OBJECTS) | ||
|
||
winlibs: | ||
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/oldlibs.R" $(VERSION) | ||
|
||
.PHONY: all winlibs clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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") | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
# 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) | ||
# Download a suitable libv8 build | ||
if(grepl('Windows Server 2008', osVersion)){ | ||
stop("Windows Vista/2008 is no longer supported") | ||
} | ||
if(!file.exists('../windows/ucrt64/include/v8.h')){ | ||
cdn <- ifelse(isTRUE(grepl('ucrt', R.version$crt)), | ||
'https://github.com/jeroen/V8/releases/download/v3.6.0/v8-9.1.269.38-win-ucrt.pkg.tar.xz', | ||
'https://github.com/jeroen/V8/releases/download/v3.6.0/v8-9.1.269.38-win-msvcrt.tar.xz') | ||
download.file(cdn, "libv8.tar.xz", 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") | ||
untar('libv8.tar.xz', exdir = "../windows", tar = 'internal') | ||
unlink('libv8.tar.xz') | ||
if(isTRUE(grepl('ucrt', R.version$crt))){ | ||
file.rename("../windows/ucrt64", "../windows/mingw64") | ||
} | ||
} |