/[gentoo-x86]/sci-mathematics/isabelle/isabelle-2011.1.ebuild
Gentoo

Contents of /sci-mathematics/isabelle/isabelle-2011.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Jan 30 06:54:53 2012 UTC (2 years, 5 months ago) by gienah
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Fix bug #400961, thanks to Mr. Anderson for report and fix.

(Portage version: 2.1.10.44/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/isabelle/isabelle-2011.1.ebuild,v 1.2 2012/01/09 13:49:21 gienah Exp $
4
5 EAPI="4"
6
7 JAVA_PKG_OPT_USE="graphbrowsing"
8 inherit eutils java-pkg-opt-2 multilib versionator
9
10 MY_PN="Isabelle"
11 MY_PV=$(replace_all_version_separators '-')
12 MY_P="${MY_PN}${MY_PV}"
13
14 DESCRIPTION="Isabelle is a generic proof assistant"
15 HOMEPAGE="http://www.cl.cam.ac.uk/research/hvg/isabelle/index.html"
16 SRC_URI="http://www.cl.cam.ac.uk/research/hvg/isabelle/dist/${MY_P}.tar.gz"
17
18 LICENSE="BSD"
19 SLOT="0"
20 KEYWORDS="~x86 ~amd64"
21 ALL_LOGICS="Pure FOL +HOL ZF CCL CTT Cube FOLP LCF Sequents"
22 IUSE="${ALL_LOGICS} doc graphbrowsing +proofgeneral test"
23
24 #upstream says
25 #bash 2.x/3.x, Poly/ML 5.x, Perl 5.x,
26 #for document preparation: complete LaTeX
27 DEPEND=">=app-shells/bash-3.0
28 >=dev-lang/polyml-5.4.1[-portable]
29 >=dev-lang/perl-5.8.8-r2"
30
31 RDEPEND="doc? (
32 virtual/latex-base
33 dev-tex/rail
34 )
35 proofgeneral? (
36 app-emacs/proofgeneral
37 )
38 ${DEPEND}"
39
40 S="${WORKDIR}"/Isabelle${MY_PV}
41 TARGETDIR="/usr/share/Isabelle"${MY_PV}
42 LIBDIR="/usr/"$(get_libdir)"/Isabelle"${MY_PV}
43
44 pkg_setup() {
45 java-pkg-opt-2_pkg_setup
46 if ! use proofgeneral
47 then
48 ewarn "You have deselected the Proof General interface."
49 ewarn "Only a text terminal will be installed."
50 ewarn "Emerge Isabelle with the proofgeneral USE flag enabled"
51 ewarn "to get the common interface, that most people want."
52 fi
53 }
54
55 src_prepare() {
56 java-pkg-opt-2_src_prepare
57 if use proofgeneral; then
58 epatch "${FILESDIR}/${PN}-2011.1-proofgeneral-gentoo-path.patch"
59 polymlver=$(poly -v | cut -d' ' -f2)
60 polymlarch=$(poly -v | cut -d' ' -f9 | cut -d'-' -f1)
61 sed -e "s@5.4.0@${polymlver}@g" \
62 -i "${S}/etc/settings" \
63 || die "Could not configure polyml version in etc/settings"
64 sed -e "s@x86_64@${polymlarch}@g" \
65 -i "${S}/etc/settings" \
66 || die "Could not configure polyml arch in etc/settings"
67 fi
68 if use graphbrowsing; then
69 epatch "${FILESDIR}/${PN}-2011.1-graphbrowser.patch"
70 fi
71 }
72
73 src_compile() {
74 LOGICS=""
75 for l in "${ALL_LOGICS}"; do
76 if has "${l/+/}"; then
77 LOGICS="${LOGICS} ${l/+/}"
78 fi
79 done
80 einfo "Building Isabelle logics ${LOGICS}. This may take some time."
81 ./build -b -i "${LOGICS}" || die "building logics failed"
82 ./bin/isabelle makeall || die "isabelle makeall failed"
83 if use graphbrowsing
84 then
85 rm -f "${S}/lib/browser/GraphBrowser.jar" \
86 || die "failed cleaning graph browser directory"
87 pushd "${S}/lib/browser" \
88 || die "Could not change directory to lib/browser"
89 ./build || die "failed building the graph browser"
90 popd
91 fi
92 }
93
94 src_test() {
95 einfo "Running tests. A test run can take up to several hours!"
96 ./build -b -t || die "tests failed"
97 }
98
99 src_install() {
100 exeinto ${TARGETDIR}/bin
101 doexe bin/isabelle-process bin/isabelle
102
103 exeinto ${TARGETDIR}
104 doexe build
105
106 insinto ${TARGETDIR}
107 doins -r src
108 dodoc -r doc
109
110 dodir /etc/isabelle
111 insinto /etc/isabelle
112 doins -r etc/*
113
114 dosym /etc/isabelle "${TARGETDIR}/etc"
115 dosym "${LIBDIR}/heaps" "${TARGETDIR}/heaps"
116
117 insinto ${LIBDIR}
118 doins -r heaps
119
120 # use cp to keep file attributes
121 cp -R lib "${ED}${TARGETDIR}" || die "install lib failed"
122
123 bin/isabelle install -d ${TARGETDIR} -p "${ED}usr/bin" \
124 || die "isabelle install failed"
125 newicon lib/icons/isabelle.xpm "${PN}.xpm"
126 dodoc ANNOUNCE CONTRIBUTORS COPYRIGHT NEWS README
127
128 java-pkg_regjar \
129 "${ED}${TARGETDIR}/lib/browser/GraphBrowser.jar" \
130 "${ED}${TARGETDIR}/lib/classes/ext/Pure.jar" \
131 "${ED}${TARGETDIR}/lib/classes/ext/scala-library.jar" \
132 "${ED}${TARGETDIR}/lib/classes/ext/scala-swing.jar" \
133 "${ED}${TARGETDIR}/lib/classes/java_ext_dirs.jar"
134 }
135
136 pkg_postinst() {
137 elog "You will need to re-emerge Isabelle after emerging polyml."
138 elog "Please configure your preferred pdf viewer by editing"
139 elog "the PDF_VIEWER variable in the system settings file"
140 elog "/etc/isabelle/settings and/or the user settings file"
141 elog "\$HOME/.isabelle/${MY_P}/etc/settings"
142 }

  ViewVC Help
Powered by ViewVC 1.1.20