-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f89dff
commit 37fcad4
Showing
3 changed files
with
47 additions
and
11 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,6 +1,16 @@ | ||
|
||
if pkg-config absl_base --libs 2>/dev/null; then | ||
exit 0; | ||
echo "Using Abseil from RTools via pkg-config" | ||
else | ||
WIN_CPPFLAGS="-DABSL_FORCE_WAITER_MODE=4" tools/build_absl.sh | ||
fi | ||
|
||
WIN_CPPFLAGS="-DABSL_FORCE_WAITER_MODE=4" tools/build_absl.sh | ||
if pkg-config openssl --libs 2>/dev/null; then | ||
echo "Using openssl from RTools via pkg-config" | ||
else | ||
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" | ||
fi | ||
|
||
|
||
|
||
|
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 |
---|---|---|
@@ -1,10 +1,27 @@ | ||
# Build against mingw-w64 build of openssl | ||
VERSION <- commandArgs(TRUE) | ||
if(!file.exists(sprintf("../windows/openssl-%s/include/openssl/ssl.h", VERSION))){ | ||
if(getRversion() < "3.3.0") setInternet2() | ||
download.file(sprintf("https://github.com/rwinlib/openssl/archive/v%s.zip", VERSION), | ||
|
||
# This script is used to support R 4.0, 4.1, and 4.2 on Windows, which do not have | ||
# OpenSSL available via pkg-config. It places the headers in windows/openssl/include | ||
# and the libs for this R version/arch in windows/openssl/lib to simplify the | ||
# configure/makevars setup. | ||
|
||
openssl_version <- "1.1.1k" | ||
if(file.exists("windows/openssl/include/openssl/ssl.h")) { | ||
cat("Using previously downloaded rwinlibs openssl") | ||
} else { | ||
cat(sprintf("Downloading OpenSSL %s from rwinlibs", openssl_version)) | ||
|
||
download.file(sprintf("https://github.com/rwinlib/openssl/archive/v%s.zip", openssl_version), | ||
"lib.zip", quiet = TRUE) | ||
dir.create("../windows", showWarnings = FALSE) | ||
unzip("lib.zip", exdir = "../windows") | ||
unzip("lib.zip", exdir = "windows") | ||
|
||
file.rename("windows/openssl-1.1.1k", "windows/openssl") | ||
crt <- if (packageVersion("base") >= "4.2.0") "-ucrt" else "" | ||
libs <- list.files( | ||
sprintf("windows/openssl/lib/%s%s", .Platform$r_arch, crt), | ||
full.names = TRUE | ||
) | ||
|
||
file.copy(libs, "windows/openssl/lib") | ||
unlink("lib.zip") | ||
} |