miniCRAN
miniCRAN copied to clipboard
Support mac.binary.big-sur-arm64
I tried the below but makeRep
doesn't work for ARM macOS packages
download <- makeRepo(pkgs, path = pth, type = "mac.binary.big-sur-arm64", Rversion = "4.1")
If you could update repoPrefix
as below all should be well. Thanks
repoPrefix <- function(type, Rversion) {
Rversion <- twodigitRversion(Rversion)
if ((type == "mac.binary.el-capitan") && (numeric_version(Rversion) < "3.4")) {
warning("Type mac.binary.el-capitan only valid for R >= 3.4")
} else if ((type == "mac.binary.mavericks") && (numeric_version(Rversion) >= "3.4")) {
warning("Type mac.binary.mavericks only valid for R < 3.4")
}
switch(
type,
"source" = "src/contrib",
"win.binary" = sprintf("bin/windows/contrib/%s", Rversion),
"mac.binary" = sprintf("bin/macosx/contrib/%s", Rversion),
"mac.binary.el-capitan" = sprintf("bin/macosx/el-capitan/contrib/%s", Rversion),
"mac.binary.big-sur-arm64" = sprintf("bin/macosx/big-sur-arm64/contrib/%s", Rversion),
"mac.binary.leopard" = sprintf("bin/macosx/leopard/contrib/%s", Rversion),
"mac.binary.mavericks" = sprintf("bin/macosx/mavericks/contrib/%s", Rversion),
stop("Type ", type, " not recognised.")
)
}
Minor update:
repoPrefix <- function(type, Rversion) {
Rversion <- twodigitRversion(Rversion)
if ((type == "mac.binary.big-sur-arm64") && (numeric_version(Rversion) < "4.1")) {
warning("Type mac.binary.big-sur-arm64 only valid for R >= 4.1")
} else if ((type == "mac.binary.el-capitan") && (numeric_version(Rversion) < "3.4")) {
warning("Type mac.binary.el-capitan only valid for R >= 3.4")
} else if ((type == "mac.binary.mavericks") && (numeric_version(Rversion) >= "3.4")) {
warning("Type mac.binary.mavericks only valid for R < 3.4")
}
switch(type,
"source" = "src/contrib",
"win.binary" = sprintf("bin/windows/contrib/%s", Rversion),
"mac.binary" = sprintf("bin/macosx/contrib/%s", Rversion),
"mac.binary.el-capitan" = sprintf("bin/macosx/el-capitan/contrib/%s", Rversion),
"mac.binary.big-sur-arm64" = sprintf("bin/macosx/big-sur-arm64/contrib/%s", Rversion),
"mac.binary.leopard" = sprintf("bin/macosx/leopard/contrib/%s", Rversion),
"mac.binary.mavericks" = sprintf("bin/macosx/mavericks/contrib/%s", Rversion),
stop("Type ", type, " not recognised.")
)
}