-
Notifications
You must be signed in to change notification settings - Fork 163
/
augustus-3.3.2.ebuild
115 lines (97 loc) · 3.64 KB
/
augustus-3.3.2.ebuild
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit eutils toolchain-funcs
DESCRIPTION="Eukaryotic gene predictor"
HOMEPAGE="http://bioinf.uni-greifswald.de/augustus
https://github.com/Gaius-Augustus/Augustus"
SRC_URI="https://github.com/Gaius-Augustus/Augustus/archive/3.3.2.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
# temporary drop in licensing scheme, see http://stubber.math-inf.uni-greifswald.de/bioinf/augustus/binaries/HISTORY.TXT
# http://stubber.math-inf.uni-greifswald.de/bioinf/augustus/binaries/LICENCE.TXT
# LICENSE="Artistic"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="bam2wig examples man mysql sqlite"
RDEPEND="
bam2wig? ( sci-biology/samtools:0.1-legacy )
sci-biology/bamtools
>=sci-mathematics/lpsolve-5.5
sci-libs/gsl
sci-libs/suitesparse
sqlite? ( dev-db/sqlite:3 )
mysql? ( dev-db/mysql++ )
>=dev-libs/boost-1.49.0
sys-libs/zlib"
DEPEND="${RDEPEND}
sys-devel/flex"
S="${WORKDIR}/Augustus-${PV}"
src_prepare() {
# TODO: do we need anything from the 2.5.5 patch?
# epatch "${FILESDIR}"/${P}-sane-build.patch
default
tc-export CC CXX
# lets respect upstream's wish and keep -ggdb
sed -e 's#-ggdb -O3#-ggdb#' -i src/Makefile || die
sed -e 's#TOOLDIR=$(HOME)/tools#TOOLDIR='"${EPREFIX}/usr/include#" \
-i auxprogs/bam2wig/Makefile || die
sed -e "s#INCLUDES=#INCLUDES=-I${EPREFIX}/usr/include/bam-0.1-legacy #" \
-i auxprogs/bam2wig/Makefile || die
# https://github.com/Gaius-Augustus/Augustus/issues/53
sed -e 's#$(SAMTOOLS)/libbam.a $(HTSLIB)/libhts.a -lcurses -lm -lz -lpthread -lcurl -lssl -lcrypto#-lbam-0.1-legacy#' -i auxprogs/bam2wig/Makefile || die
sed -e 's#-lbz2 -llzma##' -i auxprogs/bam2wig/Makefile || die
# enable comparative gene prediction (CGP, needs c++11 compiler),
# this needs sci-mathematics/lpsolve
sed -e 's/^# COMPGENEPRED/COMPGENEPRED/' -i common.mk || die
# enable compressed gzip input
sed -e 's/^#ZIPINPUT/ZIPINPUT/' -i common.mk || die
# comparative (multi-species, CGP) AUGUSTUS with MySQL or SQLite
# supposedly pick only either a single-one
if use mysql; then
sed -e 's/^#MYSQL/MYSQL/' -i common.mk || die
elif use sqlite; then
# comparative (mutli-species, CGP) AUGUSTUS with SQLite
sed -e 's/^# SQLITE/SQLITE/' -i common.mk || die
fi
# respect $EPREFIX in all Makefile's
find . -name Makefile | while read f; do \
sed -s "s#/usr/include#${EPREFIX}/usr/include#g" -i $f || die;
done
}
src_compile() {
emake clean && default
# compile stuff not compiled by default
# https://github.com/Gaius-Augustus/Augustus/issues/52
cd auxprogs/aln2wig || die
emake
}
src_install() {
dobin bin/*
exeinto /usr/libexec/${PN}
doexe scripts/*.{pl,pm,py} scripts/checkUTR
insinto /usr/libexec/${PN}
doins scripts/*.conf
insinto /usr/share/${PN}
doins -r config
echo "AUGUSTUS_CONFIG_PATH=\"/usr/share/${PN}/config\"" > "${S}/99${PN}"
doenvd "${S}/99${PN}"
insinto /usr/libexec/${PN}/gbrowse
doins scripts/gbrowse.conf
insinto /usr/libexec/${PN}/gfftools
doins scripts/gff2ps_mycustom # config setting
dodoc README.md README-cgp.txt HISTORY.TXT auxprogs/homGeneMapping/README.TXT
dodoc -r docs/*.{pdf,txt}
if use examples; then
insinto /usr/share/${PN}/
doins -r docs/tutorial examples
fi
use man && doman mansrc/*.1
# install stuff not compiled but not written into bin/
# https://github.com/Gaius-Augustus/Augustus/issues/14
dobin auxprogs/utrrnaseq/Debug/utrrnaseq
dodoc auxprogs/utrrnaseq/doc/reference.pdf
# https://github.com/Gaius-Augustus/Augustus/issues/51
dobin auxprogs/checkTargetSortedness/checkTargetSortedness \
auxprogs/compileSpliceCands/compileSpliceCands
# ./augustus-training/ contains web application and setup
}