blob: b29b5d8c8b3464507261ad59e876853262e3a756 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils
W="${WORKDIR}"/"${P}"
DESCRIPTION="NCBI Sequence Read Archive (SRA) sratoolkit"
HOMEPAGE="http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?cmd=show&f=faspftp_runs_v1&m=downloads&s=download_sra"
SRC_URI="http://ftp-private.ncbi.nlm.nih.gov/sra/sdk/2.2.2a/sra_sdk-"${PV}".tar.gz"
# http://ftp-private.ncbi.nlm.nih.gov/sra/sdk/2.2.2a/sratoolkit.2.2.2a-centos_linux64.tar.gz
LICENSE="public-domain"
SLOT="0"
#KEYWORDS=""
KEYWORDS="~amd64 ~x86"
IUSE="static"
DEPEND="
app-shells/bash:*
sys-libs/zlib
app-arch/bzip2
dev-libs/libxml2:2="
RDEPEND="${DEPEND}"
# upstream says:
# icc, icpc are supported: tested with 11.0 (64-bit) and 10.1 (32-bit), 32-bit 11.0 does not work
#src_prepare(){
# epatch "${FILESDIR}"/sra_sdk-destdir.patch || die
# epatch "${FILESDIR}"/tools_vdb-vcopy_Makefile.patch || die
# epatch "${FILESDIR}"/libs_sra_Makefile.patch || die
# mkdir -p /var/tmp/portage/sci-biology/"${P}"/image//var/tmp/portage/sci-biology/
# ln -s /var/tmp/portage/sci-biology/"${P}" /var/tmp/portage/sci-biology/"${P}"/image//var/tmp/portage/sci-biology/"${P}"
#}
src_compile(){
# # COMP env variable may have 'GCC' or 'ICC' values
#if use static; then
# emake static LIBDIR=/usr/lib64 DESTDIR="${D}"
#else
# emake dynamic LIBDIR=/usr/lib64 DESTDIR="${D}"
#fi
#LIBXML_INCLUDES="/usr/include/libxml2" make -j1 OUTDIR="${WORKDIR}"/objdir out LIBDIR=/usr/lib64 DESTDIR="${D}" || die
#LIBXML_INCLUDES="/usr/include/libxml2" make -j1 OUTDIR="${WORKDIR}"/objdir LIBDIR=/usr/lib64 DESTDIR="${D}" || die
# preserve the libs written directly into $DESTDIR by ar/ld/gcc
#mkdir -p "${WORKDIR}"/objdir/linux/rel/gcc/x86_64/lib
#mv "${D}"/usr/lib64/* "${WORKDIR}"/objdir/linux/rel/gcc/x86_64/lib/
emake OUTDIR="${WORKDIR}"/objdir out
emake dynamic
emake release
default
}
src_install(){
rm -rf /var/tmp/portage/sci-biology/"${P}"/image/var
# BUG: at the moment every binary is installed three times, e.g.:
# -rwxr-xr-x 1 root root 1797720 Sep 23 01:31 abi-dump
# -rwxr-xr-x 1 root root 1797720 Sep 23 01:31 abi-dump.2
# -rwxr-xr-x 1 root root 1797720 Sep 23 01:31 abi-dump.2.1.6
if use amd64; then
builddir="x86_64"
elif use x86; then
builddir="i386"
fi
dodir /usr/bin /usr/lib/ncbi /usr/ncbi/schema
OBJDIR="${WORKDIR}"/objdir/linux/gcc/dyn/"${builddir}"/rel
# BUG: neither 'doins -r' nor cp --preserve=all work
#insinto /usr/bin
#doins -r "${WORKDIR}"/objdir/linux/rel/gcc/"${builddir}"/bin/*
for f in "${OBJDIR}"/bin/*; do cp --preserve=all "$f" "${D}"/usr/bin/ || die "$f copying failed" ; done
# install the main libs and the ncbi/vdb-copy.kfg file
insinto /usr/lib/ncbi
doins "${OBJDIR}"/lib/ncbi/*
# zap the subdirectory so that copying below does not fail
rm -rf "${OBJDIR}"/lib/ncbi || die
# BUG: neither the dolib nor cp --preserve=all work
#insinto /usr/lib64
#dolib "${WORKDIR}"/objdir/linux/rel/gcc/"${builddir}"/lib/*
mkdir -p "${D}"/usr/lib64
for f in "${OBJDIR}"/lib/*; do cp --preserve=all "$f" "${D}"/usr/lib64/ || die "$f copying failed" ; done
insinto /usr/ncbi/schema
doins \
"${W}"/interfaces/align/*.vschema \
"${W}"/interfaces/sra/*.vschema \
"${W}"/interfaces/vdb/*.vschema \
"${W}"/interfaces/ncbi/*.vschema \
"${W}"/interfaces/insdc/*.vschema
}
|