Skip to content

Commit

Permalink
Use dev pkgbuild
Browse files Browse the repository at this point in the history
To support Rtools44.
  • Loading branch information
gaborcsardi committed Mar 17, 2024
1 parent 5470984 commit bcfb466
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Config/needs/dependencies:
curl,
filelock,
jsonlite,
pkgbuild,
r-lib/pkgbuild,
pkgcache,
r-lib/pkgdepends,
pkgsearch,
Expand Down
7 changes: 3 additions & 4 deletions src/library/pkgbuild/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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 <[email protected]>
Repository: CRAN
Date/Publication: 2023-12-10 14:00:06 UTC
4 changes: 4 additions & 0 deletions src/library/pkgbuild/NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
40 changes: 39 additions & 1 deletion src/library/pkgbuild/R/rtools.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -43,7 +82,6 @@ has_rtools <- function(debug = FALSE) {
return(FALSE)
}


# R 4.2.x or later and ucrt?
ucrt <- is_ucrt()
if (ucrt) {
Expand Down

0 comments on commit bcfb466

Please sign in to comment.