spack/var/spack/repos/builtin/packages/r-rhtslib/find_deps-1.16.patch
Glenn Johnson 725336ee48
Update and fix the r-rhtslib package (#14863)
This PR adds an updated version to the r-rhtslib package as well as fix
the build.

- add patches to use compiler flags from R
- add variables for bzip2 and xz dependencies
- use the spack Makeconf file when building the in-tree htslib
- make patchelf available to allow R to remove reference to temporary
  installation directory in htslib shared object
- Add new version of r-rsamtools as the r-rsamtools and r-rhtlib
  packages are closely paired.
2020-02-13 19:47:37 -06:00

19 lines
756 B
Diff

--- a/src/htslib-1.7/Makefile.Rhtslib 2020-02-08 13:25:34.000000000 -0600
+++ b/src/htslib-1.7/Makefile.Rhtslib 2020-02-08 21:02:01.434363322 -0600
@@ -37,13 +37,13 @@
# Default libraries to link if configure is not used
htslib_default_libs = -lz -lm -lbz2 -llzma
-CPPFLAGS += -D_FILE_OFFSET_BITS=64
+CPPFLAGS += -D_FILE_OFFSET_BITS=64 $(BZIP2_INCLUDE) $(XZ_INCLUDE)
# TODO: probably update cram code to make it compile cleanly with -Wc++-compat
# For testing strict C99 support add -std=c99 -D_XOPEN_SOURCE=600
#CFLAGS = -g -Wall -O2 -pedantic -std=c99 -D_XOPEN_SOURCE=600 -D__FUNCTION__=__func__
CFLAGS += -fpic
EXTRA_CFLAGS_PIC =
-#LDFLAGS =
+LDFLAGS += $(BZIP2_LIB) $(XZ_LIB)
LIBS = $(htslib_default_libs)
prefix = /usr/local