gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / freebayes-devendor-deps.patch
1 This patch is original to Guix, ongoing work to upstream bits as possible.
2
3 From 9acc56db5e7469f5976be38b52ba4993de98ee38 Mon Sep 17 00:00:00 2001
4 From: Efraim Flashner <efraim@flashner.co.il>
5 Date: Sun, 17 Jan 2021 13:27:17 +0200
6 Subject: [PATCH] devendor-dependants
7
8 ---
9 meson.build | 84 +++++++++++++++++++++++++++++++++++++++++------------
10 1 file changed, 66 insertions(+), 18 deletions(-)
11
12 diff --git a/meson.build b/meson.build
13 index f6bf242..bded4af 100644
14 --- a/meson.build
15 +++ b/meson.build
16 @@ -9,8 +9,13 @@ project('freebayes', ['cpp', 'c'],
17
18 zlib_dep = dependency('zlib')
19 lzma_dep = dependency('liblzma')
20 +simde_dep = dependency('simde')
21 bzip2_dep = dependency('bz2lib', required: false)
22 htslib_dep = dependency('htslib', required : false)
23 +tabixpp_dep = dependency('tabixpp', required : false)
24 +fastahack_dep = dependency('fastahack', required : false)
25 +smithwaterman_dep = dependency('smithwaterman', required : false)
26 +vcflib_dep = dependency('vcflib', required: false)
27 thread_dep = dependency('threads')
28
29 if htslib_dep.found()
30 @@ -59,6 +64,56 @@ else
31 ]
32 endif
33
34 +if tabixpp_dep.found()
35 + tabixpp_includes = ''
36 + tabixpp_src = []
37 +else
38 + tabixpp_includes = [
39 + 'vcflib/tabixpp',
40 + ]
41 + tabixpp_src = [
42 + 'vcflib/tabixpp/tabix.cpp',
43 + ]
44 +endif
45 +
46 +if vcflib_dep.found()
47 + vcflib_includes = ''
48 + vcflib_src = []
49 +else
50 + vcflib_includes = [
51 + 'vcflib/src',
52 + 'vcflib/multichoose',
53 + 'vcflib/filevercmp',
54 + ]
55 + vcflib_src = [
56 + 'vcflib/src/Variant.cpp',
57 + ]
58 +endif
59 +
60 +if fastahack_dep.found()
61 + fastahack_src = []
62 +else
63 + fastahack_src = [
64 + 'vcflib/fastahack/Fasta.cpp',
65 + 'vcflib/src/split.cpp',
66 + ]
67 +endif
68 +
69 +if smithwaterman_dep.found()
70 + smithwaterman_includes = ''
71 + smithwaterman_src = []
72 +else
73 + smithwaterman_includes = [
74 + 'vcflib/smithwaterman',
75 + ]
76 + smithwaterman_src = [
77 + 'vcflib/smithwaterman/SmithWatermanGotoh.cpp',
78 + 'vcflib/smithwaterman/disorder.cpp',
79 + 'vcflib/smithwaterman/Repeats.cpp',
80 + 'vcflib/smithwaterman/LeftAlign.cpp',
81 + 'vcflib/smithwaterman/IndelAllele.cpp',
82 + ]
83 +endif
84
85
86 #
87 @@ -105,23 +160,18 @@ seqlib_src = [
88 ]
89
90 vcflib_src = [
91 - 'vcflib/tabixpp/tabix.cpp',
92 - 'vcflib/src/Variant.cpp',
93 - 'vcflib/smithwaterman/SmithWatermanGotoh.cpp',
94 - 'vcflib/smithwaterman/disorder.cpp',
95 - 'vcflib/smithwaterman/Repeats.cpp',
96 - 'vcflib/smithwaterman/LeftAlign.cpp',
97 - 'vcflib/smithwaterman/IndelAllele.cpp',
98 + vcflib_src,
99 + tabixpp_src,
100 + smithwaterman_src,
101 ]
102
103 bamleftalign_src = [
104 'src/bamleftalign.cpp',
105 'src/IndelAllele.cpp',
106 'contrib/SeqLib/src/BamWriter.cpp',
107 - 'vcflib/fastahack/Fasta.cpp',
108 - 'vcflib/smithwaterman/LeftAlign.cpp',
109 - 'vcflib/smithwaterman/IndelAllele.cpp',
110 - 'vcflib/src/split.cpp',
111 + fastahack_src,
112 + smithwaterman_src,
113 + vcflib_src,
114 'src/LeftAlign.cpp',
115 ]
116
117 @@ -134,11 +184,9 @@ incdir = include_directories(
118 'ttmath',
119 'contrib',
120 'contrib/SeqLib',
121 - 'vcflib/src',
122 - 'vcflib/tabixpp',
123 - 'vcflib/smithwaterman',
124 - 'vcflib/multichoose',
125 - 'vcflib/filevercmp')
126 + tabixpp_includes,
127 + smithwaterman_includes,
128 + vcflib_includes)
129
130 c_args = ['-fpermissive','-w']
131 cpp_args = ['-fpermissive','-w','-Wc++14-compat']
132 @@ -152,7 +200,7 @@ executable('freebayes',
133 include_directories : incdir,
134 cpp_args : cpp_args,
135 c_args : c_args,
136 - dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep],
137 + dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, smithwaterman_dep, vcflib_dep, thread_dep],
138 install: true
139 )
140
141 @@ -165,7 +213,7 @@ executable('bamleftalign',
142 include_directories : incdir,
143 cpp_args : cpp_args,
144 c_args : c_args,
145 - dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep],
146 + dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, fastahack_dep, smithwaterman_dep, vcflib_dep, thread_dep],
147 install: true
148 )
149
150 --
151 2.30.0
152