sci-libs/dealii: fix QA warnings
[gentoo.git] / sci-libs / minuit / minuit-5.34.14.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 inherit autotools
7
8 DESCRIPTION="A C++ physics analysis tool for function minimization"
9 HOMEPAGE="https://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/"
10 SRC_URI="
11         http://www.cern.ch/mathlibs/sw/${PV//./_}/${PN^}2/${PN^}2-5.34.14.tar.gz -> ${P}.tar.gz
12         doc? (
13                 http://seal.cern.ch/documents/minuit/mnusersguide.pdf
14                 http://seal.cern.ch/documents/minuit/mntutorial.pdf
15         )"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
20 IUSE="doc openmp static-libs"
21
22 DEPEND="doc? ( app-doc/doxygen )"
23 RDEPEND=""
24
25 S="${WORKDIR}/${PN^}2-${PV}"
26
27 PATCHES=( "${FILESDIR}"/${PN}-5.27.02-asneeded.patch )
28
29 src_prepare() {
30         default
31         rm config/m4/ac_openmp.m4 || die
32         mv configure.{in,ac} || die
33
34         AT_M4DIR="config/m4" eautoreconf
35 }
36
37 src_configure() {
38         econf \
39                 $(use_enable static-libs static) \
40                 $(use_enable openmp)
41 }
42
43 src_compile() {
44         default
45         use doc && emake docs
46 }
47
48 src_test() {
49         emake check
50
51         cd test/MnTutorial || die
52         local t
53         for t in test_*; do
54                         ./${t} || die "${t} failed"
55         done
56 }
57
58 src_install() {
59         if use doc; then
60                 # remove doxygen junk
61                 find doc/html \( -iname '*.map' -o -iname '*.md5' \) -delete || die
62                 HTML_DOCS=( doc/html/. )
63                 dodoc "${DISTDIR}"/mn{usersguide,tutorial}.pdf
64         fi
65         default
66
67         docinto examples
68         dodoc test/MnTutorial/*.{h,cxx}
69         docompress -x /usr/share/doc/${PF}/examples
70
71         if ! use static-libs; then
72                 find "${D}" -name '*.la' -delete || die
73         fi
74 }