karldw commented on a change in pull request #11001:
URL: https://github.com/apache/arrow/pull/11001#discussion_r697568448



##########
File path: r/tools/nixlibs.R
##########
@@ -413,10 +392,114 @@ cmake_version <- function(cmd = "cmake") {
   )
 }
 
+turn_off_thirdparty_features <- function(env_vars) {
+  # Because these are done as environment variables (as opposed to build 
flags),
+  # setting these to "OFF" overrides any previous setting. We don't need to
+  # check the existing value.
+  turn_off <- c(
+    "ARROW_MIMALLOC=OFF",
+    "ARROW_JEMALLOC=OFF",
+    "ARROW_PARQUET=OFF", # depends on thrift
+    "ARROW_DATASET=OFF", # depends on parquet
+    "ARROW_S3=OFF",
+    "ARROW_WITH_BROTLI=OFF",
+    "ARROW_WITH_BZ2=OFF",
+    "ARROW_WITH_LZ4=OFF",
+    "ARROW_WITH_SNAPPY=OFF",
+    "ARROW_WITH_ZLIB=OFF",
+    "ARROW_WITH_ZSTD=OFF",
+    "ARROW_WITH_RE2=OFF",
+    "ARROW_WITH_UTF8PROC=OFF",
+    # NOTE: this code sets the environment variable ARROW_JSON to "OFF", but
+    # that setting is will *not* be honored by build_arrow_static.sh until
+    # ARROW-13768 is resolved.
+    "ARROW_JSON=OFF",
+    # The syntax to turn off XSIMD is different.
+    'EXTRA_CMAKE_FLAGS="-DARROW_SIMD_LEVEL=NONE"'
+  )
+  if (Sys.getenv("EXTRA_CMAKE_FLAGS") != "") {
+    # Error rather than overwriting EXTRA_CMAKE_FLAGS
+    # (Correctly inserting the flag into an existing quoted string is tricky)
+    stop("Sorry, setting EXTRA_CMAKE_FLAGS is not supported at this time.")
+  }
+  paste(env_vars, paste(turn_off, collapse = " "))
+}
+
+set_thirdparty_urls <- function(env_vars) {
+  deps_dir <- Sys.getenv("ARROW_THIRDPARTY_DEPENDENCY_DIR")
+  files <- list.files(deps_dir, full.names = FALSE)
+  if (length(files) == 0) {
+    # This will be true if the variable is unset, if it's set but the directory

Review comment:
       Sure!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to