1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
10 DESCRIPTION="E is a theorem prover for full first-order logic with equality"
11 HOMEPAGE="http://www4.informatik.tu-muenchen.de/~schulz/E/E.html"
12 SRC_URI="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_${PV}/${MY_PN}.tgz -> ${MY_P}.tgz"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="doc examples isabelle"
20 >=sci-mathematics/isabelle-2011.1-r1:=
24 S="${WORKDIR}"/${MY_PN}
27 ./configure --prefix="${ROOT}usr" \
28 --man-prefix="${ROOT}share/man" \
29 || die "E configure failed"
31 sed -e "s@CFLAGS = @CFLAGS = ${CFLAGS} @" \
32 -e "s@LD = \$(CC) @LD = \$(CC) ${LDFLAGS} @" \
33 -i "${S}/Makefile.vars" \
34 || die "Could not add our flags to Makefile.vars"
38 for i in "${S}/PROVER/eprover" \
39 "${S}/PROVER/epclextract" \
40 "${S}/PROVER/eproof" \
41 "${S}/PROVER/eproof_ram" \
42 "${S}/PROVER/eground" \
43 "${S}/PROVER/e_ltb_runner" \
44 "${S}/PROVER/e_axfilter" \
45 "${S}/PROVER/checkproof" \
46 "${S}/PROVER/ekb_create" \
47 "${S}/PROVER/ekb_delete" \
48 "${S}/PROVER/ekb_ginsert" \
49 "${S}/PROVER/ekb_insert"
54 for i in "${S}/DOC/man/eprover.1" \
55 "${S}/DOC/man/epclextract.1" \
56 "${S}/DOC/man/eproof.1" \
57 "${S}/DOC/man/eproof_ram.1" \
58 "${S}/DOC/man/eground.1" \
59 "${S}/DOC/man/e_ltb_runner.1" \
60 "${S}/DOC/man/e_axfilter.1" \
61 "${S}/DOC/man/checkproof.1" \
62 "${S}/DOC/man/ekb_create.1" \
63 "${S}/DOC/man/ekb_delete.1" \
64 "${S}/DOC/man/ekb_ginsert.1" \
65 "${S}/DOC/man/ekb_insert.1"
71 pushd "${S}"/DOC || die "Could not cd to DOC"
72 dodoc ANNOUNCE CREDITS DONE E-REMARKS E-REMARKS.english E-USERS \
73 HISTORY NEWS PORTING ReadMe THINKME TODO TPTP_SUBMISSION \
76 insinto /usr/share/doc/${PF}/html
82 dodir /usr/share/${MY_PN}/examples
83 insinto /usr/share/${MY_PN}/examples
84 doins -r EXAMPLE_PROBLEMS
89 ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
90 || die "isabelle getenv ISABELLE_HOME failed"
91 [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
92 dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
93 cat <<- EOF >> "${S}/settings"
94 E_HOME="${ROOT}usr/bin"
97 insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
103 if use isabelle; then
104 if [ -f "${ROOT}etc/isabelle/components" ]; then
105 if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
106 sed -e "/contrib\/${PN}-[0-9.]*/d" \
107 -i "${ROOT}etc/isabelle/components"
109 cat <<- EOF >> "${ROOT}etc/isabelle/components"
117 if use isabelle; then
118 if [ ! -f "${ROOT}usr/bin/eproof" ]; then
119 if [ -f "${ROOT}etc/isabelle/components" ]; then
120 # Note: this sed should only match the version of this ebuild
121 # Which is what we want as we do not want to remove the line
122 # of a new E being installed during an upgrade.
123 sed -e "/contrib\/${PN}-${PV}/d" \
124 -i "${ROOT}etc/isabelle/components"