aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mokrejš <mmokrejs@fold.natur.cuni.cz>2017-02-17 00:02:54 +0100
committerJustin Lecher <jlec@gentoo.org>2017-03-18 21:06:55 +0000
commitd5a7b8a54168de2d8e70cb2b68ad46ccc5a5aa7a (patch)
treea19424b73e9d749aac75679c0c34c72f6dd88df5
parentsci-libs/htslib: version bump (diff)
downloadsci-d5a7b8a54168de2d8e70cb2b68ad46ccc5a5aa7a.tar.gz
sci-d5a7b8a54168de2d8e70cb2b68ad46ccc5a5aa7a.tar.bz2
sci-d5a7b8a54168de2d8e70cb2b68ad46ccc5a5aa7a.zip
sci-biology/samtools: version bump; partially updated patch but without libbam.{a,so} change
I did not manage to get to compile the shared library so samtools binary at the moment contains libbam.a (which is what upstream prefers but not Gentoo). Package-Manager: Portage-2.3.3, Repoman-2.3.1
-rw-r--r--sci-biology/samtools/Manifest1
-rw-r--r--sci-biology/samtools/files/samtools-1.3.1-buildsystem.patch75
-rw-r--r--sci-biology/samtools/samtools-1.3.1.ebuild84
3 files changed, 160 insertions, 0 deletions
diff --git a/sci-biology/samtools/Manifest b/sci-biology/samtools/Manifest
index 867b5820b..0ee32c7cf 100644
--- a/sci-biology/samtools/Manifest
+++ b/sci-biology/samtools/Manifest
@@ -1,3 +1,4 @@
DIST samtools-1.0.tar.bz2 4459669 SHA256 7340b843663c3f54a902a06f2f73c68198f3a62d29a2ed20671139957f7fd7c0 SHA512 5b80995c522d08b06a4c559f60a5e200d9085be7f44c3c9618db91e3de85e36c1473e42715eae8175520d7da3df8245bafa82e625d2fc08e0197adb395851693 WHIRLPOOL 2aa0f8639da9b0b828ca7296969e5c600b0e5452ad3231b914e4a7be418700906a4d695c928eaf837b643255567ec82cfadf0b53007e0f1e3a956856f6c4c832
DIST samtools-1.1.tar.bz2 4495373 SHA256 c24d26c303153d72b5bf3cc11f72c6c375a4ca1140cc485648c8c5473414b7f8 SHA512 a5552a6c8c4b0808b725b39ddb2fafa36c4f6623bfc7f84faadae7690223e4eec8d722af09c77145796ad9b3f01e04115dd0207207ccfafbb52ffc22d5fc09f0 WHIRLPOOL ed3131b2a8d8b4dab40b53d35a9b00b657670a949dc1597c91fbcd00392c1c1715a85a1d1e49bf0c73ae082738ccfb13d2c6809dbbeba17ff3028f6023ebc449
DIST samtools-1.2.tar.bz2 4547126 SHA256 420e7a4a107fe37619b9d300b6379452eb8eb04a4a9b65c3ec69de82ccc26daa SHA512 4849c3274e732267516b63799f5430c5415d575d46eddf6b704dac51053281094b03b90dd9f5367bcd14c22fb0fb1bd6a412f7d4225f7be5f5385437c5d2101d WHIRLPOOL 273185764a807365a20c381769f987ef02d14ae8e20a3a7fd5af4344769c5fab68d7155523e8c0c8c3cc86092898c2c8454cce8f1560d415bc2b41549cdf04f4
+DIST samtools-1.3.1.tar.bz2 4030072 SHA256 6c3d74355e9cf2d9b2e1460273285d154107659efa36a155704b1e4358b7d67e SHA512 3bd702d3e922a18843ab47dcc9c545d747b7d2ce74a8ae02c3f6e3a5972af54ce0ad5103f0e2f8658e57d908e14e93740d5c63ab8ab728f813ae440d63eb8a29 WHIRLPOOL 1aaee2521e5c7b4740996d585c77a328d17c68363cd81a48140402a5bd82c0987f9ddcf79c8c9842b92ebe994860c7f650fe49e60d964a037ba72853ece95245
diff --git a/sci-biology/samtools/files/samtools-1.3.1-buildsystem.patch b/sci-biology/samtools/files/samtools-1.3.1-buildsystem.patch
new file mode 100644
index 000000000..bd0f20c7c
--- /dev/null
+++ b/sci-biology/samtools/files/samtools-1.3.1-buildsystem.patch
@@ -0,0 +1,75 @@
+--- samtools-1.3.1/Makefile.ori 2016-04-22 11:51:16.000000000 +0200
++++ samtools-1.3.1/Makefile 2017-02-16 23:41:19.819951687 +0100
+@@ -21,9 +21,9 @@
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ # DEALINGS IN THE SOFTWARE.
+
+-CC = gcc
++CC ?= gcc
+ CPPFLAGS =
+-CFLAGS = -g -Wall -O2
++CFLAGS ?= -g -Wall -O2
+ LDFLAGS =
+ LIBS =
+
+@@ -197,8 +203,8 @@
+ # For tests that might use it, set $REF_PATH explicitly to use only reference
+ # areas within the test suite (or set it to ':' to use no reference areas).
+ # (regression.sh sets $REF_PATH to a subdirectory itself.)
+-check test: samtools $(BGZIP) $(BUILT_TEST_PROGRAMS)
+- REF_PATH=: test/test.pl --exec bgzip=$(BGZIP)
++check test: samtools $(BUILT_TEST_PROGRAMS)
++ REF_PATH=: test/test.pl --exec bgzip=bgzip
+ test/merge/test_bam_translate test/merge/test_bam_translate.tmp
+ test/merge/test_rtrans_build
+ test/merge/test_trans_tbl_init
+@@ -210,28 +216,28 @@
+ test/split/test_parse_args
+
+
+-test/merge/test_bam_translate: test/merge/test_bam_translate.o test/test.o sam_opts.o $(HTSLIB)
++test/merge/test_bam_translate: test/merge/test_bam_translate.o test/test.o sam_opts.o
+ $(CC) -pthread $(ALL_LDFLAGS) -o $@ test/merge/test_bam_translate.o test/test.o sam_opts.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+-test/merge/test_rtrans_build: test/merge/test_rtrans_build.o sam_opts.o $(HTSLIB)
++test/merge/test_rtrans_build: test/merge/test_rtrans_build.o sam_opts.o
+ $(CC) -pthread $(ALL_LDFLAGS) -o $@ test/merge/test_rtrans_build.o sam_opts.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+-test/merge/test_trans_tbl_init: test/merge/test_trans_tbl_init.o sam_opts.o $(HTSLIB)
++test/merge/test_trans_tbl_init: test/merge/test_trans_tbl_init.o sam_opts.o
+ $(CC) -pthread $(ALL_LDFLAGS) -o $@ test/merge/test_trans_tbl_init.o sam_opts.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+-test/split/test_count_rg: test/split/test_count_rg.o test/test.o sam_opts.o $(HTSLIB)
++test/split/test_count_rg: test/split/test_count_rg.o test/test.o sam_opts.o
+ $(CC) -pthread $(ALL_LDFLAGS) -o $@ test/split/test_count_rg.o test/test.o sam_opts.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+-test/split/test_expand_format_string: test/split/test_expand_format_string.o test/test.o sam_opts.o $(HTSLIB)
++test/split/test_expand_format_string: test/split/test_expand_format_string.o test/test.o sam_opts.o
+ $(CC) -pthread $(ALL_LDFLAGS) -o $@ test/split/test_expand_format_string.o test/test.o sam_opts.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+-test/split/test_filter_header_rg: test/split/test_filter_header_rg.o test/test.o sam_opts.o $(HTSLIB)
++test/split/test_filter_header_rg: test/split/test_filter_header_rg.o test/test.o sam_opts.o
+ $(CC) -pthread $(ALL_LDFLAGS) -o $@ test/split/test_filter_header_rg.o test/test.o sam_opts.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+-test/split/test_parse_args: test/split/test_parse_args.o test/test.o sam_opts.o $(HTSLIB)
++test/split/test_parse_args: test/split/test_parse_args.o test/test.o sam_opts.o
+ $(CC) -pthread $(ALL_LDFLAGS) -o $@ test/split/test_parse_args.o test/test.o sam_opts.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+-test/vcf-miniview: test/vcf-miniview.o $(HTSLIB)
++test/vcf-miniview: test/vcf-miniview.o
+ $(CC) -pthread $(ALL_LDFLAGS) -o $@ test/vcf-miniview.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+ test_test_h = test/test.h $(htslib_sam_h)
+@@ -258,10 +264,10 @@
+ misc/maq2sam-long: misc/maq2sam-long.o
+ $(CC) $(LDFLAGS) -o $@ misc/maq2sam-long.o $(ALL_LIBS)
+
+-misc/md5fa: misc/md5fa.o $(HTSLIB)
++misc/md5fa: misc/md5fa.o
+ $(CC) $(ALL_LDFLAGS) -o $@ misc/md5fa.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+-misc/md5sum-lite: misc/md5sum-lite.o $(HTSLIB)
++misc/md5sum-lite: misc/md5sum-lite.o
+ $(CC) $(ALL_LDFLAGS) -o $@ misc/md5sum-lite.o $(HTSLIB_LIB) $(ALL_LIBS)
+
+ misc/wgsim: misc/wgsim.o
diff --git a/sci-biology/samtools/samtools-1.3.1.ebuild b/sci-biology/samtools/samtools-1.3.1.ebuild
new file mode 100644
index 000000000..8c118dcf4
--- /dev/null
+++ b/sci-biology/samtools/samtools-1.3.1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib python-r1 toolchain-funcs
+
+DESCRIPTION="Utilities for SAM (Sequence Alignment/Map)"
+HOMEPAGE="http://www.htslib.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="examples"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+CDEPEND="
+ sys-libs/ncurses:0=
+ >=sci-libs/htslib-${PV}"
+
+RDEPEND="${CDEPEND}
+ dev-lang/lua
+ dev-lang/perl"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ find htslib-* -delete || die
+
+ sed -i 's~/software/bin/python~/usr/bin/env python~' "${S}"/misc/varfilter.py || die
+
+ epatch \
+ "${FILESDIR}"/${P}-buildsystem.patch
+
+ tc-export CC AR
+
+ sed \
+ -e '/htslib.mk/d' \
+ -i Makefile || die
+}
+
+src_compile() {
+ local mymakeargs=(
+ LIBCURSES="$($(tc-getPKG_CONFIG) --libs ncurses)"
+ HTSDIR="${EPREFIX}/usr/include"
+ HTSLIB=$($(tc-getPKG_CONFIG) --libs htslib)
+ BAMLIB="libbam.so"
+ )
+ emake "${mymakeargs[@]}"
+}
+
+src_test() {
+ local mymakeargs=(
+ LIBCURSES="$($(tc-getPKG_CONFIG) --libs ncurses)"
+ HTSDIR="${EPREFIX}/usr/include"
+ HTSLIB=$($(tc-getPKG_CONFIG) --libs htslib)
+ BAMLIB="libbam.so"
+ )
+ LD_LIBRARY_PATH="${S}" emake "${mymakeargs[@]}" test
+}
+
+src_install() {
+ dobin samtools $(find misc -type f -executable)
+
+ python_replicate_script "${ED}"/usr/bin/varfilter.py
+ #dolib.so libbam.so*
+ dolib libbam.a
+
+ insinto /usr/include/bam
+ doins *.h
+
+ doman ${PN}.1
+ dodoc AUTHORS NEWS README
+
+ if use examples; then
+ insinto /usr/share/${PN}
+ doins -r examples
+ fi
+}