Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/cd-hit/files/, sci-biology/cd-hit/
Date: Sat, 25 Feb 2017 19:19:36
Message-Id: 1488050312.348f9c5b9150fcbc7aac389c76e9ed702395c066.soap@gentoo
1 commit: 348f9c5b9150fcbc7aac389c76e9ed702395c066
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 25 19:15:53 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 25 19:18:32 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=348f9c5b
7
8 sci-biology/cd-hit: Version bump to 4.6.6
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 sci-biology/cd-hit/Manifest | 1 +
13 sci-biology/cd-hit/cd-hit-4.6.6.ebuild | 48 +++++
14 .../files/cd-hit-4.6.6-fix-build-system.patch | 122 ++++++++++++
15 .../files/cd-hit-4.6.6-fix-perl-shebangs.patch | 219 +++++++++++++++++++++
16 4 files changed, 390 insertions(+)
17
18 diff --git a/sci-biology/cd-hit/Manifest b/sci-biology/cd-hit/Manifest
19 index 5d2ddfeed2..b671c47b32 100644
20 --- a/sci-biology/cd-hit/Manifest
21 +++ b/sci-biology/cd-hit/Manifest
22 @@ -1,3 +1,4 @@
23 +DIST cd-hit-4.6.6.tar.gz 1152570 SHA256 97946f8ae62c3efa20ad4c527b8ea22200cf1b75c9941fb14de2bdaf1d6910f1 SHA512 8241d6674fb041559792dbbb58c12b41302d2275d3bacb1362946094b48a0b8e1236e71b5dc77d13405220b60f8253e6f996753a8b051995a72c8353d4333c51 WHIRLPOOL 4ee404e34a9c22aef0b809568aa1a7cefcd8d08e4a8c97d1c65b7692ae14b0567e5cc446054083219b56e89895117f69f786e6183f6c67d03d1f8404f7ba9632
24 DIST cd-hit-v4.5.1-2011-01-31.tgz 368740 SHA256 c1c3a3a772fc683fec3ff1763fdeec62a0a2a3925124f7a723fe3b271da35281 SHA512 84beba384eb6e9bcf94c7e2ca63f862493fc0d058ad186752524a09016e01274229ca9b7a5275cd5454f54488235a6949e17090ffbf68ff441a613dbe5cf05a8 WHIRLPOOL 698d72f347b92091ade411bdbf540f4b4eeea6c742d3766e891bede7f1aa03024bd2f611a4235a6dec0ed9b9b5e06b3d69a7b8e6a7ab7d8139297b5a8b0da9d2
25 DIST cd-hit-v4.5.4-2011-03-07.tgz 370264 SHA256 6de9074fada3c5f8109b670b8bdf96679dab45b841d36270d6c5e61a34284f6a SHA512 a093d15e26d6e226e5b37e43ed36affe58c0ee265bd43fd2098a39eafb54c7154ee1a7585da785324dc57532abe3401d48ad5a4a2de080fa6e1422091083683a WHIRLPOOL 3e2ea2db07ecc553d5f03f13a1092e85211257fb4a681629be0350d9cc3f3cc384d24bdb8b3e31d3f469fbc93070363afee608904b9ce3956ca24a8fa6d4d8e5
26 DIST cd-hit-v4.6-2012-04-25.tgz 652228 SHA256 aa91e57bba61f04db39e83cdd6c8cdf082a006ea8c4c818b956b7531e4bcc2e9 SHA512 1004a4190643b6f5f1da067a4b911abc068d0bf7d909edd84f45d5fe9a1b17eb3276c0ddde391cbc5053a9ab979d09cbbe832615b7cce4fc2aeefce1d1bec52c WHIRLPOOL 1c7a50e40e9753c035a2920af09b024e9403f4a7cf1a801b998afd5b64189256857a236439f5b2935603fd4a691a722a9d74c3a373ab66c79faee9d8335834b4
27
28 diff --git a/sci-biology/cd-hit/cd-hit-4.6.6.ebuild b/sci-biology/cd-hit/cd-hit-4.6.6.ebuild
29 new file mode 100644
30 index 0000000000..49bea96899
31 --- /dev/null
32 +++ b/sci-biology/cd-hit/cd-hit-4.6.6.ebuild
33 @@ -0,0 +1,48 @@
34 +# Copyright 1999-2017 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +# $Id$
37 +
38 +EAPI=6
39 +
40 +inherit flag-o-matic toolchain-funcs
41 +
42 +RELDATE="2016-0711"
43 +RELEASE="${PN}-v${PV}-${RELDATE}"
44 +
45 +DESCRIPTION="Clustering Database at High Identity with Tolerance"
46 +HOMEPAGE="http://weizhong-lab.ucsd.edu/cd-hit/"
47 +SRC_URI="https://github.com/weizhongli/cdhit/releases/download/V${PV}/${RELEASE}.tar.gz -> ${P}.tar.gz"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
52 +IUSE="openmp"
53 +
54 +RDEPEND="dev-lang/perl"
55 +
56 +S="${WORKDIR}"/${RELEASE}
57 +
58 +PATCHES=(
59 + "${FILESDIR}"/${PN}-4.6.6-fix-perl-shebangs.patch
60 + "${FILESDIR}"/${PN}-4.6.6-fix-build-system.patch
61 +)
62 +
63 +pkg_pretend() {
64 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
65 +}
66 +
67 +pkg_setup() {
68 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
69 +}
70 +
71 +src_compile() {
72 + tc-export CXX
73 + emake openmp=$(usex openmp)
74 +}
75 +
76 +src_install() {
77 + dodir /usr/bin
78 + PREFIX="${EPREFIX}"/usr/bin default
79 +
80 + dodoc doc/*.pdf
81 +}
82
83 diff --git a/sci-biology/cd-hit/files/cd-hit-4.6.6-fix-build-system.patch b/sci-biology/cd-hit/files/cd-hit-4.6.6-fix-build-system.patch
84 new file mode 100644
85 index 0000000000..c668d5c615
86 --- /dev/null
87 +++ b/sci-biology/cd-hit/files/cd-hit-4.6.6-fix-build-system.patch
88 @@ -0,0 +1,122 @@
89 +Fix build system, in order to honour user variables
90 +
91 +--- a/makefile
92 ++++ b/makefile
93 +@@ -1,7 +1,4 @@
94 +-
95 +-CC = g++ -Wall -ggdb
96 +-CC = g++ -pg
97 +-CC = g++
98 ++CXX ?= g++
99 +
100 + # without OpenMP
101 +
102 +@@ -9,35 +6,19 @@
103 + # in command line:
104 + # make openmp=yes
105 + ifeq ($(openmp),no)
106 +- CCFLAGS = -DNO_OPENMP
107 +-else
108 +- CCFLAGS = -fopenmp
109 +-endif
110 +-
111 +-# support debugging
112 +-# in command line:
113 +-# make debug=yes
114 +-# make openmp=yes debug=yes
115 +-ifeq ($(debug),yes)
116 +-CCFLAGS += -ggdb
117 ++ my_CPPFLAGS = -DNO_OPENMP
118 + else
119 +-CCFLAGS += -O2
120 ++ my_CXXFLAGS = -fopenmp
121 + endif
122 +
123 + ifdef MAX_SEQ
124 +-CCFLAGS += -DMAX_SEQ=$(MAX_SEQ)
125 ++my_CPPFLAGS += -DMAX_SEQ=$(MAX_SEQ)
126 + endif
127 +
128 +-#LDFLAGS = -static -o
129 +-LDFLAGS += -o
130 +-
131 + PROGS = cd-hit cd-hit-est cd-hit-2d cd-hit-est-2d cd-hit-div cd-hit-454
132 +
133 +-# Propagate hardening flags
134 +-CCFLAGS := $(CPPFLAGS) $(CCFLAGS) $(CXXFLAGS)
135 +-
136 + .c++.o:
137 +- $(CC) $(CCFLAGS) -c $<
138 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) -c $<
139 +
140 + all: $(PROGS)
141 +
142 +@@ -47,52 +28,52 @@
143 + # programs
144 +
145 + cd-hit: cdhit-common.o cdhit-utility.o cdhit.o
146 +- $(CC) $(CCFLAGS) cdhit.o cdhit-common.o cdhit-utility.o $(LDFLAGS) cd-hit
147 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) cdhit.o cdhit-common.o cdhit-utility.o -o cd-hit
148 +
149 + cd-hit-2d: cdhit-common.o cdhit-utility.o cdhit-2d.o
150 +- $(CC) $(CCFLAGS) cdhit-2d.o cdhit-common.o cdhit-utility.o $(LDFLAGS) cd-hit-2d
151 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) cdhit-2d.o cdhit-common.o cdhit-utility.o -o cd-hit-2d
152 +
153 + cd-hit-est: cdhit-common.o cdhit-utility.o cdhit-est.o
154 +- $(CC) $(CCFLAGS) cdhit-est.o cdhit-common.o cdhit-utility.o $(LDFLAGS) cd-hit-est
155 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) cdhit-est.o cdhit-common.o cdhit-utility.o -o cd-hit-est
156 +
157 + cd-hit-est-2d: cdhit-common.o cdhit-utility.o cdhit-est-2d.o
158 +- $(CC) $(CCFLAGS) cdhit-est-2d.o cdhit-common.o cdhit-utility.o $(LDFLAGS) cd-hit-est-2d
159 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) cdhit-est-2d.o cdhit-common.o cdhit-utility.o -o cd-hit-est-2d
160 +
161 + cd-hit-div: cdhit-common.o cdhit-utility.o cdhit-div.o
162 +- $(CC) $(CCFLAGS) cdhit-div.o cdhit-common.o cdhit-utility.o $(LDFLAGS) cd-hit-div
163 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) cdhit-div.o cdhit-common.o cdhit-utility.o -o cd-hit-div
164 +
165 + cd-hit-454: cdhit-common.o cdhit-utility.o cdhit-454.o
166 +- $(CC) $(CCFLAGS) cdhit-454.o cdhit-common.o cdhit-utility.o $(LDFLAGS) cd-hit-454
167 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) cdhit-454.o cdhit-common.o cdhit-utility.o -o cd-hit-454
168 +
169 + # objects
170 + cdhit-common.o: cdhit-common.c++ cdhit-common.h
171 +- $(CC) $(CCFLAGS) cdhit-common.c++ -c
172 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) cdhit-common.c++ -c
173 +
174 + cdhit-utility.o: cdhit-utility.c++ cdhit-utility.h
175 +- $(CC) $(CCFLAGS) cdhit-utility.c++ -c
176 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) cdhit-utility.c++ -c
177 +
178 + cdhit.o: cdhit.c++ cdhit-utility.h
179 +- $(CC) $(CCFLAGS) cdhit.c++ -c
180 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) cdhit.c++ -c
181 +
182 + cdhit-2d.o: cdhit-2d.c++ cdhit-utility.h
183 +- $(CC) $(CCFLAGS) cdhit-2d.c++ -c
184 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) cdhit-2d.c++ -c
185 +
186 + cdhit-est.o: cdhit-est.c++ cdhit-utility.h
187 +- $(CC) $(CCFLAGS) cdhit-est.c++ -c
188 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) cdhit-est.c++ -c
189 +
190 + cdhit-est-2d.o: cdhit-est-2d.c++ cdhit-utility.h
191 +- $(CC) $(CCFLAGS) cdhit-est-2d.c++ -c
192 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) cdhit-est-2d.c++ -c
193 +
194 + cdhit-div.o: cdhit-div.c++ cdhit-common.h
195 +- $(CC) $(CCFLAGS) cdhit-div.c++ -c
196 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) cdhit-div.c++ -c
197 +
198 + cdhit-454.o: cdhit-454.c++ cdhit-common.h
199 +- $(CC) $(CCFLAGS) cdhit-454.c++ -c
200 ++ $(CXX) $(my_CXXFLAGS) $(CXXFLAGS) $(my_CPPFLAGS) $(CPPFLAGS) cdhit-454.c++ -c
201 +
202 + PREFIX ?= /usr/local/bin
203 +
204 + install:
205 + for prog in $(PROGS); do \
206 +- install -m 0755 $$prog $(PREFIX); \
207 ++ install -m 0755 $$prog $(DESTDIR)$(PREFIX); \
208 + done
209 +- install -m 0755 *.pl $(PREFIX);
210 ++ install -m 0755 *.pl $(DESTDIR)$(PREFIX);
211
212 diff --git a/sci-biology/cd-hit/files/cd-hit-4.6.6-fix-perl-shebangs.patch b/sci-biology/cd-hit/files/cd-hit-4.6.6-fix-perl-shebangs.patch
213 new file mode 100644
214 index 0000000000..3784296f2e
215 --- /dev/null
216 +++ b/sci-biology/cd-hit/files/cd-hit-4.6.6-fix-perl-shebangs.patch
217 @@ -0,0 +1,219 @@
218 +Make perl shebangs more Prefix friendly
219 +See also: https://blogs.gentoo.org/mgorny/2016/02/08/a-quick-note-on-portable-shebangs/
220 +
221 +--- a/cd-hit-2d-para.pl
222 ++++ b/cd-hit-2d-para.pl
223 +@@ -1,4 +1,4 @@
224 +-#!/usr/bin/perl -w
225 ++#!/usr/bin/env perl
226 + # =============================================================================
227 + # CD-HIT
228 + # http://cd-hit.org/
229 +--- a/cd-hit-div.pl
230 ++++ b/cd-hit-div.pl
231 +@@ -1,4 +1,4 @@
232 +-#!/usr/bin/perl
233 ++#!/usr/bin/env perl
234 +
235 + #not like cd-hit-div, this script do not sort input
236 + #or throw away seq
237 +--- a/cd-hit-para.pl
238 ++++ b/cd-hit-para.pl
239 +@@ -1,4 +1,4 @@
240 +-#!/usr/bin/perl -w
241 ++#!/usr/bin/env perl
242 + # =============================================================================
243 + # CD-HIT
244 + # http://cd-hit.org/
245 +--- a/clstr2tree.pl
246 ++++ b/clstr2tree.pl
247 +@@ -1,4 +1,4 @@
248 +-#!/usr/bin/perl
249 ++#!/usr/bin/env perl
250 +
251 + $clstr = shift;
252 + $fr = shift; # for nr80.clstr $fr = 0.8
253 +--- a/clstr2txt.pl
254 ++++ b/clstr2txt.pl
255 +@@ -1,4 +1,4 @@
256 +-#!/usr/bin/perl
257 ++#!/usr/bin/env perl
258 +
259 + my $no = 0;
260 + my $clstr_no = "";
261 +--- a/clstr2xml.pl
262 ++++ b/clstr2xml.pl
263 +@@ -1,4 +1,4 @@
264 +-#!/usr/bin/perl
265 ++#!/usr/bin/env perl
266 +
267 + #usage: clstr_xml.pl [-len|-size] level1.clstr [level2.clstr level3.clstr ...]
268 + #purpose: to create xml file from cd-hit or hierarchical cd-hit(h-cd-hit) results
269 +--- a/clstr_cut.pl
270 ++++ b/clstr_cut.pl
271 +@@ -1,4 +1,4 @@
272 +-#!/usr/bin/perl
273 ++#!/usr/bin/env perl
274 +
275 + #keep only top $no proteins in cluster
276 +
277 +--- a/clstr_merge_noorder.pl
278 ++++ b/clstr_merge_noorder.pl
279 +@@ -1,4 +1,4 @@
280 +-#!/usr/bin/perl
281 ++#!/usr/bin/env perl
282 +
283 + # order of clusters don't need to be the same
284 + # but then I have to read everything into memory
285 +--- a/clstr_merge.pl
286 ++++ b/clstr_merge.pl
287 +@@ -1,4 +1,4 @@
288 +-#!/usr/bin/perl
289 ++#!/usr/bin/env perl
290 +
291 + # the order of clusters need to be identical
292 + my ($master_clstr, @clstr) = @ARGV;
293 +--- a/clstr_quality_eval_by_link.pl
294 ++++ b/clstr_quality_eval_by_link.pl
295 +@@ -1,4 +1,4 @@
296 +-#!/usr/bin/perl
297 ++#!/usr/bin/env perl
298 +
299 + ## calculate the sensitivity and specificity of clusters
300 + ## if the input fasta file has pre-defined classification term
301 +--- a/clstr_quality_eval.pl
302 ++++ b/clstr_quality_eval.pl
303 +@@ -1,4 +1,4 @@
304 +-#!/usr/bin/perl
305 ++#!/usr/bin/env perl
306 +
307 + ## calculate the sensitivity and specificity of clusters
308 + ## if the input fasta file has pre-defined classification term
309 +--- a/clstr_reduce.pl
310 ++++ b/clstr_reduce.pl
311 +@@ -1,4 +1,4 @@
312 +-#!/usr/bin/perl
313 ++#!/usr/bin/env perl
314 +
315 +
316 + $file90 = shift;
317 +--- a/clstr_renumber.pl
318 ++++ b/clstr_renumber.pl
319 +@@ -1,4 +1,4 @@
320 +-#!/usr/bin/perl
321 ++#!/usr/bin/env perl
322 + $no = 0;
323 + while($ll=<>){
324 + if ($ll =~ /^>Cluster (\d+)/) {
325 +--- a/clstr_rep.pl
326 ++++ b/clstr_rep.pl
327 +@@ -1,4 +1,4 @@
328 +-#!/usr/bin/perl
329 ++#!/usr/bin/env perl
330 +
331 + $rep = "";
332 + $no = 0;
333 +--- a/clstr_reps_faa_rev.pl
334 ++++ b/clstr_reps_faa_rev.pl
335 +@@ -1,4 +1,4 @@
336 +-#!/usr/bin/perl
337 ++#!/usr/bin/env perl
338 + # output single fasta file
339 + # for each cluster output at least $cutoff seqs
340 +
341 +--- a/clstr_rev.pl
342 ++++ b/clstr_rev.pl
343 +@@ -1,4 +1,4 @@
344 +-#!/usr/bin/perl
345 ++#!/usr/bin/env perl
346 + # if nr90 from nr100 and
347 + # nr80 from nr90, so I have nr90.clstr and nr80.clstr
348 + # but, in nr80.clstr, some gi numbers whose from nr100 are there
349 +--- a/clstr_select.pl
350 ++++ b/clstr_select.pl
351 +@@ -1,4 +1,4 @@
352 +-#!/usr/bin/perl
353 ++#!/usr/bin/env perl
354 +
355 + #my $by = shift;
356 + my $min;
357 +--- a/clstr_select_rep.pl
358 ++++ b/clstr_select_rep.pl
359 +@@ -1,4 +1,4 @@
360 +-#!/usr/bin/perl
361 ++#!/usr/bin/env perl
362 +
363 + #my $by = shift;
364 + my $min;
365 +--- a/clstr_size_histogram.pl
366 ++++ b/clstr_size_histogram.pl
367 +@@ -1,4 +1,4 @@
368 +-#!/usr/bin/perl
369 ++#!/usr/bin/env perl
370 +
371 + if(@ARGV==0){
372 + print "Usage:\n\tclstr_size_histogram.pl [-bin N] clstr_file\n";
373 +--- a/clstr_size_stat.pl
374 ++++ b/clstr_size_stat.pl
375 +@@ -1,4 +1,4 @@
376 +-#!/usr/bin/perl
377 ++#!/usr/bin/env perl
378 +
379 + if(@ARGV==0){
380 + print "Usage:\n\tclstr_size_stat.pl clstr_file\n";
381 +--- a/clstr_sort_by.pl
382 ++++ b/clstr_sort_by.pl
383 +@@ -1,4 +1,4 @@
384 +-#!/usr/bin/perl
385 ++#!/usr/bin/env perl
386 +
387 + my $sort_by_what = shift;
388 + $sort_by_what = "no" unless $sort_by_what;
389 +--- a/clstr_sort_prot_by.pl
390 ++++ b/clstr_sort_prot_by.pl
391 +@@ -1,4 +1,4 @@
392 +-#!/usr/bin/perl
393 ++#!/usr/bin/env perl
394 +
395 + my $sort_by = shift;
396 + $sort_by = "len" unless ($sort_by);
397 +--- a/clstr_sql_tbl.pl
398 ++++ b/clstr_sql_tbl.pl
399 +@@ -1,4 +1,4 @@
400 +-#!/usr/bin/perl
401 ++#!/usr/bin/env perl
402 +
403 + if(@ARGV==0){
404 + print "Usage:\n\tclstr_sql_tbl.pl clstr_file tbl_file\n";
405 +--- a/clstr_sql_tbl_sort.pl
406 ++++ b/clstr_sql_tbl_sort.pl
407 +@@ -1,4 +1,4 @@
408 +-#!/usr/bin/perl
409 ++#!/usr/bin/env perl
410 +
411 + if(@ARGV==0){
412 + print "Usage:\n\tclstr_sql_tbl_sort.pl table_file level\n";
413 +--- a/make_multi_seq.pl
414 ++++ b/make_multi_seq.pl
415 +@@ -1,4 +1,4 @@
416 +-#!/usr/bin/perl
417 ++#!/usr/bin/env perl
418 +
419 + #note you have to use "-d 0" in the cd-hit run
420 + #note you better to use "-g 1" in the cd-hit run
421 +--- a/plot_2d.pl
422 ++++ b/plot_2d.pl
423 +@@ -1,4 +1,4 @@
424 +-#!/usr/bin/perl
425 ++#!/usr/bin/env perl
426 +
427 + use Image::Magick;
428 +
429 +--- a/plot_len1.pl
430 ++++ b/plot_len1.pl
431 +@@ -1,4 +1,4 @@
432 +-#!/usr/bin/perl
433 ++#!/usr/bin/env perl
434 +
435 + $file90 = shift;
436 + $segs = shift;