Gentoo Archives: gentoo-commits

From: Martin Mokrejs <mmokrejs@×××××××××××××××.cz>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-biology/augustus/
Date: Fri, 29 Mar 2019 13:00:41
Message-Id: 1553864421.f291cafdf1bac38dea4e9781f08ee7cc171a6dc4.mmokrejs@gentoo
1 commit: f291cafdf1bac38dea4e9781f08ee7cc171a6dc4
2 Author: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
3 AuthorDate: Fri Mar 29 13:00:21 2019 +0000
4 Commit: Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
5 CommitDate: Fri Mar 29 13:00:21 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=f291cafd
7
8 sci-biology/augustus: version bump, fix awful Makefile's
9
10 Do not require static libraries. Only bamtools are really needed.
11 htslib is not needed. For bam2wig samtools-0.2 series is needed.
12
13 I decided to blindly install some of the binaries created but not
14 copied into `./bin/`.
15
16 `src/Makefile` will gladly define mysql and sqlite together, probably
17 a non-sense. We force mysql as we check for it first. Not sure if
18 sqlite should be preferred.
19
20 I documented in the augustus-3.3.2.ebuild other "forgotten" files,
21 like gbrowse.conf and a template for gff2ps.
22
23 I dropped `-O3` but left in `-ggdb` in the `CXXFLAGS`.
24
25 https://github.com/Gaius-Augustus/Augustus/issues/14
26 https://github.com/Gaius-Augustus/Augustus/issues/50
27 https://github.com/Gaius-Augustus/Augustus/issues/51
28 https://github.com/Gaius-Augustus/Augustus/issues/52
29 https://github.com/Gaius-Augustus/Augustus/issues/53
30
31 Package-Manager: Portage-2.3.62, Repoman-2.3.12
32 Signed-off-by: Martin Mokrejs <mmokrejs <AT> fold.natur.cuni.cz>
33
34 sci-biology/augustus/augustus-3.3.2.ebuild | 115 +++++++++++++++++++++++++++++
35 sci-biology/augustus/augustus-3.3.ebuild | 70 ------------------
36 sci-biology/augustus/metadata.xml | 4 +
37 3 files changed, 119 insertions(+), 70 deletions(-)
38
39 diff --git a/sci-biology/augustus/augustus-3.3.2.ebuild b/sci-biology/augustus/augustus-3.3.2.ebuild
40 new file mode 100644
41 index 000000000..f28fb4e93
42 --- /dev/null
43 +++ b/sci-biology/augustus/augustus-3.3.2.ebuild
44 @@ -0,0 +1,115 @@
45 +# Copyright 1999-2019 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=7
49 +
50 +inherit eutils toolchain-funcs
51 +
52 +DESCRIPTION="Eukaryotic gene predictor"
53 +HOMEPAGE="http://bioinf.uni-greifswald.de/augustus
54 + https://github.com/Gaius-Augustus/Augustus"
55 +SRC_URI="https://github.com/Gaius-Augustus/Augustus/archive/3.3.2.tar.gz -> ${P}.tar.gz"
56 +
57 +LICENSE="GPL-3"
58 +# temporary drop in licensing scheme, see http://stubber.math-inf.uni-greifswald.de/bioinf/augustus/binaries/HISTORY.TXT
59 +# http://stubber.math-inf.uni-greifswald.de/bioinf/augustus/binaries/LICENCE.TXT
60 +# LICENSE="Artistic"
61 +SLOT="0"
62 +KEYWORDS="~amd64 ~x86"
63 +IUSE="bam2wig examples man mysql sqlite"
64 +
65 +RDEPEND="
66 + bam2wig? ( sci-biology/samtools:0.1-legacy )
67 + sci-biology/bamtools
68 + >=sci-mathematics/lpsolve-5.5
69 + sci-libs/gsl
70 + sci-libs/suitesparse
71 + sqlite? ( dev-db/sqlite:3 )
72 + mysql? ( dev-db/mysql++ )
73 + >=dev-libs/boost-1.49.0
74 + sys-libs/zlib"
75 +DEPEND="${RDEPEND}
76 + sys-devel/flex"
77 +S="${WORKDIR}/Augustus-${PV}"
78 +
79 +src_prepare() {
80 + # TODO: do we need anything from the 2.5.5 patch?
81 + # epatch "${FILESDIR}"/${P}-sane-build.patch
82 + default
83 + tc-export CC CXX
84 + # lets respect upstream's wish and keep -ggdb
85 + sed -e 's#-ggdb -O3#-ggdb#' -i src/Makefile || die
86 + sed -e 's#TOOLDIR=$(HOME)/tools#TOOLDIR='"${EPREFIX}/usr/include#" \
87 + -i auxprogs/bam2wig/Makefile || die
88 + sed -e "s#INCLUDES=#INCLUDES=-I${EPREFIX}/usr/include/bam-0.1-legacy #" \
89 + -i auxprogs/bam2wig/Makefile || die
90 + # https://github.com/Gaius-Augustus/Augustus/issues/53
91 + 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
92 + sed -e 's#-lbz2 -llzma##' -i auxprogs/bam2wig/Makefile || die
93 + # enable comparative gene prediction (CGP, needs c++11 compiler),
94 + # this needs sci-mathematics/lpsolve
95 + sed -e 's/^# COMPGENEPRED/COMPGENEPRED/' -i common.mk || die
96 + # enable compressed gzip input
97 + sed -e 's/^#ZIPINPUT/ZIPINPUT/' -i common.mk || die
98 + # comparative (multi-species, CGP) AUGUSTUS with MySQL or SQLite
99 + # supposedly pick only either a single-one
100 + if use mysql; then
101 + sed -e 's/^#MYSQL/MYSQL/' -i common.mk || die
102 + elif use sqlite; then
103 + # comparative (mutli-species, CGP) AUGUSTUS with SQLite
104 + sed -e 's/^# SQLITE/SQLITE/' -i common.mk || die
105 + fi
106 + # respect $EPREFIX in all Makefile's
107 + find . -name Makefile | while read f; do \
108 + sed -s "s#/usr/include#${EPREFIX}/usr/include#g" -i $f || die;
109 + done
110 +}
111 +
112 +src_compile() {
113 + emake clean && default
114 +
115 + # compile stuff not compiled by default
116 + # https://github.com/Gaius-Augustus/Augustus/issues/52
117 + cd auxprogs/aln2wig || die
118 + emake
119 +}
120 +
121 +src_install() {
122 + dobin bin/*
123 +
124 + exeinto /usr/libexec/${PN}
125 + doexe scripts/*.{pl,pm,py} scripts/checkUTR
126 + insinto /usr/libexec/${PN}
127 + doins scripts/*.conf
128 +
129 + insinto /usr/share/${PN}
130 + doins -r config
131 +
132 + echo "AUGUSTUS_CONFIG_PATH=\"/usr/share/${PN}/config\"" > "${S}/99${PN}"
133 + doenvd "${S}/99${PN}"
134 +
135 + insinto /usr/libexec/${PN}/gbrowse
136 + doins scripts/gbrowse.conf
137 + insinto /usr/libexec/${PN}/gfftools
138 + doins scripts/gff2ps_mycustom # config setting
139 +
140 + dodoc README.md README-cgp.txt HISTORY.TXT auxprogs/homGeneMapping/README.TXT
141 + dodoc -r docs/*.{pdf,txt}
142 +
143 + if use examples; then
144 + insinto /usr/share/${PN}/
145 + doins -r docs/tutorial examples
146 + fi
147 +
148 + use man && doman mansrc/*.1
149 +
150 + # install stuff not compiled but not written into bin/
151 + # https://github.com/Gaius-Augustus/Augustus/issues/14
152 + dobin auxprogs/utrrnaseq/Debug/utrrnaseq
153 + dodoc auxprogs/utrrnaseq/doc/reference.pdf
154 + # https://github.com/Gaius-Augustus/Augustus/issues/51
155 + dobin auxprogs/checkTargetSortedness/checkTargetSortedness \
156 + auxprogs/compileSpliceCands/compileSpliceCands
157 +
158 + # ./augustus-training/ contains web application and setup
159 +}
160
161 diff --git a/sci-biology/augustus/augustus-3.3.ebuild b/sci-biology/augustus/augustus-3.3.ebuild
162 deleted file mode 100644
163 index b2b19a04e..000000000
164 --- a/sci-biology/augustus/augustus-3.3.ebuild
165 +++ /dev/null
166 @@ -1,70 +0,0 @@
167 -# Copyright 1999-2018 Gentoo Foundation
168 -# Distributed under the terms of the GNU General Public License v2
169 -
170 -EAPI=5
171 -
172 -inherit eutils toolchain-funcs
173 -
174 -DESCRIPTION="Eukaryotic gene predictor"
175 -HOMEPAGE="http://augustus.gobics.de/"
176 -SRC_URI="http://bioinf.uni-greifswald.de/augustus/binaries/${P}.tar.gz"
177 -
178 -LICENSE="GPL-3"
179 -# temporary drop in licensing scheme, see http://stubber.math-inf.uni-greifswald.de/bioinf/augustus/binaries/HISTORY.TXT
180 -# http://stubber.math-inf.uni-greifswald.de/bioinf/augustus/binaries/LICENCE.TXT
181 -# LICENSE="Artistic"
182 -SLOT="0"
183 -KEYWORDS="~amd64 ~x86"
184 -IUSE="examples"
185 -
186 -# TODO: provide USE for mysql and sqlite, edit src/Makefile to reflect paths
187 -# and common.mk
188 -RDEPEND="
189 - sci-mathematics/lpsolve
190 - sci-libs/gsl
191 - dev-libs/boost
192 - sys-libs/zlib"
193 -DEPEND="${RDEPEND}
194 - sys-devel/flex"
195 -S="${WORKDIR}/${PN}"
196 -
197 -src_prepare() {
198 - # TODO: do we need anything from the 2.5.5 patch?
199 - # epatch "${FILESDIR}"/${P}-sane-build.patch
200 - tc-export CC CXX
201 - sed -e 's/ -O3//g' -i src/Makefile || die
202 - # enable comparative gene prediction (needs c++11 compiler),
203 - # this needs sci-mathematics/lpsolve
204 - sed -e 's/^# COMPGENEPRED/COMPGENEPRED/' -i common.mk || die
205 - # respect $EPREFIX at src/Makefile, auxprogs/bam2hints/Makefile, more?
206 - find . -name Makefile | while read f; do \
207 - sed -s 's#/usr/include#${EPREFIX}/usr/include#' -i $f || die;
208 - done
209 -}
210 -
211 -src_compile() {
212 - emake clean && default
213 -}
214 -
215 -src_install() {
216 - dobin bin/*
217 -# dobin src/{augustus,etraining,consensusFinder,curve2hints,fastBlockSearch,prepareAlign}
218 -
219 - exeinto /usr/libexec/${PN}
220 - doexe scripts/*.p*
221 - insinto /usr/libexec/${PN}
222 - doins scripts/*.conf
223 -
224 - insinto /usr/share/${PN}
225 - doins -r config
226 -
227 - echo "AUGUSTUS_CONFIG_PATH=\"/usr/share/${PN}/config\"" > "${S}/99${PN}"
228 - doenvd "${S}/99${PN}"
229 -
230 - dodoc -r README.TXT HISTORY.TXT docs/*.{pdf,txt}
231 -
232 - if use examples; then
233 - insinto /usr/share/${PN}/
234 - doins -r docs/tutorial examples
235 - fi
236 -}
237
238 diff --git a/sci-biology/augustus/metadata.xml b/sci-biology/augustus/metadata.xml
239 index 8417d1580..6b4a3e5b5 100644
240 --- a/sci-biology/augustus/metadata.xml
241 +++ b/sci-biology/augustus/metadata.xml
242 @@ -5,4 +5,8 @@
243 <email>sci-biology@g.o</email>
244 <name>Gentoo Biology Project</name>
245 </maintainer>
246 + <use>
247 + <flag name="man">install preformatted manual pages</flag>
248 + <flag name="bam2wig">compile and install bam2wig conversion utility</flag>
249 + </use>
250 </pkgmetadata>