| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sci-biology/samtools/samtools-0.1.18-r1.ebuild,v 1.1 2013/01/23 10:51:13 jlec Exp $
|
| 4 |
|
| 5 |
EAPI=5
|
| 6 |
|
| 7 |
inherit multilib toolchain-funcs
|
| 8 |
|
| 9 |
DESCRIPTION="Utilities for SAM (Sequence Alignment/Map), a format for large nucleotide sequence alignments"
|
| 10 |
HOMEPAGE="http://samtools.sourceforge.net/"
|
| 11 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
| 12 |
|
| 13 |
LICENSE="MIT"
|
| 14 |
SLOT="0"
|
| 15 |
IUSE="examples"
|
| 16 |
KEYWORDS="~amd64 ~x86 ~x64-macos"
|
| 17 |
|
| 18 |
RDEPEND="sys-libs/ncurses"
|
| 19 |
DEPEND="${RDEPEND}
|
| 20 |
virtual/pkgconfig"
|
| 21 |
|
| 22 |
src_prepare() {
|
| 23 |
sed \
|
| 24 |
-e '/^CC/s:=:?=:g' \
|
| 25 |
-e "/^LIBCURSES/s:=.*$:= $(pkg-config --libs ncurses):g" \
|
| 26 |
-e '/^CFLAGS=/s:=:?=:' \
|
| 27 |
-e "s/\$(CC) \$(CFLAGS)/& \$(LDFLAGS)/g" \
|
| 28 |
-e "s/-shared/& \$(LDFLAGS)/" \
|
| 29 |
-i "${S}"/{Makefile,misc/Makefile} || die #358563
|
| 30 |
sed -i 's~/software/bin/python~/usr/bin/env python~' "${S}"/misc/varfilter.py || die
|
| 31 |
|
| 32 |
tc-export CC
|
| 33 |
}
|
| 34 |
|
| 35 |
src_compile() {
|
| 36 |
emake dylib
|
| 37 |
emake
|
| 38 |
}
|
| 39 |
|
| 40 |
src_install() {
|
| 41 |
dobin samtools $(find misc -type f -executable)
|
| 42 |
|
| 43 |
dolib.so libbam.so.1
|
| 44 |
dosym libbam.so.1 /usr/$(get_libdir)/libbam.so
|
| 45 |
|
| 46 |
insinto /usr/include/bam
|
| 47 |
doins bam.h bgzf.h faidx.h kaln.h khash.h kprobaln.h kseq.h ksort.h sam.h
|
| 48 |
|
| 49 |
doman ${PN}.1
|
| 50 |
dodoc AUTHORS ChangeLog NEWS
|
| 51 |
|
| 52 |
if use examples; then
|
| 53 |
insinto /usr/share/${PN}
|
| 54 |
doins -r examples
|
| 55 |
fi
|
| 56 |
}
|