Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / r-modules / patches / Rhdf5lib.patch
blob3516d57d7ff8ff5bc3228cb08cf9d8c830617f15
1 diff --git a/R/zzz.R b/R/zzz.R
2 index 97becd7..803ca39 100644
3 --- a/R/zzz.R
4 +++ b/R/zzz.R
5 @@ -20,7 +20,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
7 path <- Sys.getenv(
8 x = "RHDF5LIB_RPATH",
9 - unset = system.file("lib", package="Rhdf5lib", mustWork=TRUE)
10 + unset = ""
13 if (nzchar(.Platform$r_arch)) {
14 @@ -59,7 +59,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
15 sprintf('-L%s -lhdf5 %s',
16 patharch, winlibs)
17 }, {
18 - sprintf('"%s/libhdf5.a"%s%s',
19 + sprintf('-lhdf5',
20 patharch, .getSzipLoc(patharch), .getDynamicLinks())
23 @@ -70,7 +70,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
24 sprintf('-L%s -lhdf5_cpp -lhdf5 %s',
25 patharch, winlibs)
26 }, {
27 - sprintf('"%s/libhdf5_cpp.a" "%s/libhdf5.a"%s%s',
28 + sprintf('-lhdf5_cpp -lhdf5',
29 patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks())
32 @@ -81,7 +81,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
33 sprintf('-L%s -lhdf5_hl -lhdf5 %s',
34 patharch, winlibs)
35 }, {
36 - sprintf('"%s/libhdf5_hl.a" "%s/libhdf5.a"%s%s',
37 + sprintf('-lhdf5_hl -lhdf5',
38 patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks())
41 @@ -92,7 +92,7 @@ pkgconfig <- function(opt = c("PKG_CXX_LIBS", "PKG_C_LIBS", "PKG_CXX_HL_LIBS", "
42 sprintf('-L%s -lhdf5_hl_cpp -lhdf5_hl -lhdf5_cpp -lhdf5 %s',
43 patharch, winlibs)
44 }, {
45 - sprintf('"%s/libhdf5_hl_cpp.a" "%s/libhdf5_hl.a" "%s/libhdf5_cpp.a" "%s/libhdf5.a"%s%s',
46 + sprintf('-lhdf5_hl_cpp -lhdf5_hl -lhdf5_cpp -lhdf5',
47 patharch, patharch, patharch, patharch, .getSzipLoc(patharch), .getDynamicLinks())
50 @@ -124,6 +124,7 @@ getHdf5Version <- function() {
52 #' @keywords internal
53 .getDynamicLinks <- function() {
54 + return("")
55 sysname <- Sys.info()['sysname']
56 if(sysname == "Windows") {
57 links <- "-lz"
58 diff --git a/src/Makevars.in b/src/Makevars.in
59 index addb6a0..590784a 100644
60 --- a/src/Makevars.in
61 +++ b/src/Makevars.in
62 @@ -18,7 +18,7 @@ USER_LIB_DIR = ${R_PACKAGE_DIR}/lib${R_ARCH}/
64 PKG_CPPFLAGS = -I${USER_INCLUDE_DIR} ${ZLIB_INCLUDE}
65 PKG_CFLAGS = ${ZLIB_LIB}
66 -PKG_LIBS = "${USER_LIB_DIR}libhdf5.a" @SZIP_LIB@ -lz
67 +PKG_LIBS = -lhdf5 -lsz
71 @@ -26,7 +26,7 @@ all: $(SHLIB)
73 $(SHLIB): Rhdf5lib.o
75 -Rhdf5lib.o: copy-hdf5 @COPY_SZIP@
76 +Rhdf5lib.o:
78 copy-szip: copy-hdf5
79 cp hdf5/libaec-1.0.4/build/szip/lib/libsz.a "${USER_LIB_DIR}"