Browse code

replace system dependency libhdf5-dev with BioC package Rhdf5lib

Steffen Neumann authored on 03/01/2018 22:22:13
Showing 3 changed files

... ...
@@ -13,7 +13,6 @@ r_packages:
13 13
 
14 14
 apt_packages:
15 15
   - libnetcdf-dev
16
-  - libhdf5-dev
17 16
   - netcdf-bin
18 17
 
19 18
 # Set CXX1X for R-devel, as R-devel does not detect CXX1X support for gcc 4.6.3,
... ...
@@ -20,7 +20,7 @@ Depends: Rcpp (>= 0.10.1), methods, utils
20 20
 Imports: Biobase, BiocGenerics (>= 0.13.6), ProtGenerics (>= 1.9.1)
21 21
 Suggests: msdata (>= 0.15.1), RUnit, mzID, BiocStyle (>= 2.5.19), knitr, XML
22 22
 VignetteBuilder: knitr
23
-LinkingTo: Rcpp, zlibbioc
23
+LinkingTo: Rcpp, zlibbioc, Rhdf5lib
24 24
 RcppModules: Ramp, Pwiz, Ident
25 25
 SystemRequirements: C++11, GNU make, NetCDF
26 26
 URL: https://github.com/sneumann/mzR/
... ...
@@ -114,9 +114,11 @@ ARCH_OBJS=./boost/libs/filesystem/src/path_traits.o \
114 114
 ./boost_aux/boost/nowide/iostream.o
115 115
 ARCH_CPPFLAGS=-fpermissive -DWINDOWS_NATIVE -DWIN32 -DBOOST_HAS_WINTHREADS -DBOOST_THREAD_BUILD_LIB
116 116
 ARCH_LIBS=-lws2_32 -lz
117
+RHDF5_LIBS=$(shell echo 'Rhdf5lib::pkgconfig("PKG_CXX_LIBS")'| "${R_HOME}/bin/R" --vanilla --slave)  
117 118
 else
118 119
 ARCH_OBJS=./boost/libs/thread/src/pthread/once.o \
119 120
 ./boost/libs/thread/src/pthread/thread.o
121
+RHDF5_LIBS=`echo 'Rhdf5lib::pkgconfig("PKG_CXX_LIBS")'| "${R_HOME}/bin/R" --vanilla --slave`
120 122
 endif
121 123
 
122 124
 NC_CFLAGS=`nc-config --cflags || /bin/true`
... ...
@@ -140,7 +142,7 @@ PWIZ_LDFLAGS=-lhdf5_cpp -lpthread
140 142
 ## Use the R_HOME indirection to support installations of multiple R version
141 143
 PKG_CPPFLAGS=$(PWIZ_CPPFLAGS) $(NC_CFLAGS)  $(ARCH_CPPFLAGS)
142 144
 
143
-PKG_LIBS=$(PWIZ_LDFLAGS) $(NC_LIBS)  $(ARCH_LIBS)
145
+PKG_LIBS=$(PWIZ_LDFLAGS) $(RHDF5_LIBS) $(NC_LIBS)  $(ARCH_LIBS)
144 146
 
145 147
 all: clean $(SHLIB)
146 148