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/samtools/, sci-biology/samtools/files/
Date: Sat, 02 Sep 2017 09:33:02
Message-Id: 1504344762.d401db74e7e270ab7e38d955308cd8d2dbc20a48.soap@gentoo
1 commit: d401db74e7e270ab7e38d955308cd8d2dbc20a48
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 2 09:30:07 2017 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 2 09:32:42 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d401db74
7
8 sci-biology/samtools: Version bump to 1.5
9
10 Package-Manager: Portage-2.3.8, Repoman-2.3.3
11
12 sci-biology/samtools/Manifest | 1 +
13 .../samtools/files/samtools-1.5-buildsystem.patch | 413 +++++++++++++++++++++
14 sci-biology/samtools/samtools-1.5.ebuild | 61 +++
15 3 files changed, 475 insertions(+)
16
17 diff --git a/sci-biology/samtools/Manifest b/sci-biology/samtools/Manifest
18 index d25774fee86..791e2050ee7 100644
19 --- a/sci-biology/samtools/Manifest
20 +++ b/sci-biology/samtools/Manifest
21 @@ -5,3 +5,4 @@ DIST samtools-1.0.tar.bz2 4459669 SHA256 7340b843663c3f54a902a06f2f73c68198f3a62
22 DIST samtools-1.1.tar.bz2 4495373 SHA256 c24d26c303153d72b5bf3cc11f72c6c375a4ca1140cc485648c8c5473414b7f8 SHA512 a5552a6c8c4b0808b725b39ddb2fafa36c4f6623bfc7f84faadae7690223e4eec8d722af09c77145796ad9b3f01e04115dd0207207ccfafbb52ffc22d5fc09f0 WHIRLPOOL ed3131b2a8d8b4dab40b53d35a9b00b657670a949dc1597c91fbcd00392c1c1715a85a1d1e49bf0c73ae082738ccfb13d2c6809dbbeba17ff3028f6023ebc449
23 DIST samtools-1.2.tar.bz2 4547126 SHA256 420e7a4a107fe37619b9d300b6379452eb8eb04a4a9b65c3ec69de82ccc26daa SHA512 4849c3274e732267516b63799f5430c5415d575d46eddf6b704dac51053281094b03b90dd9f5367bcd14c22fb0fb1bd6a412f7d4225f7be5f5385437c5d2101d WHIRLPOOL 273185764a807365a20c381769f987ef02d14ae8e20a3a7fd5af4344769c5fab68d7155523e8c0c8c3cc86092898c2c8454cce8f1560d415bc2b41549cdf04f4
24 DIST samtools-1.3.tar.bz2 3978333 SHA256 beea4003c795a0a25224656815b4036f6864b8753053ed30c590bb052b70b60e SHA512 72920d4f0f10aa7b54ef448e03e6e769e1e07abd07388a2307d0e52548fa2909c03ca2c7eec5c63cf5b67724b2356833accb0079ce1486bb2ac66a45963a24ea WHIRLPOOL 3f798078100b4ed164f6c89d18cc8f62159437e2cfb2a228ac00f8d08313f7c39ef546214c0796c25a419c0a1065dc21d14b966fed769726b9b1975ec07e3b3e
25 +DIST samtools-1.5.tar.bz2 4190142 SHA256 8542da26832ee08c1978713f5f6188ff750635b50d8ab126a0c7bb2ac1ae2df6 SHA512 ff3e39ba867ecbd88f3363b038508c1557e349ea4223483f8f4ecb17ff8864fb53cd193bc2059a147e30f07395bbf53c8518d0f70219e454375c8bffe56e3059 WHIRLPOOL 1a88c9617857f1f6d146df179aef5b5c6bb83de8c9d127c405e5756842ced84c194a3f09f69a4757a8adf6ca623c9fdc972f4bf609649d3e991dda8f616e3582
26
27 diff --git a/sci-biology/samtools/files/samtools-1.5-buildsystem.patch b/sci-biology/samtools/files/samtools-1.5-buildsystem.patch
28 new file mode 100644
29 index 00000000000..248089e09fc
30 --- /dev/null
31 +++ b/sci-biology/samtools/files/samtools-1.5-buildsystem.patch
32 @@ -0,0 +1,413 @@
33 +--- a/config.mk.in
34 ++++ b/config.mk.in
35 +@@ -28,27 +28,26 @@
36 + # in the Makefile to reflect your configuration choices. If you don't run
37 + # configure, the main Makefile contains suitable conservative defaults.
38 +
39 +-prefix = @prefix@
40 +-exec_prefix = @exec_prefix@
41 +-bindir = @bindir@
42 +-datarootdir = @datarootdir@
43 +-mandir = @mandir@
44 ++prefix = @prefix@
45 ++exec_prefix = @exec_prefix@
46 ++bindir = @bindir@
47 ++libdir = @libdir@
48 ++datarootdir = @datarootdir@
49 ++mandir = @mandir@
50 ++man1dir = $(mandir)/man1
51 +
52 + CC = @CC@
53 ++AR = @AR@
54 + CPPFLAGS = @CPPFLAGS@
55 + CFLAGS = @CFLAGS@
56 + LDFLAGS = @LDFLAGS@
57 + LIBS = @LIBS@
58 +
59 +-@Hsource@HTSDIR = @HTSDIR@
60 +-@Hsource@include $(HTSDIR)/htslib.mk
61 +-@Hsource@include $(HTSDIR)/htslib_static.mk
62 +-@Hsource@HTSLIB = $(HTSDIR)/libhts.a
63 +-@Hsource@HTSLIB_LIB = $(HTSLIB) $(HTSLIB_static_LIBS)
64 +-@Hsource@HTSLIB_LDFLAGS = $(HTSLIB_static_LDFLAGS)
65 +-@Hsource@BGZIP = $(HTSDIR)/bgzip
66 +-HTSLIB_CPPFLAGS = @HTSLIB_CPPFLAGS@
67 +-@Hinstall@HTSLIB_LDFLAGS = @HTSLIB_LDFLAGS@
68 +-@Hinstall@HTSLIB_LIB = -lhts
69 ++HTSLIB_CFLAGS = @HTSLIB_CFLAGS@
70 ++HTSLIB_LIBS = @HTSLIB_LIBS@
71 +
72 +-CURSES_LIB = @CURSES_LIB@
73 ++NCURSES_CFLAGS = @NCURSES_CFLAGS@
74 ++NCURSES_LIBS = @NCURSES_LIBS@
75 ++
76 ++ZLIB_CFLAGS = @ZLIB_CFLAGS@
77 ++ZLIB_LIBS = @ZLIB_LIBS@
78 +--- a/configure.ac
79 ++++ b/configure.ac
80 +@@ -29,9 +29,6 @@
81 + AC_CONFIG_SRCDIR([bamtk.c])
82 + AC_CONFIG_HEADERS([config.h])
83 +
84 +-m4_include([m4/ax_with_curses.m4])
85 +-m4_include([m4/ax_with_htslib.m4])
86 +-
87 + dnl Copyright notice to be copied into the generated configure script
88 + AC_COPYRIGHT([Portions copyright (C) 2015 Genome Research Ltd.
89 +
90 +@@ -39,73 +36,27 @@
91 + redistribute it. There is NO WARRANTY, to the extent permitted by law.])
92 +
93 + AC_PROG_CC
94 ++AM_PROG_AR
95 +
96 + AC_SYS_LARGEFILE
97 +
98 +-AX_WITH_HTSLIB
99 +-if test "$ax_cv_htslib" != yes; then
100 +- AC_MSG_ERROR([HTSlib development files not found
101 +-
102 +-Samtools uses HTSlib to parse bioinformatics file formats etc. Building it
103 +-requires an unpacked HTSlib source tree (which will be built in conjunction
104 +-with samtools) or a previously-installed HTSlib. In either case you may
105 +-need to configure --with-htslib=DIR to locate the appropriate HTSlib.
106 +-
107 +-FAILED. You must supply an HTSlib in order to build samtools successfully.])
108 +-fi
109 +-
110 +-if test "$ax_cv_htslib_which" = source; then
111 +- Hsource=
112 +- Hinstall='#'
113 +-else
114 +- Hsource='#'
115 +- Hinstall=
116 +-fi
117 +-AC_SUBST([Hsource])
118 +-AC_SUBST([Hinstall])
119 ++dnl htslib
120 ++PKG_CHECK_MODULES([HTSLIB], [htslib])
121 +
122 ++dnl ncurses
123 + AC_ARG_WITH([curses],
124 + [AS_HELP_STRING([--without-curses],
125 + [omit curses support, so no curses library needed])])
126 +
127 +-if test "$with_curses" != no; then
128 +- AX_WITH_CURSES
129 +- if test "$ax_cv_curses" != yes; then
130 +- AC_MSG_ERROR([curses development files not found
131 +-
132 +-The 'samtools tview' command uses the curses text user interface library.
133 +-Building samtools with tview requires curses/ncurses/etc development files
134 +-to be installed on the build machine; you may need to ensure a package such
135 +-as libncurses5-dev (on Debian or Ubuntu Linux) or ncurses-devel (on RPM-based
136 +-Linux distributions) is installed.
137 +-
138 +-FAILED. Either configure --without-curses or resolve this error to build
139 +-samtools successfully.])
140 +- fi
141 +-else
142 +- CURSES_LIB=
143 +- CURSES_CPPFLAGS=
144 +- AC_SUBST([CURSES_LIB])
145 +- AC_SUBST([CURSES_CPPFLAGS])
146 +-fi
147 +-
148 +-save_LIBS=$LIBS
149 +-zlib_devel=ok
150 +-dnl Set a trivial non-empty INCLUDES to avoid excess default includes tests
151 +-AC_CHECK_HEADER([zlib.h], [], [zlib_devel=missing], [;])
152 +-AC_CHECK_LIB(z, inflate, [], [zlib_devel=missing])
153 +-LIBS=$save_LIBS
154 +-
155 +-if test $zlib_devel != ok; then
156 +- AC_MSG_ERROR([zlib development files not found
157 +-
158 +-Samtools uses compression routines from the zlib library <http://zlib.net>.
159 +-Building samtools requires zlib development files to be installed on the build
160 +-machine; you may need to ensure a package such as zlib1g-dev (on Debian or
161 +-Ubuntu Linux) or zlib-devel (on RPM-based Linux distributions) is installed.
162 ++AS_IF([test "x$with_curses" != "xno"], [
163 ++ PKG_CHECK_MODULES([NCURSES], [ncurses])
164 ++
165 ++ AC_DEFINE([HAVE_CURSES], [1])
166 ++ AC_DEFINE([HAVE_NCURSES_H], [1])
167 ++])
168 +
169 +-FAILED. This error must be resolved in order to build samtools successfully.])
170 +-fi
171 ++dnl zlib
172 ++PKG_CHECK_MODULES([ZLIB], [zlib])
173 +
174 + AC_CONFIG_FILES([config.mk])
175 + AC_OUTPUT
176 +--- a/Makefile
177 ++++ b/Makefile
178 +@@ -21,14 +21,6 @@
179 + # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
180 + # DEALINGS IN THE SOFTWARE.
181 +
182 +-CC = gcc
183 +-AR = ar
184 +-CPPFLAGS =
185 +-#CFLAGS = -g -Wall -O2 -pedantic -std=c99 -D_XOPEN_SOURCE=600
186 +-CFLAGS = -g -Wall -O2
187 +-LDFLAGS =
188 +-LIBS =
189 +-
190 + LOBJS= bam_aux.o bam.o bam_import.o sam.o \
191 + sam_header.o bam_plbuf.o
192 + AOBJS= bam_index.o bam_plcmd.o sam_view.o \
193 +@@ -40,13 +32,6 @@
194 + bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o \
195 + bam_quickcheck.o bam_addrprg.o
196 +
197 +-prefix = /usr/local
198 +-exec_prefix = $(prefix)
199 +-bindir = $(exec_prefix)/bin
200 +-datarootdir = $(prefix)/share
201 +-mandir = $(datarootdir)/man
202 +-man1dir = $(mandir)/man1
203 +-
204 + # Installation location for $(MISC_PROGRAMS) and $(MISC_SCRIPTS)
205 + misc_bindir = $(bindir)
206 +
207 +@@ -85,15 +70,14 @@
208 +
209 + all: $(PROGRAMS) $(MISC_PROGRAMS) $(TEST_PROGRAMS)
210 +
211 +-ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS)
212 +-ALL_LDFLAGS = $(HTSLIB_LDFLAGS) $(LDFLAGS)
213 +-ALL_LIBS = -lz $(LIBS)
214 ++ALL_CPPFLAGS = -I. $(HTSLIB_CFLAGS) $(CPPFLAGS)
215 ++ALL_LIBS = $(ZLIB_LIBS) $(LIBS)
216 +
217 + # Usually config.mk and config.h are generated by running configure
218 + # or config.status, but if those aren't used create defaults here.
219 +
220 + config.mk:
221 +- @sed -e '/^prefix/,/^LIBS/d;s/@Hsource@//;s/@Hinstall@/#/;s#@HTSDIR@#htslib-1.5#g;s/@HTSLIB_CPPFLAGS@/-I$$(HTSDIR)/g;s/@CURSES_LIB@/-lcurses/g' config.mk.in > $@
222 ++ @sed -e '/^prefix/,/^LIBS/d;s/@Hsource@//;s/@Hinstall@/#/;s#@HTSDIR@#htslib-1.5#g;s/@HTSLIB_CFLAGS@/-I$$(HTSDIR)/g;s/@NCURSES_LIBS@/-lcurses/g' config.mk.in > $@
223 +
224 + config.h:
225 + echo '/* Basic config.h generated by Makefile */' > $@
226 +@@ -133,17 +117,22 @@
227 + .c.o:
228 + $(CC) $(CFLAGS) $(ALL_CPPFLAGS) -c -o $@ $<
229 +
230 ++$(LOBJS):
231 ++ $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $<
232 ++
233 +
234 + LIBST_OBJS = sam_opts.o sam_utils.o
235 +
236 +
237 +-lib:libbam.a
238 ++lib: libbam.so.1.0
239 +
240 +-libbam.a:$(LOBJS)
241 +- $(AR) -csru $@ $(LOBJS)
242 ++libbam.so.1.0:$(LOBJS)
243 ++ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,--soname,$@ -o $@ $(LOBJS) $(HTSLIB)
244 ++ ln -sf $@ libbam.so.1
245 ++ ln -sf $@ libbam.so
246 +
247 +-samtools: $(AOBJS) libbam.a libst.a $(HTSLIB)
248 +- $(CC) $(ALL_LDFLAGS) -o $@ $(AOBJS) libbam.a libst.a $(HTSLIB_LIB) $(CURSES_LIB) -lm $(ALL_LIBS) -lpthread
249 ++samtools: $(AOBJS) libbam.so.1.0 libst.a
250 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(AOBJS) libbam.so.1.0 libst.a $(HTSLIB_LIBS) $(NCURSES_LIBS) -lm $(ALL_LIBS) -lpthread
251 +
252 + # For building samtools and its test suite only: NOT to be installed.
253 + libst.a: $(LIBST_OBJS)
254 +@@ -151,58 +140,58 @@
255 + $(AR) -rcs $@ $(LIBST_OBJS)
256 +
257 +
258 +-bam_h = bam.h $(htslib_bgzf_h) $(htslib_sam_h)
259 +-bam2bcf_h = bam2bcf.h $(htslib_hts_h) $(htslib_vcf_h)
260 +-bam_lpileup_h = bam_lpileup.h $(htslib_sam_h)
261 +-bam_plbuf_h = bam_plbuf.h $(htslib_sam_h)
262 +-bam_tview_h = bam_tview.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) $(bam2bcf_h) $(htslib_khash_h) $(bam_lpileup_h)
263 +-sam_h = sam.h $(htslib_sam_h) $(bam_h)
264 +-sam_opts_h = sam_opts.h $(htslib_hts_h)
265 +-sample_h = sample.h $(htslib_kstring_h)
266 +-
267 +-bam.o: bam.c config.h $(bam_h) $(htslib_kstring_h) sam_header.h
268 +-bam2bcf.o: bam2bcf.c config.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_kstring_h) $(htslib_kfunc_h) $(bam2bcf_h)
269 +-bam2bcf_indel.o: bam2bcf_indel.c config.h $(htslib_hts_h) $(htslib_sam_h) $(bam2bcf_h) $(htslib_khash_h) $(htslib_ksort_h)
270 +-bam2depth.o: bam2depth.c config.h $(htslib_sam_h) samtools.h $(sam_opts_h)
271 +-bam_addrprg.o: bam_addrprg.c config.h $(htslib_sam_h) $(htslib_kstring_h) samtools.h $(sam_opts_h)
272 ++bam_h = bam.h
273 ++bam2bcf_h = bam2bcf.h
274 ++bam_lpileup_h = bam_lpileup.h
275 ++bam_plbuf_h = bam_plbuf.h
276 ++bam_tview_h = bam_tview.h $(bam2bcf_h) $(bam_lpileup_h)
277 ++sam_h = sam.h $(bam_h)
278 ++sam_opts_h = sam_opts.h
279 ++sample_h = sample.h
280 ++
281 ++bam.o: bam.c config.h $(bam_h) sam_header.h
282 ++bam2bcf.o: bam2bcf.c config.h $(bam2bcf_h)
283 ++bam2bcf_indel.o: bam2bcf_indel.c config.h $(bam2bcf_h)
284 ++bam2depth.o: bam2depth.c config.h samtools.h $(sam_opts_h)
285 ++bam_addrprg.o: bam_addrprg.c config.h samtools.h $(sam_opts_h)
286 + bam_aux.o: bam_aux.c config.h $(bam_h)
287 +-bam_cat.o: bam_cat.c config.h $(htslib_bgzf_h) $(htslib_sam_h) $(htslib_cram_h) $(htslib_khash_h) samtools.h
288 ++bam_cat.o: bam_cat.c config.h samtools.h
289 + bam_color.o: bam_color.c config.h $(bam_h)
290 +-bam_import.o: bam_import.c config.h $(htslib_kstring_h) $(bam_h) $(htslib_kseq_h)
291 +-bam_index.o: bam_index.c config.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_khash_h) samtools.h
292 +-bam_lpileup.o: bam_lpileup.c config.h $(bam_plbuf_h) $(bam_lpileup_h) $(htslib_ksort_h)
293 +-bam_mate.o: bam_mate.c config.h $(sam_opts_h) $(htslib_kstring_h) $(htslib_sam_h) samtools.h
294 +-bam_md.o: bam_md.c config.h $(htslib_faidx_h) $(htslib_sam_h) $(htslib_kstring_h) $(sam_opts_h) samtools.h
295 +-bam_plbuf.o: bam_plbuf.c config.h $(htslib_hts_h) $(htslib_sam_h) $(bam_plbuf_h)
296 +-bam_plcmd.o: bam_plcmd.c config.h $(htslib_sam_h) $(htslib_faidx_h) $(htslib_kstring_h) $(htslib_khash_str2int_h) sam_header.h samtools.h $(sam_opts_h) $(bam2bcf_h) $(sample_h)
297 +-bam_quickcheck.o: bam_quickcheck.c config.h $(htslib_hts_h) $(htslib_sam_h)
298 +-bam_reheader.o: bam_reheader.c config.h $(htslib_bgzf_h) $(htslib_sam_h) $(htslib_hfile_h) $(htslib_cram_h) samtools.h
299 +-bam_rmdup.o: bam_rmdup.c config.h $(htslib_sam_h) $(sam_opts_h) samtools.h $(bam_h) $(htslib_khash_h)
300 +-bam_rmdupse.o: bam_rmdupse.c config.h $(bam_h) $(htslib_sam_h) $(htslib_khash_h) $(htslib_klist_h) samtools.h
301 +-bam_sort.o: bam_sort.c config.h $(htslib_ksort_h) $(htslib_khash_h) $(htslib_klist_h) $(htslib_kstring_h) $(htslib_sam_h) $(sam_opts_h) samtools.h
302 +-bam_split.o: bam_split.c config.h $(htslib_sam_h) $(htslib_khash_h) $(htslib_kstring_h) $(htslib_cram_h) $(sam_opts_h) samtools.h
303 +-bam_stat.o: bam_stat.c config.h $(htslib_sam_h) samtools.h
304 +-bam_tview.o: bam_tview.c config.h $(bam_tview_h) $(htslib_faidx_h) $(htslib_sam_h) $(htslib_bgzf_h) samtools.h $(sam_opts_h)
305 ++bam_import.o: bam_import.c config.h $(bam_h)
306 ++bam_index.o: bam_index.c config.h samtools.h
307 ++bam_lpileup.o: bam_lpileup.c config.h $(bam_plbuf_h) $(bam_lpileup_h)
308 ++bam_mate.o: bam_mate.c config.h $(sam_opts_h) samtools.h
309 ++bam_md.o: bam_md.c config.h $(sam_opts_h) samtools.h
310 ++bam_plbuf.o: bam_plbuf.c config.h $(bam_plbuf_h)
311 ++bam_plcmd.o: bam_plcmd.c config.h sam_header.h samtools.h $(sam_opts_h) $(bam2bcf_h) $(sample_h)
312 ++bam_quickcheck.o: bam_quickcheck.c config.h
313 ++bam_reheader.o: bam_reheader.c config.h samtools.h
314 ++bam_rmdup.o: bam_rmdup.c config.h $(sam_opts_h) samtools.h $(bam_h)
315 ++bam_rmdupse.o: bam_rmdupse.c config.h $(bam_h) samtools.h
316 ++bam_sort.o: bam_sort.c config.h $(sam_opts_h) samtools.h
317 ++bam_split.o: bam_split.c config.h $(sam_opts_h) samtools.h
318 ++bam_stat.o: bam_stat.c config.h samtools.h
319 ++bam_tview.o: bam_tview.c config.h $(bam_tview_h) samtools.h $(sam_opts_h)
320 + bam_tview_curses.o: bam_tview_curses.c config.h $(bam_tview_h)
321 + bam_tview_html.o: bam_tview_html.c config.h $(bam_tview_h)
322 +-bam_flags.o: bam_flags.c config.h $(htslib_sam_h)
323 +-bamshuf.o: bamshuf.c config.h $(htslib_sam_h) $(htslib_hts_h) $(htslib_ksort_h) samtools.h $(sam_opts_h)
324 +-bamtk.o: bamtk.c config.h $(htslib_hts_h) samtools.h version.h
325 +-bedcov.o: bedcov.c config.h $(htslib_kstring_h) $(htslib_sam_h) $(sam_opts_h) $(htslib_kseq_h)
326 +-bedidx.o: bedidx.c config.h $(htslib_ksort_h) $(htslib_kseq_h) $(htslib_khash_h)
327 +-cut_target.o: cut_target.c config.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_faidx_h) samtools.h $(sam_opts_h)
328 +-dict.o: dict.c config.h $(htslib_kseq_h) $(htslib_hts_h)
329 +-faidx.o: faidx.c config.h $(htslib_faidx_h) samtools.h
330 +-padding.o: padding.c config.h $(htslib_kstring_h) $(htslib_sam_h) $(htslib_faidx_h) sam_header.h $(sam_opts_h) samtools.h
331 +-phase.o: phase.c config.h $(htslib_hts_h) $(htslib_sam_h) $(htslib_kstring_h) $(sam_opts_h) samtools.h $(htslib_kseq_h) $(htslib_khash_h) $(htslib_ksort_h)
332 +-sam.o: sam.c config.h $(htslib_faidx_h) $(sam_h)
333 +-sam_header.o: sam_header.c config.h sam_header.h $(htslib_khash_h)
334 ++bam_flags.o: bam_flags.c config.h
335 ++bamshuf.o: bamshuf.c config.h samtools.h $(sam_opts_h)
336 ++bamtk.o: bamtk.c config.h samtools.h version.h
337 ++bedcov.o: bedcov.c config.h $(sam_opts_h)
338 ++bedidx.o: bedidx.c config.h
339 ++cut_target.o: cut_target.c config.h samtools.h $(sam_opts_h)
340 ++dict.o: dict.c config.h
341 ++faidx.o: faidx.c config.h samtools.h
342 ++padding.o: padding.c config.h sam_header.h $(sam_opts_h) samtools.h
343 ++phase.o: phase.c config.h $(sam_opts_h) samtools.h
344 ++sam.o: sam.c config.h $(sam_h)
345 ++sam_header.o: sam_header.c config.h sam_header.h
346 + sam_opts.o: sam_opts.c config.h $(sam_opts_h)
347 + sam_utils.o: sam_utils.c config.h samtools.h
348 +-sam_view.o: sam_view.c config.h $(htslib_sam_h) $(htslib_faidx_h) $(htslib_kstring_h) $(htslib_khash_h) samtools.h $(sam_opts_h)
349 +-sample.o: sample.c config.h $(sample_h) $(htslib_khash_h)
350 +-stats_isize.o: stats_isize.c config.h stats_isize.h $(htslib_khash_h)
351 +-stats.o: stats.c config.h $(htslib_faidx_h) $(htslib_sam_h) $(htslib_hts_h) sam_header.h $(htslib_khash_str2int_h) samtools.h $(htslib_khash_h) $(htslib_kstring_h) stats_isize.h $(sam_opts_h)
352 ++sam_view.o: sam_view.c config.h samtools.h $(sam_opts_h)
353 ++sample.o: sample.c config.h $(sample_h)
354 ++stats_isize.o: stats_isize.c config.h stats_isize.h
355 ++stats.o: stats.c config.h sam_header.h samtools.h stats_isize.h $(sam_opts_h)
356 +
357 +
358 + # test programs
359 +@@ -224,30 +213,30 @@
360 +
361 +
362 + test/merge/test_bam_translate: test/merge/test_bam_translate.o test/test.o libst.a $(HTSLIB)
363 +- $(CC) $(ALL_LDFLAGS) -o $@ test/merge/test_bam_translate.o test/test.o libst.a $(HTSLIB_LIB) $(ALL_LIBS) -lpthread
364 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test/merge/test_bam_translate.o test/test.o libst.a $(HTSLIB_LIBS) $(ALL_LIBS) -lpthread
365 +
366 + test/merge/test_rtrans_build: test/merge/test_rtrans_build.o libst.a $(HTSLIB)
367 +- $(CC) $(ALL_LDFLAGS) -o $@ test/merge/test_rtrans_build.o libst.a $(HTSLIB_LIB) $(ALL_LIBS) -lpthread
368 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test/merge/test_rtrans_build.o libst.a $(HTSLIB_LIBS) $(ALL_LIBS) -lpthread
369 +
370 + test/merge/test_trans_tbl_init: test/merge/test_trans_tbl_init.o libst.a $(HTSLIB)
371 +- $(CC) $(ALL_LDFLAGS) -o $@ test/merge/test_trans_tbl_init.o libst.a $(HTSLIB_LIB) $(ALL_LIBS) -lpthread
372 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test/merge/test_trans_tbl_init.o libst.a $(HTSLIB_LIBS) $(ALL_LIBS) -lpthread
373 +
374 + test/split/test_count_rg: test/split/test_count_rg.o test/test.o libst.a $(HTSLIB)
375 +- $(CC) $(ALL_LDFLAGS) -o $@ test/split/test_count_rg.o test/test.o libst.a $(HTSLIB_LIB) $(ALL_LIBS) -lpthread
376 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test/split/test_count_rg.o test/test.o libst.a $(HTSLIB_LIBS) $(ALL_LIBS) -lpthread
377 +
378 + test/split/test_expand_format_string: test/split/test_expand_format_string.o test/test.o libst.a $(HTSLIB)
379 +- $(CC) $(ALL_LDFLAGS) -o $@ test/split/test_expand_format_string.o test/test.o libst.a $(HTSLIB_LIB) $(ALL_LIBS) -lpthread
380 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test/split/test_expand_format_string.o test/test.o libst.a $(HTSLIB_LIBS) $(ALL_LIBS) -lpthread
381 +
382 + test/split/test_filter_header_rg: test/split/test_filter_header_rg.o test/test.o libst.a $(HTSLIB)
383 +- $(CC) $(ALL_LDFLAGS) -o $@ test/split/test_filter_header_rg.o test/test.o libst.a $(HTSLIB_LIB) $(ALL_LIBS) -lpthread
384 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test/split/test_filter_header_rg.o test/test.o libst.a $(HTSLIB_LIBS) $(ALL_LIBS) -lpthread
385 +
386 + test/split/test_parse_args: test/split/test_parse_args.o test/test.o libst.a $(HTSLIB)
387 +- $(CC) $(ALL_LDFLAGS) -o $@ test/split/test_parse_args.o test/test.o libst.a $(HTSLIB_LIB) $(ALL_LIBS) -lpthread
388 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test/split/test_parse_args.o test/test.o libst.a $(HTSLIB_LIBS) $(ALL_LIBS) -lpthread
389 +
390 + test/vcf-miniview: test/vcf-miniview.o $(HTSLIB)
391 +- $(CC) $(ALL_LDFLAGS) -o $@ test/vcf-miniview.o $(HTSLIB_LIB) $(ALL_LIBS) -lpthread
392 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ test/vcf-miniview.o $(HTSLIB_LIBS) $(ALL_LIBS) -lpthread
393 +
394 +-test_test_h = test/test.h $(htslib_sam_h)
395 ++test_test_h = test/test.h
396 +
397 + test/merge/test_bam_translate.o: test/merge/test_bam_translate.c config.h bam_sort.o $(test_test_h)
398 + test/merge/test_rtrans_build.o: test/merge/test_rtrans_build.c config.h bam_sort.o
399 +@@ -256,34 +245,34 @@
400 + test/split/test_expand_format_string.o: test/split/test_expand_format_string.c config.h bam_split.o $(test_test_h)
401 + test/split/test_filter_header_rg.o: test/split/test_filter_header_rg.c config.h bam_split.o $(test_test_h)
402 + test/split/test_parse_args.o: test/split/test_parse_args.c config.h bam_split.o $(test_test_h)
403 +-test/test.o: test/test.c config.h $(htslib_sam_h) $(test_test_h)
404 +-test/vcf-miniview.o: test/vcf-miniview.c config.h $(htslib_vcf_h)
405 ++test/test.o: test/test.c config.h $(test_test_h)
406 ++test/vcf-miniview.o: test/vcf-miniview.c config.h
407 +
408 +
409 + # misc programs
410 +
411 + misc/ace2sam: misc/ace2sam.o
412 +- $(CC) $(LDFLAGS) -o $@ misc/ace2sam.o $(ALL_LIBS)
413 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ misc/ace2sam.o $(ALL_LIBS)
414 +
415 + misc/maq2sam-short: misc/maq2sam-short.o
416 +- $(CC) $(LDFLAGS) -o $@ misc/maq2sam-short.o $(ALL_LIBS)
417 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ misc/maq2sam-short.o $(ALL_LIBS)
418 +
419 + misc/maq2sam-long: misc/maq2sam-long.o
420 +- $(CC) $(LDFLAGS) -o $@ misc/maq2sam-long.o $(ALL_LIBS)
421 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ misc/maq2sam-long.o $(ALL_LIBS)
422 +
423 + misc/md5fa: misc/md5fa.o $(HTSLIB)
424 +- $(CC) $(ALL_LDFLAGS) -o $@ misc/md5fa.o $(HTSLIB_LIB) $(ALL_LIBS)
425 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ misc/md5fa.o $(HTSLIB_LIBS) $(ALL_LIBS)
426 +
427 + misc/md5sum-lite: misc/md5sum-lite.o $(HTSLIB)
428 +- $(CC) $(ALL_LDFLAGS) -o $@ misc/md5sum-lite.o $(HTSLIB_LIB) $(ALL_LIBS)
429 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ misc/md5sum-lite.o $(HTSLIB_LIBS) $(ALL_LIBS)
430 +
431 + misc/wgsim: misc/wgsim.o
432 +- $(CC) $(LDFLAGS) -o $@ misc/wgsim.o -lm $(ALL_LIBS)
433 ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ misc/wgsim.o -lm $(ALL_LIBS)
434 +
435 +-misc/ace2sam.o: misc/ace2sam.c config.h $(htslib_kstring_h) $(htslib_kseq_h)
436 +-misc/md5fa.o: misc/md5fa.c config.h $(htslib_kseq_h) $(htslib_hts_h)
437 +-misc/md5sum-lite.o: misc/md5sum-lite.c config.h $(htslib_hts_h)
438 +-misc/wgsim.o: misc/wgsim.c config.h $(htslib_kseq_h)
439 ++misc/ace2sam.o: misc/ace2sam.c config.h
440 ++misc/md5fa.o: misc/md5fa.c config.h
441 ++misc/md5sum-lite.o: misc/md5sum-lite.c config.h
442 ++misc/wgsim.o: misc/wgsim.c config.h
443 +
444 + misc/maq2sam-short.o: misc/maq2sam.c config.h
445 + $(CC) $(CFLAGS) $(ALL_CPPFLAGS) -c -o $@ misc/maq2sam.c
446
447 diff --git a/sci-biology/samtools/samtools-1.5.ebuild b/sci-biology/samtools/samtools-1.5.ebuild
448 new file mode 100644
449 index 00000000000..c2bc7ce89cf
450 --- /dev/null
451 +++ b/sci-biology/samtools/samtools-1.5.ebuild
452 @@ -0,0 +1,61 @@
453 +# Copyright 1999-2017 Gentoo Foundation
454 +# Distributed under the terms of the GNU General Public License v2
455 +
456 +EAPI=6
457 +
458 +PYTHON_COMPAT=( python2_7 )
459 +
460 +inherit autotools python-r1 toolchain-funcs
461 +
462 +DESCRIPTION="Utilities for analysing and manipulating the SAM/BAM alignment formats"
463 +HOMEPAGE="http://www.htslib.org/"
464 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
465 +
466 +LICENSE="MIT"
467 +SLOT="0"
468 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
469 +IUSE="examples"
470 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
471 +
472 +RDEPEND="
473 + dev-lang/perl
474 + =sci-libs/htslib-${PV}*
475 + sys-libs/ncurses:0=
476 + sys-libs/zlib
477 + ${PYTHON_DEPS}"
478 +DEPEND="${RDEPEND}
479 + virtual/pkgconfig"
480 +
481 +PATCHES=( "${FILESDIR}/${PN}-1.5-buildsystem.patch" )
482 +
483 +src_prepare() {
484 + default
485 +
486 + python_setup
487 + python_fix_shebang misc/varfilter.py
488 +
489 + # remove bundled htslib
490 + rm -r htslib-* || die
491 +
492 + eautoreconf
493 +}
494 +
495 +src_test() {
496 + local -x LD_LIBRARY_PATH="${S}"
497 + default
498 +}
499 +
500 +src_install() {
501 + default
502 +
503 + # install libbam and headers
504 + dolib.so libbam.so*
505 +
506 + insinto /usr/include/bam
507 + doins *.h
508 +
509 + if use examples; then
510 + dodoc -r examples
511 + docompress -x /usr/share/doc/${PF}/examples
512 + fi
513 +}