forked from UMCUGenetics/guix-additions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manta-use-system-htslib.patch
53 lines (50 loc) · 1.91 KB
/
manta-use-system-htslib.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
This patch originates from Debian:
https://anonscm.debian.org/cgit/debian-med/manta.git/tree/debian/patches/use_debian_packaged_htslib.patch
Author: Andreas Tille <tille@debian.org>
Last-Update: Tue, 15 Nov 2016 14:29:08 +0100
Description: Check for Debian packaged htslib
--- a/redist/CMakeLists.txt
+++ b/redist/CMakeLists.txt
@@ -58,42 +58,7 @@ endif()
#
# htslib
#
-set(HTSLIB_PREFIX "htslib-1.2.1-204-g8197cfd")
-superset(HTSLIB_DIR "${CMAKE_CURRENT_BINARY_DIR}/${HTSLIB_PREFIX}")
-superset(HTSLIB_LIBRARY "${HTSLIB_DIR}/libhts.a")
-
-add_custom_command(
- OUTPUT ${HTSLIB_DIR}
- COMMAND ${CMAKE_COMMAND} -E remove_directory "${HTSLIB_DIR}"
- COMMAND ${CMAKE_COMMAND} -E tar xjf "${THIS_REDIST_DIR}/${HTSLIB_PREFIX}.tar.bz2"
- DEPENDS ${THIS_ZLIB}
- COMMENT "Unpacking htslib library")
-
-set (HTSLIB_FINAL_TASK ${HTSLIB_DIR})
-
-if (NOT WIN32)
- # note that htslib ./configure CFLAGS="custom" will overwrite the standard "-g -O2 -Wall" CFLAGS, so
- # we need to restore at least the -O2 for reasonable library performance:
- add_custom_command(
- OUTPUT ${HTSLIB_LIBRARY}
- COMMAND ./configure CC="${CMAKE_C_COMPILER}" CFLAGS='-O2 -I"${ZLIB_DIR}"' LIBS="${ZLIB_LIBRARY}" >htslib.config.log
- COMMAND $(MAKE) lib-static bgzip htsfile tabix >htslib.build.log 2>htslib.build.error.log
- WORKING_DIRECTORY ${HTSLIB_DIR}
- DEPENDS ${HTSLIB_DIR}
- COMMENT "Building htslib library")
-
- set (HTSLIB_FINAL_TASK ${HTSLIB_LIBRARY})
-endif ()
-
-set(THIS_HTSLIB "${THIS_PROJECT_NAME}_htslib")
-add_custom_target(${THIS_HTSLIB} DEPENDS "${HTSLIB_FINAL_TASK}")
-
-
-if (NOT WIN32)
- install(PROGRAMS "${HTSLIB_DIR}/bgzip" DESTINATION "${THIS_LIBEXECDIR}")
- install(PROGRAMS "${HTSLIB_DIR}/htsfile" DESTINATION "${THIS_LIBEXECDIR}")
- install(PROGRAMS "${HTSLIB_DIR}/tabix" DESTINATION "${THIS_LIBEXECDIR}")
-endif ()
+superset(HTSLIB_LIBRARY "-fPIC -lhts")
#
# samtools