diff options
author | Justin Lecher <jlec@gentoo.org> | 2014-09-25 15:20:53 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2014-09-25 15:20:53 +0000 |
commit | 648394374f490b95ba47859d476b44626abd017e (patch) | |
tree | 48d6c67844de23a3ee6a695938acc6ca59b04b84 /sci-biology | |
parent | wrt bug 520624 fixed; eapi=5 (diff) | |
download | gentoo-2-648394374f490b95ba47859d476b44626abd017e.tar.gz gentoo-2-648394374f490b95ba47859d476b44626abd017e.tar.bz2 gentoo-2-648394374f490b95ba47859d476b44626abd017e.zip |
sci-biology/samtools: Install bam headers and create libbam.so, #523644
(Portage version: 2.2.13/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'sci-biology')
-rw-r--r-- | sci-biology/samtools/ChangeLog | 8 | ||||
-rw-r--r-- | sci-biology/samtools/files/samtools-1.0-buildsystem.patch | 59 | ||||
-rw-r--r-- | sci-biology/samtools/samtools-1.0-r1.ebuild | 73 |
3 files changed, 139 insertions, 1 deletions
diff --git a/sci-biology/samtools/ChangeLog b/sci-biology/samtools/ChangeLog index b33cae9020b3..41e7af409c0d 100644 --- a/sci-biology/samtools/ChangeLog +++ b/sci-biology/samtools/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-biology/samtools # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-biology/samtools/ChangeLog,v 1.19 2014/09/24 08:12:27 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-biology/samtools/ChangeLog,v 1.20 2014/09/25 15:20:53 jlec Exp $ + +*samtools-1.0-r1 (25 Sep 2014) + + 25 Sep 2014; Justin Lecher <jlec@gentoo.org> +samtools-1.0-r1.ebuild, + +files/samtools-1.0-buildsystem.patch: + Install bam headers and create libbam.so, #523644 24 Sep 2014; Justin Lecher <jlec@gentoo.org> samtools-1.0.ebuild: Add missing build dep, #523586 diff --git a/sci-biology/samtools/files/samtools-1.0-buildsystem.patch b/sci-biology/samtools/files/samtools-1.0-buildsystem.patch new file mode 100644 index 000000000000..53a8b66f918f --- /dev/null +++ b/sci-biology/samtools/files/samtools-1.0-buildsystem.patch @@ -0,0 +1,59 @@ + Makefile | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) + +diff --git a/Makefile b/Makefile +index ae59abf..0d2788c 100644 +--- a/Makefile ++++ b/Makefile +@@ -21,11 +21,12 @@ + # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + # DEALINGS IN THE SOFTWARE. + +-CC = gcc +-CPPFLAGS = $(DFLAGS) $(INCLUDES) +-CFLAGS = -g -Wall -O2 +-LDFLAGS = +-LDLIBS = ++CC ?= gcc ++CPPFLAGS += $(DFLAGS) $(INCLUDES) ++CFLAGS ?= -g -Wall -O2 ++LDFLAGS += ++LDLIBS += ++BAMLIB ?= libbam.a + DFLAGS= -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_CURSES_LIB=1 + LOBJS= bam_aux.o bam.o bam_import.o sam.o \ + sam_header.o bam_plbuf.o +@@ -42,6 +43,7 @@ LIBCURSES= -lcurses # -lXCurses + prefix = /usr/local + exec_prefix = $(prefix) + bindir = $(exec_prefix)/bin ++bindir = $(exec_prefix)/lib + mandir = $(prefix)/share/man + man1dir = $(mandir)/man1 + +@@ -115,14 +117,22 @@ version.h: + .c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + ++$(LOBJS): ++ $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $< + +-lib:libbam.a ++ ++lib:libbam.a libbam.so.1.0 + + libbam.a:$(LOBJS) + $(AR) -csru $@ $(LOBJS) + +-samtools: $(AOBJS) libbam.a $(HTSLIB) +- $(CC) -pthread $(LDFLAGS) -o $@ $(AOBJS) libbam.a $(HTSLIB) $(LDLIBS) $(LIBCURSES) -lm -lz ++libbam.so.1.0:$(LOBJS) ++ $(CC) $(LDFLAGS) -shared -Wl,--soname,$@ -o $@ $(LOBJS) $(HTSLIB) -lz ++ ln -sf $@ libbam.so.0 ++ ln -sf $@ libbam.so ++ ++samtools: $(AOBJS) $(HTSLIB) lib ++ $(CC) -pthread $(LDFLAGS) -o $@ $(AOBJS) $(BAMLIB) $(HTSLIB) $(LDLIBS) $(LIBCURSES) -lm -lz + + bam_h = bam.h $(htslib_bgzf_h) $(htslib_sam_h) + bam2bcf_h = bam2bcf.h $(htslib_vcf_h) errmod.h diff --git a/sci-biology/samtools/samtools-1.0-r1.ebuild b/sci-biology/samtools/samtools-1.0-r1.ebuild new file mode 100644 index 000000000000..7bf3fd6c6558 --- /dev/null +++ b/sci-biology/samtools/samtools-1.0-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-biology/samtools/samtools-1.0-r1.ebuild,v 1.1 2014/09/25 15:20:53 jlec Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils multilib python-r1 toolchain-funcs + +DESCRIPTION="Utilities for SAM (Sequence Alignment/Map), a format for large nucleotide sequence alignments" +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 + sci-libs/htslib" + +RDEPEND="${CDEPEND} + dev-lang/lua + dev-lang/perl" +DEPEND="${CDEPEND} + virtual/pkgconfig" + +src_prepare() { + find htslib-1.0 -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_install() { + dobin samtools $(find misc -type f -executable) + + python_replicate_script "${ED}"/usr/bin/varfilter.py + dolib.so libbam.so* + + 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 +} |