aboutsummaryrefslogtreecommitdiff
blob: 5302b3c554fea622110a9b0d478bab3eb2a9bb76 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit eutils

DESCRIPTION="ACL2 industrial strength theorem prover"
HOMEPAGE="http://www.cs.utexas.edu/users/moore/acl2/"
SRC_URI="
	http://www.cs.utexas.edu/users/moore/${PN}/v${PV/\./-}/distrib/${PN}.tar.gz -> ${P}.tar.gz
	books? ( https://acl2-books.googlecode.com/files/books-${PV}.tar.gz
	workshops? ( http://acl2-books.googlecode.com/files/workshops-${PV}.tar.gz ) )"

SLOT="0"
LICENSE="BSD"
KEYWORDS="~amd64 ~x86"
IUSE="+books workshops html"

REQUIRED_USE="workshops? ( books )"

DEPEND="
	dev-lisp/sbcl
	books? ( dev-lang/perl )"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${PN}-sources"

src_unpack() {
	default
	if use books; then
		mv "${WORKDIR}/books" "${S}"/ || die
		if use workshops; then
			mv "${WORKDIR}/workshops" "${S}/books/" || die
		fi
	fi
}

src_compile() {
	emake LISP="sbcl --noinform --noprint"

	if use books; then
		echo
		einfo "Building certificates ..."
		einfo "(this may take hours to finish)"
		emake regression
	fi
}

src_install() {
	sed -e "s:${S}:/usr/share/acl2:g" -i saved_acl2 || die
	if use books; then
		sed -e "/5/a export ACL2_SYSTEM_BOOKS=/usr/share/acl2/books/" \
			-i saved_acl2 || die
	fi
	dobin saved_acl2

	insinto /usr/share/acl2
	doins TAGS saved_acl2.core
	if use books; then
		doins -r books
	fi

	if use html; then
		dohtml -r doc/HTML
	fi
	doinfo doc/EMACS/*
}