diff --git a/DESCRIPTION b/DESCRIPTION index 21db37f14..bb34747d5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -65,7 +65,7 @@ Config/needs/dependencies: curl, filelock, jsonlite, - pkgbuild, + r-lib/pkgbuild, pkgcache, r-lib/pkgdepends, pkgsearch, diff --git a/src/library/pkgbuild/DESCRIPTION b/src/library/pkgbuild/DESCRIPTION index 00f22cc2d..cf4a92dfd 100644 --- a/src/library/pkgbuild/DESCRIPTION +++ b/src/library/pkgbuild/DESCRIPTION @@ -1,6 +1,6 @@ Package: pkgbuild Title: Find Tools Needed to Build R Packages -Version: 1.4.3 +Version: 1.4.3.9000 Authors@R: c( person("Hadley", "Wickham", role = "aut"), person("Jim", "Hester", role = "aut"), @@ -20,13 +20,12 @@ Suggests: covr, cpp11, knitr, mockery, Rcpp, rmarkdown, testthat (>= Config/Needs/website: tidyverse/tidytemplate Config/testthat/edition: 3 Encoding: UTF-8 +Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 NeedsCompilation: no -Packaged: 2023-12-10 13:32:36 UTC; gaborcsardi +Packaged: 2024-03-17 13:54:24 UTC; gaborcsardi Author: Hadley Wickham [aut], Jim Hester [aut], Gábor Csárdi [aut, cre], Posit Software, PBC [cph, fnd] Maintainer: Gábor Csárdi -Repository: CRAN -Date/Publication: 2023-12-10 14:00:06 UTC diff --git a/src/library/pkgbuild/NEWS.md b/src/library/pkgbuild/NEWS.md index 40881c186..d96121f51 100644 --- a/src/library/pkgbuild/NEWS.md +++ b/src/library/pkgbuild/NEWS.md @@ -1,3 +1,7 @@ +# pkgbuild (development version) + +* pkgbuild now supports R 4.4.x and Rtools44 (#183). + # pkgbuild 1.4.3 * pkgbuild now does not need the crayon, rprojroot and prettyunits diff --git a/src/library/pkgbuild/R/rtools.R b/src/library/pkgbuild/R/rtools.R index b6d7228ab..bd6a5bcf4 100644 --- a/src/library/pkgbuild/R/rtools.R +++ b/src/library/pkgbuild/R/rtools.R @@ -30,6 +30,45 @@ has_rtools <- function(debug = FALSE) { return(FALSE) } + # R 4.4.0 or later on ARM64 + if (getRversion() >= "4.4.0" && grepl("aarch", R.version$platform)) { + rtools44_aarch64_home <- Sys.getenv("RTOOLS44_AARCH64_HOME", "C:\rtools44-aarch64") + if (file.exists(file.path(rtools44_aarch64_home, "usr", "bin"))) { + if (debug) { + cat("Found in Rtools 4.4 (aarch64) installation folder\n") + } + rtools_path_set(rtools(rtools44_aarch64_home, "4.4")) + return(TRUE) + } + return(FALSE) + } + + # R 4.4.0 or later + if (getRversion() >= "4.4.0") { + rtools44_home <- Sys.getenv("RTOOLS44_HOME", "C:\\rtools44") + if (file.exists(file.path(rtools44_home, "usr", "bin"))) { + if (debug) { + cat("Found in Rtools 4.4 installation folder\n") + } + rtools_path_set(rtools(rtools44_home, "4.4")) + return(TRUE) + } + return(FALSE) + } + + # R 4.3.0 or later on ARM64 + if (getRversion() >= "4.3.0" && grepl("aarch", R.version$platform)) { + rtools43_aarch64_home <- Sys.getenv("RTOOLS43_AARCH64_HOME", "C:\rtools43-aarch64") + if (file.exists(file.path(rtools43_aarch64_home, "usr", "bin"))) { + if (debug) { + cat("Found in Rtools 4.3 (aarch64) installation folder\n") + } + rtools_path_set(rtools(rtools43_aarch64_home, "4.3")) + return(TRUE) + } + return(FALSE) + } + # R 4.3.0 or later if (getRversion() >= "4.3.0") { rtools43_home <- Sys.getenv("RTOOLS43_HOME", "C:\\rtools43") @@ -43,7 +82,6 @@ has_rtools <- function(debug = FALSE) { return(FALSE) } - # R 4.2.x or later and ucrt? ucrt <- is_ucrt() if (ucrt) {