diff --git a/NAMESPACE b/NAMESPACE index 50b308decf..8816c68201 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -24,6 +24,7 @@ export("return_as<-") export("selected_points<-") export("selected_ranges<-") export("strings_as_factors<-") +export(.pkg_config) export(allows_dups) export(array_consolidate) export(array_vacuum) diff --git a/man/dot-pkg_config.Rd b/man/dot-pkg_config.Rd new file mode 100644 index 0000000000..bc5eda5e94 --- /dev/null +++ b/man/dot-pkg_config.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/Version.R +\name{.pkg_config} +\alias{.pkg_config} +\title{Compiler Arguments for Using \code{libtiledb}} +\usage{ +.pkg_config(opt = c("PKG_CXX_FLAGS", "PKG_CXX_LIBS")) +} +\arguments{ +\item{opt}{A single character value with the package configuration variable +to fetch; choose from +\itemize{ +\item \dQuote{\code{PKG_CXX_FLAGS}}: compiler flags for \code{libtiledb} +\item \dQuote{\code{PKG_CXX_LIBS}}: linking flags for \code{libtiledb} +}} +} +\value{ +... +} +\description{ +Compiler Arguments for Using \code{libtiledb} +} +\examples{ +.pkg_config() +.pkg_config("PKG_CXX_LIBS") + +} +\keyword{internal} diff --git a/src/Makevars.win b/src/Makevars.win index 00fdfc7c4a..f8cb7829e0 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,5 +1,6 @@ CXX_STD = CXX17 -RWINLIB = ../windows/rwinlib-tiledb +# RWINLIB = ../windows/rwinlib-tiledb +RWINLIB = ../inst/tiledb PKG_CPPFLAGS = -I. -I../inst/include -I$(RWINLIB)/include -I$(RWINLIB)/include/tiledb -DTILEDB_STATIC_DEFINE -DTILEDB_SILENT_BUILD PKG_LIBS = \ diff --git a/tools/winlibs.R b/tools/winlibs.R index 080b44b3c1..a418cddb9c 100644 --- a/tools/winlibs.R +++ b/tools/winlibs.R @@ -5,14 +5,21 @@ if (!file.exists(dcffile)) stop("TileDB Version file not found.") dcf <- read.dcf(dcffile) ver <- dcf[[1, "version"]] -if (!file.exists("../windows/rwinlib-tiledb/include/tiledb/tiledb.h")) { +# if (!file.exists("../windows/rwinlib-tiledb/include/tiledb/tiledb.h")) { +if (!file.exists("../inst/tiledb/include/tiledb/tiledb.h")) { if (getRversion() < "4") stop("This package requires Rtools40 or newer") - op <- options() - options(timeout=180) # CRAN request to have patient download settings - download.file(sprintf("https://github.com/TileDB-Inc/rwinlib-tiledb/archive/v%s.zip", ver), "lib.zip", quiet = TRUE) + op <- options(timeout = 180) # CRAN request to have patient download settings + zipfile <- tempfile(tmpdir = tempdir(check = TRUE), fileext = '.zip') + download.file( + sprintf("https://github.com/TileDB-Inc/rwinlib-tiledb/archive/v%s.zip", ver), + destfile = zipfile, + quiet = TRUE + ) options(op) - dir.create("../windows", showWarnings = FALSE) - unzip("lib.zip", exdir = "../windows") - file.rename(sprintf("../windows/rwinlib-tiledb-%s", ver), "../windows/rwinlib-tiledb") - unlink("lib.zip") + # dir.create("../windows", showWarnings = FALSE) + # unzip("lib.zip", exdir = "../windows") + unzip(zipfile, exdir = "../inst") + # file.rename(sprintf("../windows/rwinlib-tiledb-%s", ver), "../windows/rwinlib-tiledb") + file.rename(sprintf("../inst/rwinlib-tiledb-%s", ver), "../inst/tiledb") + unlink(zipfile, force = TRUE) }