sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / sci-biology / mira / mira-4.0.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 MIRA_3RDPARTY_PV="06-07-2012"
7 MY_PV="${PV/_}" # convert from mira-4.0_rc2 (Gentoo ebuild filename derived) to mira-4.0rc2 (upstream fromat)
8
9 inherit autotools eutils multilib
10
11 DESCRIPTION="Whole Genome Shotgun and EST Sequence Assembler for Sanger, 454 and Illumina"
12 HOMEPAGE="http://www.chevreux.org/projects_mira.html"
13 SRC_URI="
14         https://sourceforge.net/projects/mira-assembler/files/MIRA/stable/"${PN}"-"${MY_PV}".tar.bz2
15         mirror://sourceforge/mira-assembler/mira_3rdparty_${MIRA_3RDPARTY_PV}.tar.bz2"
16 #       https://sourceforge.net/projects/mira-assembler/files/MIRA/development/${P}.tar.bz2
17 #       mirror://sourceforge/mira-assembler/mira_3rdparty_${MIRA_3RDPARTY_PV}.tar.bz2"
18
19 S="${WORKDIR}"/"${PN}"-"${MY_PV}"
20
21 SLOT="0"
22 LICENSE="GPL-2"
23 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~x86-macos"
24 IUSE="doc"
25
26 CDEPEND="
27         dev-libs/boost[threads]
28         dev-util/google-perftools"
29 DEPEND="${CDEPEND}
30         sys-devel/flex
31         app-editors/vim-core
32         dev-libs/expat"
33 RDEPEND="${CDEPEND}"
34
35 #DOCS=( AUTHORS GETTING_STARTED NEWS README HELP_WANTED
36 #       THANKS doc/3rdparty/scaffolding_MIRA_BAMBUS.pdf )
37 DOCS=( AUTHORS GETTING_STARTED NEWS README HELP_WANTED THANKS )
38
39 PATCHES=(
40         "${FILESDIR}/${PN}-4.0.2-boost-1.50.patch"
41         "${FILESDIR}/${PN}-4.0.2-cout.patch"
42         "${FILESDIR}/${PN}-4.0.2-cmath.patch"
43 )
44
45 src_prepare() {
46         find -name 'configure*' -or -name 'Makefile*' | xargs sed -i 's/flex++/flex -+/' || die
47
48         default
49
50         sed \
51                 -e "s:-O[23]::g" \
52                 -e "s:-funroll-loops::g" \
53                 -i configure.ac || die
54
55         eautoreconf
56
57         # Remove C++ source files that upstream built with flex.
58         local f
59         local PREBUILT_CXX_LEXER_FILES=(
60                 "${S}"/src/caf/caf_flexer.cc
61                 "${S}"/src/io/exp_flexer.cc
62                 "${S}"/src/mira/parameters_flexer.cc
63         )
64
65         for f in "${PREBUILT_CXX_LEXER_FILES[@]}"; do
66                 if [[ -f ${f} ]] ; then
67                         rm "${f}" || die "Failed to remove ${f}"
68                 else
69                         die "${f} not found"
70                 fi
71         done
72 }
73
74 src_configure() {
75         econf \
76                 --with-boost="${EPREFIX}/usr/$(get_libdir)" \
77                 --with-boost-libdir="${EPREFIX}/usr/$(get_libdir)" \
78                 --with-boost-thread=boost_thread-mt
79 }
80
81 #src_compile() {
82 #       base_src_compile
83 #       # TODO: resolve docbook incompatibility for building docs
84 #       use doc && emake -C doc clean docs
85 #}
86
87 src_install() {
88         default
89
90         dobin "${WORKDIR}"/3rdparty/{sff_extract,qual2ball,*.pl}
91         dodoc "${WORKDIR}"/3rdparty/{README.txt,midi_screen.fasta}
92 }
93
94 pkg_postinst() {
95         einfo "Documentation is no longer built, you can find it at:"
96         einfo "http://mira-assembler.sourceforge.net/docs/DefinitiveGuideToMIRA.html"
97 }