summaryrefslogtreecommitdiff
blob: c722ef41ec3b515a3ae1907b9de8b5693f21f188 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-biology/vcftools/vcftools-0.1.8.ebuild,v 1.2 2013/02/27 16:39:18 jlec Exp $

EAPI=4

inherit eutils toolchain-funcs

MY_P="${PN}_${PV}"

DESCRIPTION="Tools for working with VCF (Variant Call Format) files"
HOMEPAGE="http://vcftools.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="lapack"

RDEPEND="lapack? ( virtual/lapack )"
DEPEND="${RDEPEND}
	virtual/pkgconfig"

S="${WORKDIR}/${MY_P}"

src_prepare() {
	epatch "${FILESDIR}"/${P}-buildsystem.patch
	tc-export CXX PKG_CONFIG
}

src_compile() {
	local myconf
	use lapack && myconf="VCFTOOLS_PCA=1"
	emake -C cpp ${myconf}
}

src_install(){
	dobin cpp/${PN}
	insinto /usr/share/${PN}/perl
	doins perl/*.pm
	exeinto /usr/share/${PN}/perl
	doexe perl/{fill,vcf}-*
	echo 'COLON_SEPARATED=PERL5LIB' > "${S}/99${PN}"
	echo "PERL5LIB=/usr/share/${PN}/perl" >> "${S}/99${PN}"
	doenvd "${S}/99${PN}"
	dodoc README.txt
}