aboutsummaryrefslogtreecommitdiff
blob: c742352acbf0396541d37c5c44c44259926bb678 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $

DESCRIPTION="A tool to help verifying and proving properties on floating-point or fixed-point arithmetic."
HOMEPAGE="http://lipforge.ens-lyon.fr/www/gappa/"
SRC_URI="http://lipforge.ens-lyon.fr/frs/download.php/150/${P}.tar.gz"

LICENSE="CeCILL GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"

IUSE="doc"

RDEPEND="dev-libs/gmp
        dev-libs/mpfr
        dev-libs/boost"

DEPEND="${RDEPEND}
		doc? ( app-text/texlive
				app-text/ghostscript-gpl 
				app-doc/doxygen )"

src_unpack() {
	unpack ${A}
	cd ${S}
	
	sed -i doc/doxygen/Doxyfile \
		-e "s/GENERATE_LATEX         = NO/GENERATE_LATEX         = YES/g" \
		-e "s/USE_PDFLATEX           = NO/USE_PDFLATEX           = YES/g" \
		-e "s/PDF_HYPERLINKS         = NO/PDF_HYPERLINKS         = YES/g"
}

src_compile(){
	econf || die "econf failed"
	emake DESTDIR="/" || die "emake failed"

	if use doc; then
		cd doc/doxygen
		doxygen Doxyfile || die "doxygen failed"
		cd ${S}
		emake -C doc/doxygen/latex || die "emake doc failed"
	fi
}

src_install(){
	emake install DESTDIR="${D}" || die "emake install failed"
	dodoc AUTHORS NEWS README

	if use doc; then
		mv doc/doxygen/latex/refman.pdf ./gappa.pdf
		dodoc ./gappa.pdf
	fi
}