|
1 | | -# Build against precompiled zeromq libs. |
2 | | -if(!file.exists("../windows/zeromq-4.3.4/include/zmq.h")){ |
3 | | - if(getRversion() < "3.3.0") setInternet2() |
4 | | - download.file("https://github.com/rwinlib/zeromq/archive/4.3.4.zip", "lib.zip", quiet = TRUE) |
| 1 | +if(!file.exists("../windows/zeromq/include")){ |
| 2 | + unlink("../windows", recursive = TRUE) |
| 3 | + url <- if(grepl("aarch", R.version$platform)){ |
| 4 | + "https://github.com/r-windows/bundles/releases/download/zeromq-4.3.4/zeromq-4.3.4-clang-aarch64.tar.xz" |
| 5 | + } else if(grepl("clang", Sys.getenv('R_COMPILED_BY'))){ |
| 6 | + "https://github.com/r-windows/bundles/releases/download/zeromq-4.3.4/zeromq-4.3.4-clang-x86_64.tar.xz" |
| 7 | + } else if(getRversion() >= "4.3") { |
| 8 | + "https://github.com/r-windows/bundles/releases/download/zeromq-4.3.4/zeromq-4.3.4-ucrt-x86_64.tar.xz" |
| 9 | + } else { |
| 10 | + "https://github.com/rwinlib/zeromq/archive/4.3.4.tar.gz" |
| 11 | + } |
| 12 | + download.file(url, basename(url), quiet = TRUE) |
5 | 13 | dir.create("../windows", showWarnings = FALSE) |
6 | | - unzip("lib.zip", exdir = "../windows") |
7 | | - unlink("lib.zip") |
8 | | - |
9 | | - # We want to use vendored zmq.hpp from rzmq instead |
10 | | - unlink("../windows/zeromq-4.3.4/include/*.hpp") |
| 14 | + untar(basename(url), exdir = "../windows", tar = 'internal') |
| 15 | + unlink(basename(url)) |
| 16 | + setwd("../windows") |
| 17 | + file.rename(list.files(), 'zeromq') |
11 | 18 | } |
0 commit comments