1 |
commit: 3c65e999c45f956a48f434581ed74f27732c9c2a |
2 |
Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
3 |
AuthorDate: Mon Feb 18 13:44:27 2019 +0000 |
4 |
Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz> |
5 |
CommitDate: Mon Feb 18 13:44:27 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=3c65e999 |
7 |
|
8 |
sci-biology/bowtie: add some compile patches from Debian |
9 |
|
10 |
Seems both bowtie1 and bowtie2 are bound too much to SeqAn-1.1 |
11 |
and need more patches for SeqAn-1.4. Per reports on github |
12 |
it seems one should be able to compile bowtie-1.2.2 using |
13 |
-std=c++03 (but not me). |
14 |
|
15 |
Package-Manager: Portage-2.3.59, Repoman-2.3.12 |
16 |
Signed-off-by: Martin Mokrejs <mmokrejs <AT> fold.natur.cuni.cz> |
17 |
|
18 |
sci-biology/bowtie/bowtie-1.2.2.ebuild | 77 ++++++++++++++++++++++ |
19 |
sci-biology/bowtie/bowtie-2.3.4.3.ebuild | 62 +++++++++++++++++ |
20 |
.../files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch | 17 +++++ |
21 |
.../files/bowtie-1.2.2-fix-Intel-compilation.patch | 32 +++++++++ |
22 |
.../bowtie/files/bowtie-1.2.2-unbundle-seqan.patch | 14 ++++ |
23 |
.../bowtie/files/bowtie-1.2.2-void2int.patch | 16 +++++ |
24 |
sci-biology/bowtie/metadata.xml | 16 +++++ |
25 |
7 files changed, 234 insertions(+) |
26 |
|
27 |
diff --git a/sci-biology/bowtie/bowtie-1.2.2.ebuild b/sci-biology/bowtie/bowtie-1.2.2.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000..cae085bff |
30 |
--- /dev/null |
31 |
+++ b/sci-biology/bowtie/bowtie-1.2.2.ebuild |
32 |
@@ -0,0 +1,77 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+inherit flag-o-matic toolchain-funcs |
39 |
+ |
40 |
+DESCRIPTION="Popular short read aligner for Next-generation sequencing data" |
41 |
+HOMEPAGE="http://bowtie-bio.sourceforge.net/" |
42 |
+SRC_URI="mirror://sourceforge/bowtie-bio/${P}-src.zip" |
43 |
+ |
44 |
+LICENSE="Artistic" |
45 |
+SLOT="1" |
46 |
+KEYWORDS="" |
47 |
+ |
48 |
+IUSE="examples +tbb" |
49 |
+ |
50 |
+RDEPEND="tbb? ( dev-cpp/tbb )" |
51 |
+DEPEND="${RDEPEND} |
52 |
+ sci-biology/seqan:1.4 |
53 |
+ app-arch/unzip" |
54 |
+ |
55 |
+DOCS=( AUTHORS NEWS TUTORIAL doc/README ) |
56 |
+HTML_DOCS=( doc/{manual.html,style.css} ) |
57 |
+ |
58 |
+PATCHES=( |
59 |
+ "${FILESDIR}/${P}-_ContextLss-1.1-1.4.patch" |
60 |
+ "${FILESDIR}/${P}-fix-Intel-compilation.patch" |
61 |
+ "${FILESDIR}/${P}-unbundle-seqan.patch" |
62 |
+) |
63 |
+# other patches to be still considered |
64 |
+# "${FILESDIR}/${P}-fix-setBegin-call.patch" |
65 |
+# "${FILESDIR}/${P}-seqan-popcount.patch" |
66 |
+# "${FILESDIR}/${P}-seqan-rename-ChunkPool.patch" |
67 |
+# "${FILESDIR}/${P}-seqan-rename-fill-to-resize.patch" |
68 |
+# "${FILESDIR}/${P}-spelling.patch" |
69 |
+# "${FILESDIR}/${P}-tbb-tinythread-missing.patch" |
70 |
+#) |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ default |
74 |
+ |
75 |
+ # remove bundled libraries, use system seqan 1.4 |
76 |
+ rm -rf SeqAn-1.1/ third_party/ || die |
77 |
+ |
78 |
+ # innocuous non-security flags, prevent log pollution |
79 |
+ append-cxxflags \ |
80 |
+ -Wno-unused-local-typedefs \ |
81 |
+ -Wno-unused-but-set-variable \ |
82 |
+ -Wno-unused-variable |
83 |
+} |
84 |
+ |
85 |
+src_compile() { |
86 |
+ emake \ |
87 |
+ CC="$(tc-getCC)" \ |
88 |
+ CPP="$(tc-getCXX)" \ |
89 |
+ CFLAGS="" \ |
90 |
+ CXXFLAGS="" \ |
91 |
+ EXTRA_FLAGS="${LDFLAGS}" \ |
92 |
+ RELEASE_FLAGS="${CXXFLAGS}" \ |
93 |
+ WITH_TBB="$(usex tbb 1 0)" |
94 |
+} |
95 |
+ |
96 |
+src_install() { |
97 |
+ dobin ${PN} ${PN}-* |
98 |
+ |
99 |
+ exeinto /usr/libexec/${PN} |
100 |
+ doexe scripts/* |
101 |
+ |
102 |
+ newman MANUAL ${PN}.1 |
103 |
+ einstalldocs |
104 |
+ |
105 |
+ if use examples; then |
106 |
+ insinto /usr/share/${PN} |
107 |
+ doins -r genomes indexes |
108 |
+ fi |
109 |
+} |
110 |
|
111 |
diff --git a/sci-biology/bowtie/bowtie-2.3.4.3.ebuild b/sci-biology/bowtie/bowtie-2.3.4.3.ebuild |
112 |
new file mode 100644 |
113 |
index 000000000..eea3059cf |
114 |
--- /dev/null |
115 |
+++ b/sci-biology/bowtie/bowtie-2.3.4.3.ebuild |
116 |
@@ -0,0 +1,62 @@ |
117 |
+# Copyright 1999-2019 Gentoo Authors |
118 |
+# Distributed under the terms of the GNU General Public License v2 |
119 |
+ |
120 |
+EAPI=6 |
121 |
+ |
122 |
+inherit toolchain-funcs |
123 |
+ |
124 |
+DESCRIPTION="Popular short read aligner for Next-generation sequencing data" |
125 |
+HOMEPAGE="http://bowtie-bio.sourceforge.net/bowtie2/" |
126 |
+SRC_URI="mirror://sourceforge/project/${PN}-bio/${PN}2/${PV}/${PN}2-${PV}-source.zip" |
127 |
+ |
128 |
+LICENSE="GPL-3" |
129 |
+SLOT="2" |
130 |
+KEYWORDS="" |
131 |
+ |
132 |
+IUSE="examples cpu_flags_x86_sse2 +tbb" |
133 |
+ |
134 |
+RDEPEND="dev-lang/perl |
135 |
+ tbb? ( dev-cpp/tbb )" |
136 |
+DEPEND="${RDEPEND} |
137 |
+ app-arch/unzip |
138 |
+ sys-libs/readline" |
139 |
+ |
140 |
+S="${WORKDIR}/${PN}2-${PV}" |
141 |
+ |
142 |
+DOCS=( AUTHORS NEWS TUTORIAL ) |
143 |
+HTML_DOCS=( doc/{manual.html,style.css} ) |
144 |
+#PATCHES=( "${FILESDIR}/${P}-fix-c++14.patch" ) # needs 2.3.4.3 update |
145 |
+ |
146 |
+pkg_pretend() { |
147 |
+ if ! use cpu_flags_x86_sse2 ; then |
148 |
+ eerror "This package requires a CPU supporting the SSE2 instruction set." |
149 |
+ die "SSE2 support missing" |
150 |
+ fi |
151 |
+} |
152 |
+ |
153 |
+src_compile() { |
154 |
+ emake \ |
155 |
+ CC="$(tc-getCC)" \ |
156 |
+ CPP="$(tc-getCXX)" \ |
157 |
+ CXX="$(tc-getCXX)" \ |
158 |
+ CFLAGS="" \ |
159 |
+ CXXFLAGS="" \ |
160 |
+ EXTRA_FLAGS="${LDFLAGS}" \ |
161 |
+ RELEASE_FLAGS="${CXXFLAGS} -msse2" \ |
162 |
+ WITH_TBB="$(usex tbb 1 0)" |
163 |
+} |
164 |
+ |
165 |
+src_install() { |
166 |
+ dobin ${PN}2 ${PN}2-* |
167 |
+ |
168 |
+ exeinto /usr/libexec/${PN}2 |
169 |
+ doexe scripts/* |
170 |
+ |
171 |
+ newman MANUAL ${PN}2.1 |
172 |
+ einstalldocs |
173 |
+ |
174 |
+ if use examples; then |
175 |
+ insinto /usr/share/${PN}2 |
176 |
+ doins -r example |
177 |
+ fi |
178 |
+} |
179 |
|
180 |
diff --git a/sci-biology/bowtie/files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch b/sci-biology/bowtie/files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch |
181 |
new file mode 100644 |
182 |
index 000000000..4bcd61ba3 |
183 |
--- /dev/null |
184 |
+++ b/sci-biology/bowtie/files/bowtie-1.2.2-_ContextLss-1.1-1.4.patch |
185 |
@@ -0,0 +1,17 @@ |
186 |
+Description: Change class name of _Context_LSS |
187 |
+ New version 1.4 of SeQan uses a different name of the class. |
188 |
+Forwarded: no |
189 |
+Author: Gert Wollny <gw.fossdev@×××××.com> |
190 |
+Last-Update: 2014-100-06 |
191 |
+ |
192 |
+--- bowtie-1.2.2/diff_sample.h 2017-11-03 01:25:56.000000000 +0100 |
193 |
++++ bowtie-1.2.2/diff_sample.h 2019-02-18 12:50:37.894674282 +0100 |
194 |
+@@ -979,7 +979,7 @@ |
195 |
+ { |
196 |
+ Timer timer(cout, " Invoking Larsson-Sadakane on ranks time: ", this->verbose()); |
197 |
+ VMSG_NL(" Invoking Larsson-Sadakane on ranks"); |
198 |
+- _Context_LSS<TIndexOff> c; |
199 |
++ ContextLss_<TIndexOff> c; |
200 |
+ c.suffixsort( |
201 |
+ (TIndexOff*)begin(_isaPrime, Standard()), |
202 |
+ (TIndexOff*)begin(sPrime, Standard()), |
203 |
|
204 |
diff --git a/sci-biology/bowtie/files/bowtie-1.2.2-fix-Intel-compilation.patch b/sci-biology/bowtie/files/bowtie-1.2.2-fix-Intel-compilation.patch |
205 |
new file mode 100644 |
206 |
index 000000000..75942efb5 |
207 |
--- /dev/null |
208 |
+++ b/sci-biology/bowtie/files/bowtie-1.2.2-fix-Intel-compilation.patch |
209 |
@@ -0,0 +1,32 @@ |
210 |
+fix compilation errors with Intel compilers: |
211 |
+error: no operator "=" matches these operands |
212 |
+author: Ward Poelmans |
213 |
+--- bowtie-1.2.2/hit.h 2018-01-24 12:57:47.135575442 +0100 |
214 |
++++ bowtie-1.2.2/hit.h 2018-01-24 12:57:58.615869774 +0100 |
215 |
+@@ -640,10 +640,26 @@ |
216 |
+ s.moveTo(btString); |
217 |
+ } |
218 |
+ |
219 |
++ batch(const batch &other) |
220 |
++ { |
221 |
++ batchId = other.batchId; |
222 |
++ isWritten = other.isWritten; |
223 |
++ btString = other.btString; |
224 |
++ } |
225 |
++ |
226 |
+ bool operator<(const batch& other) const { |
227 |
+ return batchId < other.batchId; |
228 |
+ } |
229 |
+ |
230 |
++ batch& operator=(batch&& other) { |
231 |
++ if (&other != this) { |
232 |
++ batchId = other.batchId; |
233 |
++ isWritten = other.isWritten; |
234 |
++ other.btString.moveTo(btString); |
235 |
++ } |
236 |
++ return *this; |
237 |
++ } |
238 |
++ |
239 |
+ batch& operator=(batch& other) { |
240 |
+ if (&other != this) { |
241 |
+ batchId = other.batchId; |
242 |
|
243 |
diff --git a/sci-biology/bowtie/files/bowtie-1.2.2-unbundle-seqan.patch b/sci-biology/bowtie/files/bowtie-1.2.2-unbundle-seqan.patch |
244 |
new file mode 100644 |
245 |
index 000000000..b1a5f98f5 |
246 |
--- /dev/null |
247 |
+++ b/sci-biology/bowtie/files/bowtie-1.2.2-unbundle-seqan.patch |
248 |
@@ -0,0 +1,14 @@ |
249 |
+--- bowtie-1.2.2/Makefile 2019-02-18 13:26:29.490835084 +0100 |
250 |
++++ bowtie-1.2.2/Makefile 2019-02-18 13:28:36.864742545 +0100 |
251 |
+@@ -5,10 +5,7 @@ |
252 |
+ prefix = /usr/local |
253 |
+ bindir = $(prefix)/bin |
254 |
+ |
255 |
+-SEQAN_DIR = ./SeqAn-1.1 |
256 |
+-# treat SeqAn as a sysdir to suppress warnings |
257 |
+-SEQAN_INC = -isystem $(SEQAN_DIR) |
258 |
+-INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) $(SEQAN_INC) -I third_party |
259 |
++INC = $(if $(RELEASE_BUILD),-I$(CURDIR)/.include) `pkg-config --cflags seqan-1.4` -I third_party |
260 |
+ CPP = g++ |
261 |
+ CXX = $(CPP) |
262 |
+ CC = gcc |
263 |
|
264 |
diff --git a/sci-biology/bowtie/files/bowtie-1.2.2-void2int.patch b/sci-biology/bowtie/files/bowtie-1.2.2-void2int.patch |
265 |
new file mode 100644 |
266 |
index 000000000..822b673ae |
267 |
--- /dev/null |
268 |
+++ b/sci-biology/bowtie/files/bowtie-1.2.2-void2int.patch |
269 |
@@ -0,0 +1,16 @@ |
270 |
+#The latest Intel compiler (2016,2017) complains about the incompatibility of "void *" argument |
271 |
+#being incompatible with parameter of type "int *" |
272 |
+#M. Fujinaga (fujinaga@××××××××.ca) |
273 |
+--- processor_support.h 2017-02-02 21:48:42.436432756 +0000 |
274 |
++++ processor_support.h 2017-02-02 21:48:54.419309743 +0000 |
275 |
+@@ -44,8 +44,8 @@ |
276 |
+ |
277 |
+ try { |
278 |
+ #if ( defined(USING_INTEL_COMPILER) || defined(USING_MSC_COMPILER) ) |
279 |
+- __cpuid((void *) ®s,0); // test if __cpuid() works, if not catch the exception |
280 |
+- __cpuid((void *) ®s,0x1); // POPCNT bit is bit 23 in ECX |
281 |
++ __cpuid((int *) ®s,0); // test if __cpuid() works, if not catch the exception |
282 |
++ __cpuid((int *) ®s,0x1); // POPCNT bit is bit 23 in ECX |
283 |
+ #elif defined(USING_GCC_COMPILER) |
284 |
+ __get_cpuid(0x1, ®s.EAX, ®s.EBX, ®s.ECX, ®s.EDX); |
285 |
+ #else |
286 |
|
287 |
diff --git a/sci-biology/bowtie/metadata.xml b/sci-biology/bowtie/metadata.xml |
288 |
new file mode 100644 |
289 |
index 000000000..71e8d3bb8 |
290 |
--- /dev/null |
291 |
+++ b/sci-biology/bowtie/metadata.xml |
292 |
@@ -0,0 +1,16 @@ |
293 |
+<?xml version="1.0" encoding="UTF-8"?> |
294 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
295 |
+<pkgmetadata> |
296 |
+ <maintainer type="project"> |
297 |
+ <email>sci-biology@g.o</email> |
298 |
+ <name>Gentoo Biology Project</name> |
299 |
+ </maintainer> |
300 |
+ <upstream> |
301 |
+ <remote-id type="sourceforge">bowtie-bio</remote-id> |
302 |
+ </upstream> |
303 |
+ <use> |
304 |
+ <flag name="tbb">Enables building bowtie with the Intel |
305 |
+ Threading Building Blocks from <pkg>dev-cpp/tbb</pkg>. This |
306 |
+ flag is recommended.</flag> |
307 |
+ </use> |
308 |
+</pkgmetadata> |