File: arm-perl-regexp.patch

package info (click to toggle)
r-base 3.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 87,288 kB
  • sloc: ansic: 271,827; fortran: 99,804; makefile: 5,102; yacc: 5,065; sh: 4,968; tcl: 4,562; objc: 753; perl: 655; asm: 258; java: 31; sed: 9
file content (31 lines) | stat: -rw-r--r-- 1,623 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- r-base-2.15.2.orig/src/library/tools/R/install.R
+++ r-base-2.15.2/src/library/tools/R/install.R
@@ -54,7 +54,11 @@
     SHLIB_EXT <- if (WINDOWS) ".dll" else {
         ## can we do better?
         mconf <- file.path(R.home(), paste0("etc", rarch), "Makeconf")
-        sub(".*= ", "", grep("^SHLIB_EXT", readLines(mconf), value = TRUE))
+        if (substr( Sys.info()["machine"], 1, 3) == "arm") {   # arm has broken regexps in libc
+            sub(".*= ", "", grep("^SHLIB_EXT", readLines(mconf), value = TRUE), perl = TRUE)
+        } else {
+            sub(".*= ", "", grep("^SHLIB_EXT", readLines(mconf), value = TRUE))
+        }
     }
 
     options(warn = 1)
@@ -1616,8 +1620,13 @@
         mconf <- readLines(file.path(R.home(),
                                      paste0("etc", Sys.getenv("R_ARCH")),
                                      "Makeconf"))
-        SHLIB_EXT <- sub(".*= ", "", grep("^SHLIB_EXT", mconf, value = TRUE))
-        SHLIB_LIBADD <- sub(".*= ", "", grep("^SHLIB_LIBADD", mconf, value = TRUE))
+        if (substr( Sys.info()["machine"], 1, 3) == "arm") {   # arm has broken regexps in libc
+            SHLIB_EXT <- sub(".*= ", "", grep("^SHLIB_EXT", mconf, value = TRUE), perl = TRUE)
+            SHLIB_LIBADD <- sub(".*= ", "", grep("^SHLIB_LIBADD", mconf, value = TRUE), perl = TRUE)
+        } else {
+            SHLIB_EXT <- sub(".*= ", "", grep("^SHLIB_EXT", mconf, value = TRUE))
+            SHLIB_LIBADD <- sub(".*= ", "", grep("^SHLIB_LIBADD", mconf, value = TRUE))
+        }
         MAKE <- Sys.getenv("MAKE")
         rarch <- Sys.getenv("R_ARCH")
     } else {