aboutsummaryrefslogtreecommitdiff
blob: 55bc65684122eade6b7b55e48d131e643fb6cd27 (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-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit autotools eutils

DESCRIPTION=" Why3 is a platform for deductive program verification"
HOMEPAGE="http://why3.lri.fr/"
SRC_URI="https://gforge.inria.fr/frs/download.php/33490/${P}.tar.gz"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="frama-c doc examples"

DEPEND=">=dev-lang/ocaml-3.12.1
		dev-ml/zarith
		sci-mathematics/coq
		frama-c? ( >=sci-mathematics/frama-c-20140301 )
		doc? ( dev-tex/rubber )"
RDEPEND="${DEPEND}"

src_prepare() {
	mv doc/why.1 doc/why3.1
    sed -i configure.in -e "s/\"pvs\"/\"sri-pvs\"/g"
	sed -i configure -e "s/\"pvs\"/\"sri-pvs\"/g"
	sed -i Makefile.in -e "s:DESTDIR =::g" \
		-e "s:\$(RUBBER) --warn all --pdf manual.tex:makeindex manual.tex; \$(RUBBER) --warn all --pdf manual.tex; cd ..:g"
}

src_configure() {
	econf $(use_enable frama-c) || die "econf failed"
}

src_compile() {
	emake -j1 || die "emake failed"
	if use doc; then
		emake -j1 doc/manual.pdf || die "emake doc failed"
	fi
}

src_install(){
	DESTDIR="${D}" emake install || die "emake install failed"
	dodoc CHANGES README Version
	doman doc/why3.1
	if use doc; then
		dodoc doc/manual.pdf
	fi
	if use examples; then
		insinto /usr/share/doc/${PF}
		doins -r examples
	fi
	}