1 |
gienah 12/05/30 00:45:06 |
2 |
|
3 |
Modified: ChangeLog metadata.xml |
4 |
Added: isabelle-2012.ebuild isabelle-2011.1-r1.ebuild |
5 |
Log: |
6 |
Bump to 2011.1-r1 and 2012. Add jedit use flag to build Isabelle/jEdit Prover IDE (PIDE) (2012 only, requires dev-lang/scala), ledit and readline use flags for the preferred tty line editor. Add dev-perl/libwww-perl dep. Add doc-src directory with use=doc (2012) as doc-src stuff is required when building doc some isabelle add on packages (sci-mathematics/haskabelle). |
7 |
|
8 |
(Portage version: 2.1.10.63/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.4 sci-mathematics/isabelle/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/ChangeLog?rev=1.4&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/ChangeLog?rev=1.4&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/ChangeLog?r1=1.3&r2=1.4 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/isabelle/ChangeLog,v |
20 |
retrieving revision 1.3 |
21 |
retrieving revision 1.4 |
22 |
diff -u -r1.3 -r1.4 |
23 |
--- ChangeLog 30 Jan 2012 06:54:53 -0000 1.3 |
24 |
+++ ChangeLog 30 May 2012 00:45:06 -0000 1.4 |
25 |
@@ -1,6 +1,21 @@ |
26 |
# ChangeLog for sci-mathematics/isabelle |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/isabelle/ChangeLog,v 1.3 2012/01/30 06:54:53 gienah Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/isabelle/ChangeLog,v 1.4 2012/05/30 00:45:06 gienah Exp $ |
30 |
+ |
31 |
+*isabelle-2012 (30 May 2012) |
32 |
+*isabelle-2011.1-r1 (30 May 2012) |
33 |
+ |
34 |
+ 30 May 2012; Mark Wright <gienah@g.o> +isabelle-2011.1-r1.ebuild, |
35 |
+ +files/isabelle-2011.1-gentoo-settings.patch, |
36 |
+ +files/isabelle-2011.1-reverse-line-editor-order.patch, |
37 |
+ +isabelle-2012.ebuild, +files/isabelle-2012-gentoo-settings.patch, |
38 |
+ +files/isabelle-2012-graphbrowser.patch, |
39 |
+ +files/isabelle-2012-reverse-line-editor-order.patch, metadata.xml: |
40 |
+ Bump to 2011.1-r1 and 2012. Add jedit use flag to build Isabelle/jEdit Prover |
41 |
+ IDE (PIDE) (2012 only, requires dev-lang/scala), ledit and readline use flags |
42 |
+ for the preferred tty line editor. Add dev-perl/libwww-perl dep. Add doc-src |
43 |
+ directory with use=doc (2012) as doc-src stuff is required when building doc |
44 |
+ some isabelle add on packages (sci-mathematics/haskabelle). |
45 |
|
46 |
30 Jan 2012; Mark Wright <gienah@g.o> isabelle-2011.1.ebuild, |
47 |
metadata.xml: |
48 |
|
49 |
|
50 |
|
51 |
1.3 sci-mathematics/isabelle/metadata.xml |
52 |
|
53 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/metadata.xml?rev=1.3&view=markup |
54 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/metadata.xml?rev=1.3&content-type=text/plain |
55 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/metadata.xml?r1=1.2&r2=1.3 |
56 |
|
57 |
Index: metadata.xml |
58 |
=================================================================== |
59 |
RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/isabelle/metadata.xml,v |
60 |
retrieving revision 1.2 |
61 |
retrieving revision 1.3 |
62 |
diff -u -r1.2 -r1.3 |
63 |
--- metadata.xml 30 Jan 2012 06:54:53 -0000 1.2 |
64 |
+++ metadata.xml 30 May 2012 00:45:06 -0000 1.3 |
65 |
@@ -33,7 +33,11 @@ |
66 |
including HTML documents that show a theory's definition, the |
67 |
theorems proved in its ML file and the relationship with its |
68 |
ancestors and descendants.</flag> |
69 |
+ <flag name='ledit'>Use ledit for the isabelle tty line editor</flag> |
70 |
+ <flag name='readline'>Use readline (rlwrap) for the isabelle tty line |
71 |
+ editor</flag> |
72 |
<flag name='proofgeneral'>Add support for the |
73 |
<pkg>app-emacs/proofgeneral</pkg> proof assistant front end.</flag> |
74 |
+ <flag name='pide'>Build Isabelle/jEdit Prover IDE (PIDE).</flag> |
75 |
</use> |
76 |
</pkgmetadata> |
77 |
|
78 |
|
79 |
|
80 |
1.1 sci-mathematics/isabelle/isabelle-2012.ebuild |
81 |
|
82 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/isabelle-2012.ebuild?rev=1.1&view=markup |
83 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/isabelle-2012.ebuild?rev=1.1&content-type=text/plain |
84 |
|
85 |
Index: isabelle-2012.ebuild |
86 |
=================================================================== |
87 |
# Copyright 1999-2012 Gentoo Foundation |
88 |
# Distributed under the terms of the GNU General Public License v2 |
89 |
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/isabelle/isabelle-2012.ebuild,v 1.1 2012/05/30 00:45:06 gienah Exp $ |
90 |
|
91 |
EAPI="4" |
92 |
|
93 |
inherit eutils java-pkg-2 multilib versionator |
94 |
|
95 |
MY_PN="Isabelle" |
96 |
MY_PV=$(replace_all_version_separators '-') |
97 |
MY_P="${MY_PN}${MY_PV}" |
98 |
|
99 |
JEDIT_PV="20120414" |
100 |
JEDIT_PN="jedit_build" |
101 |
JEDIT_P="${JEDIT_PN}-${JEDIT_PV}" |
102 |
|
103 |
DESCRIPTION="Isabelle is a generic proof assistant" |
104 |
HOMEPAGE="http://www.cl.cam.ac.uk/research/hvg/isabelle/index.html" |
105 |
SRC_URI="http://www.cl.cam.ac.uk/research/hvg/isabelle/dist/${MY_P}.tar.gz |
106 |
doc? ( http://dev.gentoo.org/~gienah/snapshots/${MY_P}-doc-src.tar.gz ) |
107 |
pide? ( http://www4.in.tum.de/~wenzelm/test/${JEDIT_P}.tar.gz )" |
108 |
|
109 |
LICENSE="BSD" |
110 |
SLOT="0" |
111 |
KEYWORDS="~x86 ~amd64" |
112 |
ALL_LOGICS="Pure FOL +HOL ZF CCL CTT Cube FOLP LCF Sequents" |
113 |
IUSE="${ALL_LOGICS} doc graphbrowsing ledit readline pide +proofgeneral test" |
114 |
|
115 |
#upstream says |
116 |
#bash 2.x/3.x, Poly/ML 5.x, Perl 5.x, |
117 |
#for document preparation: complete LaTeX |
118 |
DEPEND=">=app-shells/bash-3.0 |
119 |
>=dev-lang/polyml-5.4.1[-portable] |
120 |
>=dev-lang/perl-5.8.8-r2" |
121 |
|
122 |
RDEPEND="dev-perl/libwww-perl |
123 |
doc? ( |
124 |
virtual/latex-base |
125 |
dev-tex/rail |
126 |
) |
127 |
proofgeneral? ( |
128 |
app-emacs/proofgeneral |
129 |
) |
130 |
pide? ( |
131 |
>=dev-lang/scala-2.8.2 |
132 |
) |
133 |
ledit? ( |
134 |
app-misc/ledit |
135 |
) |
136 |
readline? ( |
137 |
app-misc/rlwrap |
138 |
) |
139 |
${DEPEND}" |
140 |
|
141 |
S="${WORKDIR}"/Isabelle${MY_PV} |
142 |
JEDIT_S="${WORKDIR}/${JEDIT_P}" |
143 |
TARGETDIR="/usr/share/Isabelle"${MY_PV} |
144 |
LIBDIR="/usr/"$(get_libdir)"/Isabelle"${MY_PV} |
145 |
|
146 |
pkg_setup() { |
147 |
java-pkg-2_pkg_setup |
148 |
if ! use proofgeneral |
149 |
then |
150 |
ewarn "You have deselected the Proof General interface." |
151 |
ewarn "Only a text terminal will be installed." |
152 |
ewarn "Emerge Isabelle with the proofgeneral USE flag enabled" |
153 |
ewarn "to get the common interface, that most people want." |
154 |
fi |
155 |
} |
156 |
|
157 |
src_prepare() { |
158 |
java-pkg-2_src_prepare |
159 |
epatch "${FILESDIR}/${PN}-2012-gentoo-settings.patch" |
160 |
polymlver=$(poly -v | cut -d' ' -f2) |
161 |
polymlarch=$(poly -v | cut -d' ' -f9 | cut -d'-' -f1) |
162 |
sed -e "s@5.4.0@${polymlver}@g" \ |
163 |
-i "${S}/etc/settings" \ |
164 |
|| die "Could not configure polyml version in etc/settings" |
165 |
sed -e "s@ML_HOME=\"/@ML_HOME=\"${ROOT}@" \ |
166 |
-i "${S}/etc/settings" \ |
167 |
|| die "Could not configure polyml ML_HOME in etc/settings" |
168 |
sed -e "s@x86_64@${polymlarch}@g" \ |
169 |
-i "${S}/etc/settings" \ |
170 |
|| die "Could not configure polyml arch in etc/settings" |
171 |
sed -e "s@PROOFGENERAL_HOME=\"/@PROOFGENERAL_HOME=\"${ROOT}@" \ |
172 |
-i "${S}/etc/settings" \ |
173 |
|| die "Could not configure PROOFGENERAL_HOME in etc/settings" |
174 |
sed -e "s@/usr/lib64/Isabelle${MY_PV}@${LIBDIR}@g" \ |
175 |
-i "${S}/etc/settings" \ |
176 |
|| die "Could not configure Isabelle lib directory in etc/settings" |
177 |
epatch "${FILESDIR}/${PN}-2012-graphbrowser.patch" |
178 |
cat <<- EOF >> "${S}/etc/settings" |
179 |
|
180 |
ISABELLE_GHC="${ROOT}usr/bin/ghc" |
181 |
ISABELLE_OCAML="${ROOT}usr/bin/ocaml" |
182 |
ISABELLE_SWIPL="${ROOT}usr/bin/swipl" |
183 |
ISABELLE_JDK_HOME="\$(java-config --jdk-home)" |
184 |
SCALA_HOME="${ROOT}usr/share/scala" |
185 |
EOF |
186 |
if use pide; then |
187 |
cat <<- EOF >> "${S}/etc/settings" |
188 |
ISABELLE_JEDIT_BUILD_HOME="\$ISABELLE_HOME/${JEDIT_P}" |
189 |
init_component ${JEDIT_S} |
190 |
EOF |
191 |
fi |
192 |
if use ledit && !use readline; then |
193 |
epatch "${FILESDIR}/${PN}-2012-reverse-line-editor-order.patch" |
194 |
fi |
195 |
} |
196 |
|
197 |
src_compile() { |
198 |
LOGICS="" |
199 |
for l in "${ALL_LOGICS}"; do |
200 |
if has "${l/+/}"; then |
201 |
LOGICS="${LOGICS} ${l/+/}" |
202 |
fi |
203 |
done |
204 |
einfo "Building Isabelle logics ${LOGICS}. This may take some time." |
205 |
./build -b -i "${LOGICS}" || die "building logics failed" |
206 |
./bin/isabelle makeall || die "isabelle makeall failed" |
207 |
if use graphbrowsing |
208 |
then |
209 |
rm -f "${S}/lib/browser/GraphBrowser.jar" \ |
210 |
|| die "failed cleaning graph browser directory" |
211 |
pushd "${S}/lib/browser" \ |
212 |
|| die "Could not change directory to lib/browser" |
213 |
./build || die "failed building the graph browser" |
214 |
popd |
215 |
fi |
216 |
if use pide; then |
217 |
pushd "${S}/src/Tools/jEdit" \ |
218 |
|| die "Could not change directory to src/Tools/jEdit" |
219 |
"${S}"/bin/isabelle jedit -b -f \ |
220 |
|| die "pide build failed" |
221 |
popd |
222 |
# The jedit_build stuff is only required to build |
223 |
# Isabelle/jEdit Prover IDE (PIDE). These 2 lines need to be deleted |
224 |
# from etc/settings as the jedit_build source code is not installed |
225 |
sed -e '/ISABELLE_JEDIT_BUILD_HOME/d' \ |
226 |
-e '/init_component/d' \ |
227 |
-i "${S}/etc/settings" \ |
228 |
|| die "Could not delete jedit_build lines from etc/settings" |
229 |
fi |
230 |
} |
231 |
|
232 |
src_test() { |
233 |
einfo "Running tests. A test run can take up to several hours!" |
234 |
./build -b -t || die "tests failed" |
235 |
} |
236 |
|
237 |
src_install() { |
238 |
exeinto ${TARGETDIR}/bin |
239 |
doexe bin/isabelle-process bin/isabelle |
240 |
|
241 |
insinto ${TARGETDIR} |
242 |
doins -r src |
243 |
doins -r lib |
244 |
|
245 |
if use doc; then |
246 |
# The build of sci-mathematics/haskabelle with use doc requires |
247 |
# sci-mathematics/isabelle[doc?]. The haskabelle doc build requires |
248 |
# the doc-src directory stuff in the isabelle package. Which is not |
249 |
# provided in the Isabelle 2012 src tarball. So extract it from a |
250 |
# snapshot of the isabelle repo taken soon after the Isabelle 2012 |
251 |
# release. |
252 |
doins -r doc-src |
253 |
for i in "./doc-src/IsarRef/showsymbols" \ |
254 |
"./doc-src/TutorialI/Overview/LNCS/makeDemo" \ |
255 |
"./doc-src/TutorialI/isa-index" \ |
256 |
"./doc-src/sedindex" |
257 |
do |
258 |
exeinto $(dirname "${TARGETDIR}/${i}") |
259 |
doexe ${i} |
260 |
done |
261 |
fi |
262 |
|
263 |
for i in "./build" \ |
264 |
"./src/Pure/mk" \ |
265 |
"./src/Pure/build-jars" \ |
266 |
"./src/Tools/JVM/build" \ |
267 |
"./src/Tools/JVM/java_ext_dirs" \ |
268 |
"./src/Tools/jEdit/lib/Tools/jedit" \ |
269 |
"./src/Tools/Metis/fix_metis_license" \ |
270 |
"./src/Tools/Metis/make_metis" \ |
271 |
"./src/Tools/Metis/scripts/mlpp" \ |
272 |
"./src/Tools/WWW_Find/lib/Tools/wwwfind" \ |
273 |
"./src/Tools/Code/lib/Tools/codegen" \ |
274 |
"./src/HOL/Mirabelle/lib/Tools/mirabelle" \ |
275 |
"./src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version" \ |
276 |
"./src/HOL/Tools/SMT/lib/scripts/remote_smt" \ |
277 |
"./src/HOL/Tools/ATP/scripts/remote_atp" \ |
278 |
"./src/HOL/Tools/ATP/scripts/spass" \ |
279 |
"./src/HOL/Mutabelle/lib/Tools/mutabelle" \ |
280 |
"./src/HOL/TPTP/TPTP_Parser/make_mlyacclib" \ |
281 |
"./src/HOL/TPTP/TPTP_Parser/make_tptp_parser" \ |
282 |
"./src/HOL/TPTP/lib/Tools/tptp_isabelle_demo" \ |
283 |
"./src/HOL/TPTP/lib/Tools/tptp_graph" \ |
284 |
"./src/HOL/TPTP/lib/Tools/tptp_isabelle_comp" \ |
285 |
"./src/HOL/TPTP/lib/Tools/tptp_refute" \ |
286 |
"./src/HOL/TPTP/lib/Tools/tptp_translate" \ |
287 |
"./src/HOL/TPTP/lib/Tools/tptp_sledgehammer" \ |
288 |
"./src/HOL/TPTP/lib/Tools/tptp_nitpick" \ |
289 |
"./src/HOL/Library/Sum_of_Squares/neos_csdp_client" \ |
290 |
"./src/HOL/IMP/export.sh" \ |
291 |
"./lib/browser/build" \ |
292 |
"./lib/Tools/tty" \ |
293 |
"./lib/Tools/mkproject" \ |
294 |
"./lib/Tools/keywords" \ |
295 |
"./lib/Tools/browser" \ |
296 |
"./lib/Tools/install" \ |
297 |
"./lib/Tools/mkdir" \ |
298 |
"./lib/Tools/unsymbolize" \ |
299 |
"./lib/Tools/getenv" \ |
300 |
"./lib/Tools/java" \ |
301 |
"./lib/Tools/make" \ |
302 |
"./lib/Tools/emacs" \ |
303 |
"./lib/Tools/scala" \ |
304 |
"./lib/Tools/print" \ |
305 |
"./lib/Tools/latex" \ |
306 |
"./lib/Tools/findlogics" \ |
307 |
"./lib/Tools/doc" \ |
308 |
"./lib/Tools/logo" \ |
309 |
"./lib/Tools/usedir" \ |
310 |
"./lib/Tools/yxml" \ |
311 |
"./lib/Tools/version" \ |
312 |
"./lib/Tools/makeall" \ |
313 |
"./lib/Tools/scalac" \ |
314 |
"./lib/Tools/document" \ |
315 |
"./lib/Tools/env" \ |
316 |
"./lib/Tools/display" \ |
317 |
"./lib/Tools/dimacs2hol" \ |
318 |
"./lib/scripts/keywords" \ |
319 |
"./lib/scripts/unsymbolize" \ |
320 |
"./lib/scripts/run-polyml" \ |
321 |
"./lib/scripts/run-smlnj" \ |
322 |
"./lib/scripts/feeder" \ |
323 |
"./lib/scripts/yxml" \ |
324 |
"./lib/scripts/polyml-version" \ |
325 |
"./lib/scripts/process" |
326 |
do |
327 |
exeinto $(dirname "${TARGETDIR}/${i}") |
328 |
doexe ${i} |
329 |
done |
330 |
|
331 |
docompress -x /usr/share/doc/${PF} |
332 |
dodoc -r doc |
333 |
|
334 |
dodir /etc/isabelle |
335 |
insinto /etc/isabelle |
336 |
doins -r etc/* |
337 |
|
338 |
dosym /etc/isabelle "${TARGETDIR}/etc" |
339 |
dosym "${LIBDIR}/heaps" "${TARGETDIR}/heaps" |
340 |
|
341 |
insinto ${LIBDIR} |
342 |
doins -r heaps |
343 |
|
344 |
bin/isabelle install -d ${TARGETDIR} -p "${ED}usr/bin" \ |
345 |
|| die "isabelle install failed" |
346 |
newicon lib/icons/isabelle.xpm "${PN}.xpm" |
347 |
dodoc ANNOUNCE CONTRIBUTORS COPYRIGHT NEWS README |
348 |
|
349 |
java-pkg_regjar \ |
350 |
"${ED}${TARGETDIR}/src/Tools/JVM/java_ext_dirs.jar" \ |
351 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/QuickNotepad.jar" \ |
352 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/Console.jar" \ |
353 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/ErrorList.jar" \ |
354 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/Hyperlinks.jar" \ |
355 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/SideKick.jar" \ |
356 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/cobra.jar" \ |
357 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/js.jar" \ |
358 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/scala-compiler.jar" \ |
359 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jars/Isabelle-jEdit.jar" \ |
360 |
"${ED}${TARGETDIR}/src/Tools/jEdit/dist/jedit.jar" \ |
361 |
"${ED}${TARGETDIR}/lib/classes/ext/scala-swing.jar" \ |
362 |
"${ED}${TARGETDIR}/lib/classes/ext/scala-library.jar" \ |
363 |
"${ED}${TARGETDIR}/lib/classes/ext/Pure.jar" \ |
364 |
"${ED}${TARGETDIR}/lib/browser/GraphBrowser.jar" |
365 |
} |
366 |
|
367 |
pkg_postinst() { |
368 |
if use ledit && use readline; then |
369 |
elog "Both readline and ledit use flags specified. The default setting" |
370 |
elog "if both are installed is to use readline (rlwrap), this can be" |
371 |
elog "modfied by editing the ISABELLE_LINE_EDITOR setting in" |
372 |
elog "${ROOT}/etc/isabelle/settings" |
373 |
fi |
374 |
elog "You will need to re-emerge Isabelle after emerging polyml." |
375 |
elog "Please ensure you have a pdf viewer installed, for example:" |
376 |
elog "As root: emerge app-text/zathura-pdf-poppler" |
377 |
elog "Please configure your preferred pdf viewer, something like:" |
378 |
elog "As normal user: xdg-mime default zathura.desktop application/pdf" |
379 |
elog "Or alternatively by editing the PDF_VIEWER variable in the system" |
380 |
elog "settings file ${ROOT}etc/isabelle/settings and/or the user" |
381 |
elog "settings file \$HOME/.isabelle/${MY_P}/etc/settings" |
382 |
elog "To improve sledgehammer performance, consider installing:" |
383 |
elog "USE=isabelle emerge sci-mathematics/e sci-mathematics/spass" |
384 |
} |
385 |
|
386 |
|
387 |
|
388 |
1.1 sci-mathematics/isabelle/isabelle-2011.1-r1.ebuild |
389 |
|
390 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/isabelle-2011.1-r1.ebuild?rev=1.1&view=markup |
391 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/isabelle/isabelle-2011.1-r1.ebuild?rev=1.1&content-type=text/plain |
392 |
|
393 |
Index: isabelle-2011.1-r1.ebuild |
394 |
=================================================================== |
395 |
# Copyright 1999-2012 Gentoo Foundation |
396 |
# Distributed under the terms of the GNU General Public License v2 |
397 |
# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/isabelle/isabelle-2011.1-r1.ebuild,v 1.1 2012/05/30 00:45:06 gienah Exp $ |
398 |
|
399 |
EAPI="4" |
400 |
|
401 |
inherit eutils java-pkg-2 multilib versionator |
402 |
|
403 |
MY_PN="Isabelle" |
404 |
MY_PV=$(replace_all_version_separators '-') |
405 |
MY_P="${MY_PN}${MY_PV}" |
406 |
|
407 |
DESCRIPTION="Isabelle is a generic proof assistant" |
408 |
HOMEPAGE="http://www.cl.cam.ac.uk/research/hvg/isabelle/index.html" |
409 |
SRC_URI="http://www.cl.cam.ac.uk/research/hvg/isabelle/dist/${MY_P}.tar.gz" |
410 |
|
411 |
LICENSE="BSD" |
412 |
SLOT="0" |
413 |
KEYWORDS="~x86 ~amd64" |
414 |
ALL_LOGICS="Pure FOL +HOL ZF CCL CTT Cube FOLP LCF Sequents" |
415 |
IUSE="${ALL_LOGICS} doc graphbrowsing ledit readline +proofgeneral test" |
416 |
|
417 |
#upstream says |
418 |
#bash 2.x/3.x, Poly/ML 5.x, Perl 5.x, |
419 |
#for document preparation: complete LaTeX |
420 |
DEPEND=">=app-shells/bash-3.0 |
421 |
>=dev-lang/polyml-5.4.1[-portable] |
422 |
>=dev-lang/perl-5.8.8-r2" |
423 |
|
424 |
RDEPEND="dev-perl/libwww-perl |
425 |
doc? ( |
426 |
virtual/latex-base |
427 |
dev-tex/rail |
428 |
) |
429 |
proofgeneral? ( |
430 |
app-emacs/proofgeneral |
431 |
) |
432 |
ledit? ( |
433 |
app-misc/ledit |
434 |
) |
435 |
readline? ( |
436 |
app-misc/rlwrap |
437 |
) |
438 |
${DEPEND}" |
439 |
|
440 |
S="${WORKDIR}"/Isabelle${MY_PV} |
441 |
TARGETDIR="/usr/share/Isabelle"${MY_PV} |
442 |
LIBDIR="/usr/"$(get_libdir)"/Isabelle"${MY_PV} |
443 |
|
444 |
pkg_setup() { |
445 |
java-pkg-2_pkg_setup |
446 |
if ! use proofgeneral |
447 |
then |
448 |
ewarn "You have deselected the Proof General interface." |
449 |
ewarn "Only a text terminal will be installed." |
450 |
ewarn "Emerge Isabelle with the proofgeneral USE flag enabled" |
451 |
ewarn "to get the common interface, that most people want." |
452 |
fi |
453 |
} |
454 |
|
455 |
src_prepare() { |
456 |
java-pkg-2_src_prepare |
457 |
epatch "${FILESDIR}/${PN}-2011.1-gentoo-settings.patch" |
458 |
polymlver=$(poly -v | cut -d' ' -f2) |
459 |
polymlarch=$(poly -v | cut -d' ' -f9 | cut -d'-' -f1) |
460 |
sed -e "s@5.4.0@${polymlver}@g" \ |
461 |
-i "${S}/etc/settings" \ |
462 |
|| die "Could not configure polyml version in etc/settings" |
463 |
sed -e "s@ML_HOME=\"/@ML_HOME=\"${ROOT}@" \ |
464 |
-i "${S}/etc/settings" \ |
465 |
|| die "Could not configure polyml ML_HOME in etc/settings" |
466 |
sed -e "s@x86_64@${polymlarch}@g" \ |
467 |
-i "${S}/etc/settings" \ |
468 |
|| die "Could not configure polyml arch in etc/settings" |
469 |
sed -e "s@PROOFGENERAL_HOME=\"/@PROOFGENERAL_HOME=\"${ROOT}@" \ |
470 |
-i "${S}/etc/settings" \ |
471 |
|| die "Could not configure PROOFGENERAL_HOME in etc/settings" |
472 |
sed -e "s@/usr/lib64/Isabelle${MY_PV}@${LIBDIR}@g" \ |
473 |
-i "${S}/etc/settings" \ |
474 |
|| die "Could not configure Isabelle lib directory in etc/settings" |
475 |
epatch "${FILESDIR}/${PN}-2011.1-graphbrowser.patch" |
476 |
cat <<- EOF >> "${S}/etc/settings" |
477 |
|
478 |
ISABELLE_GHC="${ROOT}usr/bin/ghc" |
479 |
ISABELLE_OCAML="${ROOT}usr/bin/ocaml" |
480 |
ISABELLE_SWIPL="${ROOT}usr/bin/swipl" |
481 |
ISABELLE_JDK_HOME="\$(java-config --jdk-home)" |
482 |
SCALA_HOME="${ROOT}usr/share/scala" |
483 |
EOF |
484 |
if use ledit && !use readline; then |
485 |
epatch "${FILESDIR}/${PN}-2011.1-reverse-line-editor-order.patch" |
486 |
fi |
487 |
} |
488 |
|
489 |
src_compile() { |
490 |
LOGICS="" |
491 |
for l in "${ALL_LOGICS}"; do |
492 |
if has "${l/+/}"; then |
493 |
LOGICS="${LOGICS} ${l/+/}" |
494 |
fi |
495 |
done |
496 |
einfo "Building Isabelle logics ${LOGICS}. This may take some time." |
497 |
./build -b -i "${LOGICS}" || die "building logics failed" |
498 |
./bin/isabelle makeall || die "isabelle makeall failed" |
499 |
if use graphbrowsing |
500 |
then |
501 |
rm -f "${S}/lib/browser/GraphBrowser.jar" \ |
502 |
|| die "failed cleaning graph browser directory" |
503 |
pushd "${S}/lib/browser" \ |
504 |
|| die "Could not change directory to lib/browser" |
505 |
./build || die "failed building the graph browser" |
506 |
popd |
507 |
fi |
508 |
} |
509 |
|
510 |
src_test() { |
511 |
einfo "Running tests. A test run can take up to several hours!" |
512 |
./build -b -t || die "tests failed" |
513 |
} |
514 |
|
515 |
src_install() { |
516 |
exeinto ${TARGETDIR}/bin |
517 |
doexe bin/isabelle-process bin/isabelle |
518 |
|
519 |
insinto ${TARGETDIR} |
520 |
doins -r src |
521 |
doins -r lib |
522 |
|
523 |
for i in "./build" \ |
524 |
"src/Pure/mk" \ |
525 |
"src/Pure/build-jars" \ |
526 |
"src/Tools/jEdit/dist/build-support/ci/copy_properties.groovy" \ |
527 |
"src/Tools/jEdit/dist/build-support/ci/ci_release.groovy" \ |
528 |
"src/Tools/jEdit/lib/Tools/jedit" \ |
529 |
"src/Tools/Metis/fix_metis_license" \ |
530 |
"src/Tools/Metis/make_metis" \ |
531 |
"src/Tools/Metis/scripts/mlpp" \ |
532 |
"src/Tools/WWW_Find/lib/Tools/wwwfind" \ |
533 |
"src/Tools/Code/lib/Tools/codegen" \ |
534 |
"src/HOL/Mirabelle/lib/Tools/mirabelle" \ |
535 |
"src/HOL/Tools/Predicate_Compile/lib/scripts/swipl_version" \ |
536 |
"src/HOL/Tools/SMT/lib/scripts/remote_smt" \ |
537 |
"src/HOL/Tools/ATP/scripts/remote_atp" \ |
538 |
"src/HOL/Tools/ATP/scripts/spass" \ |
539 |
"src/HOL/Tools/Nitpick/lib/Tools/nitrox" \ |
540 |
"src/HOL/Mutabelle/lib/Tools/mutabelle" \ |
541 |
"src/HOL/Library/Sum_of_Squares/neos_csdp_client" \ |
542 |
"lib/browser/build" \ |
543 |
"lib/Tools/tty" \ |
544 |
"lib/Tools/mkproject" \ |
545 |
"lib/Tools/keywords" \ |
546 |
"lib/Tools/browser" \ |
547 |
"lib/Tools/install" \ |
548 |
"lib/Tools/mkdir" \ |
549 |
"lib/Tools/unsymbolize" \ |
550 |
"lib/Tools/getenv" \ |
551 |
"lib/Tools/java" \ |
552 |
"lib/Tools/make" \ |
553 |
"lib/Tools/emacs" \ |
554 |
"lib/Tools/scala" \ |
555 |
"lib/Tools/print" \ |
556 |
"lib/Tools/latex" \ |
557 |
"lib/Tools/findlogics" \ |
558 |
"lib/Tools/doc" \ |
559 |
"lib/Tools/logo" \ |
560 |
"lib/Tools/usedir" \ |
561 |
"lib/Tools/yxml" \ |
562 |
"lib/Tools/version" \ |
563 |
"lib/Tools/makeall" \ |
564 |
"lib/Tools/scalac" \ |
565 |
"lib/Tools/document" \ |
566 |
"lib/Tools/env" \ |
567 |
"lib/Tools/display" \ |
568 |
"lib/Tools/dimacs2hol" \ |
569 |
"lib/scripts/keywords" \ |
570 |
"lib/scripts/unsymbolize" \ |
571 |
"lib/scripts/run-polyml" \ |
572 |
"lib/scripts/run-smlnj" \ |
573 |
"lib/scripts/feeder" \ |
574 |
"lib/scripts/java_ext_dirs" \ |
575 |
"lib/scripts/yxml" \ |
576 |
"lib/scripts/raw_dump" \ |
577 |
"lib/scripts/polyml-version" \ |
578 |
"lib/scripts/process" |
579 |
do |
580 |
exeinto $(dirname "${TARGETDIR}/${i}") |
581 |
doexe ${i} |
582 |
done |
583 |
|
584 |
docompress -x /usr/share/doc/${PF} |
585 |
dodoc -r doc |
586 |
|
587 |
dodir /etc/isabelle |
588 |
insinto /etc/isabelle |
589 |
doins -r etc/* |
590 |
|
591 |
dosym /etc/isabelle "${TARGETDIR}/etc" |
592 |
dosym "${LIBDIR}/heaps" "${TARGETDIR}/heaps" |
593 |
|
594 |
insinto ${LIBDIR} |
595 |
doins -r heaps |
596 |
|
597 |
bin/isabelle install -d ${TARGETDIR} -p "${ED}usr/bin" \ |
598 |
|| die "isabelle install failed" |
599 |
newicon lib/icons/isabelle.xpm "${PN}.xpm" |
600 |
dodoc ANNOUNCE CONTRIBUTORS COPYRIGHT NEWS README |
601 |
|
602 |
java-pkg_regjar \ |
603 |
"${ED}${TARGETDIR}/lib/browser/GraphBrowser.jar" \ |
604 |
"${ED}${TARGETDIR}/lib/classes/ext/Pure.jar" \ |
605 |
"${ED}${TARGETDIR}/lib/classes/ext/scala-library.jar" \ |
606 |
"${ED}${TARGETDIR}/lib/classes/ext/scala-swing.jar" \ |
607 |
"${ED}${TARGETDIR}/lib/classes/java_ext_dirs.jar" |
608 |
} |
609 |
|
610 |
pkg_postinst() { |
611 |
if use ledit && use readline; then |
612 |
elog "Both readline and ledit use flags specified. The default setting" |
613 |
elog "if both are installed is to use readline (rlwrap), this can be" |
614 |
elog "modfied by editing the ISABELLE_LINE_EDITOR setting in" |
615 |
elog "${ROOT}/etc/isabelle/settings" |
616 |
fi |
617 |
elog "You will need to re-emerge Isabelle after emerging polyml." |
618 |
elog "Please ensure you have a pdf viewer installed, for example:" |
619 |
elog "As root: emerge app-text/zathura-pdf-poppler" |
620 |
elog "Please configure your preferred pdf viewer, something like:" |
621 |
elog "As normal user: xdg-mime default zathura.desktop application/pdf" |
622 |
elog "Or alternatively by editing the PDF_VIEWER variable in the system" |
623 |
elog "settings file ${ROOT}etc/isabelle/settings and/or the user" |
624 |
elog "settings file \$HOME/.isabelle/${MY_P}/etc/settings" |
625 |
elog "To improve sledgehammer performance, consider installing:" |
626 |
elog "USE=isabelle emerge sci-mathematics/e sci-mathematics/spass" |
627 |
} |