summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2016-02-16 22:18:46 +1100
committerMark Wright <gienah@gentoo.org>2016-02-16 22:18:46 +1100
commite03efabf52fd874c48d7e3bfdc6a436a044bd1a3 (patch)
tree36b0ecf29fd9c65f5655a44e9834b27da64ef777 /sci-mathematics
parentsci-mathematics/csdp: Add CSDP, A C Library for Semidefinite Programming (diff)
downloadgentoo-e03efabf52fd874c48d7e3bfdc6a436a044bd1a3.tar.gz
gentoo-e03efabf52fd874c48d7e3bfdc6a436a044bd1a3.tar.bz2
gentoo-e03efabf52fd874c48d7e3bfdc6a436a044bd1a3.zip
sci-mathematics/isabelle: Bump to 2015, check diskspace and memory.
Thanks to Toralf F?rster for reporting the need to check diskspace, and Jonas Jelten for requesting the version bump. Gentoo-Bugs: 548864 562864 Package-Manager: portage-2.2.27
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/isabelle/Manifest6
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2015-classpath.patch26
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2015-jfreechart-classpath.patch16
-rw-r--r--sci-mathematics/isabelle/isabelle-2015.ebuild301
4 files changed, 349 insertions, 0 deletions
diff --git a/sci-mathematics/isabelle/Manifest b/sci-mathematics/isabelle/Manifest
index f3bd2a8ec892..87a47c5dd225 100644
--- a/sci-mathematics/isabelle/Manifest
+++ b/sci-mathematics/isabelle/Manifest
@@ -3,9 +3,15 @@ DIST Isabelle2012-doc-src.tar.gz 2688496 SHA256 e18965fe0f7f89b286d4707e38201f1e
DIST Isabelle2012.tar.gz 49529865 SHA256 b86f957dee221041f92c9d4ced4758d45b4950339743d0d58b1ea6061e2b53f0 SHA512 1346f563233eba10bc14f7d140706b8bfba8e832f7ee5887316c829926136af07d700914a925272d8adc1275b0bdd682540518957910c136a15bfc60d61285a0 WHIRLPOOL 23b764a1a0044a9525d058e95da318f4425fadf7660edc8ab8f35b248f98dcff0dba2e533ff18d8bf47ea164cec12a9648642749de2a49887bbe84ed4e71a68b
DIST Isabelle2013-2.tar.gz 52603110 SHA256 602e91377b0999c25950ae2a34c0fcb23e3aff3a196bdbc5ce61634bd90d7f22 SHA512 464a2735b2f4e28dcf44e55cd4abb4d8766a6bb7eb86f989f3592e7819e33d97922bdfb6701da85aa9d7c4cc2aee3eadebde1c7e3fc74bb3f6108a5daf5fea45 WHIRLPOOL 0dc354d60e3440ea0909dc09f25b66cb301b82f88fbe21c0b7f4bfef40ecc3631014757abd8657f0464047f0ad32827ad308e3f998fcf2477e05907ff7b19a84
DIST Isabelle2013.tar.gz 54638791 SHA256 2f2cda9939248bd4346ad7e074cb6b2cfad70708777491c6262a5ae670c8f83a SHA512 e03f9b747f678749a562c3de6100f4f4e010ace51b2eb13bcde0a63591eec0cb4e081f7fad9147d022fe787b56eac3f037ab3a296080fd70cc7d058ea961a789 WHIRLPOOL 5cbcbc93bd2ce4723034c3d95d4678b2de90c924601b795c5da378cb76f58275e5d5f47ce9120234a9ea36e43ab759ced843dca76942378abfa1fb7aff858a65
+DIST Isabelle2015.tar.gz 36529154 SHA256 08723d3be6f91c57a7a69a8624c54cc1e0cd31506988bf29ed365a5aa5a5156f SHA512 052bb80316a9345368a295a7c5f3869b58d71a6879548fc6240a04fd2cf8c11406274ead8a1ed098563ef9b7573a826656da543e745044fc1d275322af5cc212 WHIRLPOOL 0be4759a1064f4759c2f227b037c448093ff36b47e16002fbb7e99d2843583e01314c4ea5c7a8cbf4d1304f8f72a383052911e483d51e4af2e68c4c36dea5121
+DIST csdp-isabelle-component-6.x.tar.gz 493 SHA256 65dde42fa476095052ca3820df4c0e45089653d4467a53de711c8e13670a1b19 SHA512 9be28ecbf61d0f6ad23e28d44bd7ceb8f06ab22f3a05a7c823a9c5bf52ddcf5e5c300c41e14451d6b8e6a4c32b1bbd17769c731cd890fab335a866cd5e735290 WHIRLPOOL c930c531637172e4c75ec44d68f71e69e748a8b976fa3651ef4015fb6a90e30b568bd092632dc16c6389aac09bc13f3249af6c3ac261f09ad2dc5ad915282f99
+DIST exec_process-isabelle-component-1.0.3.tar.gz 814 SHA256 ee3b7b299852bcfd0bf7ffce6c8cd2279f2d71247c4a7b0042971b31c2b2a89d SHA512 7880b7f9843ff5806ab37d938a817a5b33e973772d9a6c6cf76bf04076fb532309bd22dfaa203be7c72c07f5a638f0f97e730c414ed164024fd31f1f09fc7c09 WHIRLPOOL 9d9beb7a41baac8b591ceee31bb7b69e1dd07fce66757511649977f6a85d85eef525ba0be13b0873c1aef47de0eace8bf88283b4a136397000e61cfc81da8d4d
DIST jedit_build-20120414.tar.gz 7509120 SHA256 3c5840fd01b87013b05a92742d41f66f655df6fe9edef1525c6722f92d8f3e41 SHA512 2e2f0db4964a041ba54382a9c787246e1d433e43167019c6ea8d4cf6beb84ce438c0bc559d2588229b0166c91bac603bed39abc45d5d4267020f55eaba1aaa0c WHIRLPOOL 40b883943bde312b4c7adc43607ba4759e5ebe22cab3c922c81393375f917af21d4a8dc068e5692ffcf7bdfb1e7fe3081358dc8e346d1942582bf79e249b0cbb
DIST jedit_build-isabelle-component-20130104.tar.gz 10734679 SHA256 22a4880deb1054a548476b22662b42bfaf5394ceb07b30eba69be433bcea1074 SHA512 bacdb3ca73d48fe9ba71dd32cd68e98333831f205dd3ced69bb9344c5b167ba084662f1108690f371b4b64f6b786955a332bcd51a2dc21c2179fb1b4727430dd WHIRLPOOL fc97923e08202e117ca3112b69f74a9f4663a70f55fa051ac55e02c85be57423f762263cac2ded33d9c2f412736e4fa0937aa07df3f36b915e806959055a796b
DIST jedit_build-isabelle-component-20131106.tar.gz 8796625 SHA256 a13a896263804f5aee82db0e1fe6be7982abe3ca1266cd15f7fe9c8c2f6e2ba5 SHA512 7fc3313916cd408c906e453a4895f49223a8b9dc1e2c577c16468394b73a3724449b411521884d419683cd3d2eb3ef59929608483ff092b9b0e3663efd5e136e WHIRLPOOL 4e7c933df7eea5b9c312f8e0c2c46d44a442d0dd2bb76415bea1fcf307ff75d1f8fb592fe4cad647674dc387fe6fa017dbf4e0cf2ec64459bdafb093470e2abf
+DIST jedit_build-isabelle-component-20150228.tar.gz 10674317 SHA256 2bee3c5242a3ce4150656f106e658096e82b6bd966e04d590e20023a956be29b SHA512 ba2d0804f21cee596fc3528a592941efc393e98b890efe054aed18fc0d31edfe459047b58ed79b42892e219b4c35a4fb5c8cca0f402b96d641ff8ce62e321339 WHIRLPOOL b2971bdef70e32d858385cb58603d6a5a7e357dbbc9810569093a31332a7838387f43a76a65048a12f259f08de86f200e962ccf2deb2bd3cd4e83dc4c1e41d8b
DIST jfreechart-isabelle-component-1.0.14-1.tar.gz 3444825 SHA256 b0eb7365c4c5877379889100f081a4afc4117afc0d332941c3dd01bef2c4aee9 SHA512 ee1d84a45e43029d5e3acee823176196da19789322e8d3c2c81d5504930ad81d50e16e5da87655e4151034901daefb4ce6b82334839e39134b3a7ce32203aa67 WHIRLPOOL e6f9caadb802ecb5b784e86e96c008e9271aa0b1c940152fb0b0358280d9c1e274bb0dee1507f8ff0fe7f43f863db538d631c76e146d1f66ab6e8a8fb27eb42d
DIST jfreechart-isabelle-component-1.0.14.tar.gz 3443727 SHA256 c873ad6f07edbcceb5c76aac2e848c7d7f12c78c93c05f7e97c4b1fdba7c2df0 SHA512 c55ec01b215368f064de2f288f788960a256445adca5565c00aa9c0fab5732707a9e72bcdb3838676c80e735c520b9948855d7a32b9076bf35f1a279320ee72a WHIRLPOOL ba1a75e21525c302a3b755d814502dad60c540c2004dd894f60fdd6966766f85d71bbb45728ca220a4a7cff334de81db756fbb89e1059f32e248cabf0a7b97d6
DIST polyml-isabelle-component-5.5.1-1.tar.gz 831 SHA256 f19a4dfc3117792423270cb98a5c406f7339f4bd7715c16976a281d964792844 SHA512 35ab69d0fd2737f3c6a13ca022103428bcb0e71032304d244614d271848b9ae8986da25bd4ef02668eef169f3a3a72576a619152ce3cbf036af7aa365e857c1a WHIRLPOOL 682e25b677e1b0401a43d4cff35c69658359b4c74f86d3459c050e7c7b0d17f1de1e7b792f2a51f97acf574ad56b3e89ade688bc24d090b3e89eaf0cb99a08d5
+DIST polyml-isabelle-component-5.5.2-3.tar.gz 691 SHA256 1ba253974193efc70711b7fe32cc831d8bcc13107b0b130ddf6087bb6ff6d3e7 SHA512 45d68fa7a07ae9fc39cb21fa4c4c43a34576377fb828c8652002c56cc9ec7b3c7b5fcefb7604fc4bc90ce4868dd2fca41ddf37ce285da4902664ab21e4657b3f WHIRLPOOL 3a85c59b1bb928c5ea91f8150c6ded5309fae96bd7558b56e6c3d8f04c418b03b57fb49565af5ed919179fd9e30c957575ca7b65d938ce69c5d3131d8c55ab1e
+DIST xz-java-isabelle-component-1.5.tar.gz 315 SHA256 e7fdd433608561c87558d4d0ee39166e8396ce11242e85391417ec7fd3ce7b8e SHA512 6dfec49e12c4cafbb6b6386dd54477e86b6bb419a77c52d9606a0305aeea9cd11f087ed6bba77352c7bf9ec656052ef617e845f472e57b5cdfbccf22b2eeb4fa WHIRLPOOL 9c1fc16db0adc88557b81608902d9d69007dc90d5849f4f7501101930842ce81ded76af0e76e38df8bd0b07d137e53bafaa338bf6c7ae338e97af2a1433d5c1d
diff --git a/sci-mathematics/isabelle/files/isabelle-2015-classpath.patch b/sci-mathematics/isabelle/files/isabelle-2015-classpath.patch
new file mode 100644
index 000000000000..3783e46cb707
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2015-classpath.patch
@@ -0,0 +1,26 @@
+--- Isabelle2015-orig/lib/Tools/java 2015-05-25 20:06:24.000000000 +1000
++++ Isabelle2015/lib/Tools/java 2015-07-07 16:00:19.283326554 +1000
+@@ -10,5 +10,5 @@
+ unset CLASSPATH
+
+ isabelle_java java "${JAVA_ARGS[@]}" \
+- -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
++ -classpath "$(jvmpath "$ISABELLE_CLASSPATH:$(java-config -p scala-2.11)")" "$@"
+
+--- Isabelle2015-orig/lib/Tools/scala 2015-05-25 20:06:24.000000000 +1000
++++ Isabelle2015/lib/Tools/scala 2015-07-07 16:00:45.926327297 +1000
+@@ -14,4 +14,4 @@
+ done
+
+ isabelle_scala scala "${SCALA_ARGS[@]}" \
+- -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
++ -classpath "$(jvmpath "$ISABELLE_CLASSPATH:$(java-config -p scala-2.11)")" "$@"
+--- Isabelle2015-orig/lib/Tools/scalac 2015-05-25 20:06:24.000000000 +1000
++++ Isabelle2015/lib/Tools/scalac 2015-07-07 15:59:33.906325289 +1000
+@@ -7,5 +7,5 @@
+ isabelle_admin_build jars || exit $?
+
+ isabelle_scala scalac -Dfile.encoding=UTF-8 \
+- -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
++ -classpath "$(jvmpath "$ISABELLE_CLASSPATH:$(java-config -p scala-2.11)")" "$@"
+
diff --git a/sci-mathematics/isabelle/files/isabelle-2015-jfreechart-classpath.patch b/sci-mathematics/isabelle/files/isabelle-2015-jfreechart-classpath.patch
new file mode 100644
index 000000000000..9594d28c86a2
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2015-jfreechart-classpath.patch
@@ -0,0 +1,16 @@
+--- Isabelle2015-orig/contrib/jfreechart-1.0.14-1/etc/settings 2013-09-12 07:46:57.000000000 +1000
++++ Isabelle2015/contrib/jfreechart-1.0.14-1/etc/settings 2015-07-07 17:22:55.716464804 +1000
+@@ -1,9 +1,8 @@
+ # -*- shell-script -*- :mode=shellscript:
+
+ JFREECHART_HOME="$COMPONENT"
+-JFREECHART_JAR_NAMES="iText-2.1.5.jar jcommon-1.0.18.jar jfreechart-1.0.14.jar"
+-
+-classpath "$JFREECHART_HOME/lib/iText-2.1.5.jar"
+-classpath "$JFREECHART_HOME/lib/jcommon-1.0.18.jar"
+-classpath "$JFREECHART_HOME/lib/jfreechart-1.0.14.jar"
++JFREECHART_JAR_NAMES="$(java-config --classpath itext | sed -e 's@:@ @g' -e 's@/[^ ]*/@@g') $(java-config --classpath jcommon-1.0 | sed -e 's@:@ @g' -e 's@/[^ ]*/@@g') $(java-config --classpath jfreechart-1.0 | sed -e 's@:@ @g' -e 's@/[^ ]*/@@g')"
+
++classpath "$(java-config --classpath itext)"
++classpath "$(java-config --classpath jcommon-1.0)"
++classpath "$(java-config --classpath jfreechart-1.0)"
diff --git a/sci-mathematics/isabelle/isabelle-2015.ebuild b/sci-mathematics/isabelle/isabelle-2015.ebuild
new file mode 100644
index 000000000000..d3a588862ae6
--- /dev/null
+++ b/sci-mathematics/isabelle/isabelle-2015.ebuild
@@ -0,0 +1,301 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils check-reqs java-pkg-2 multilib versionator
+
+MY_PN="Isabelle"
+MY_PV=$(replace_all_version_separators '-')
+MY_P="${MY_PN}${MY_PV}"
+
+# csdp is used in the compile of HOL_ex in
+# Library/Sum_of_Squares/sos_wrapper.ML where it execs $ISABELLE_CSDP
+CSDP_PV="6.x"
+CSDP_PN="csdp"
+CSDP_P="${CSDP_PN}-${CSDP_PV}"
+CSDP_IC_PN="${CSDP_PN}-isabelle-component"
+CSDP_IC_P="${CSDP_IC_PN}-${CSDP_PV}"
+
+# exec_process is used in the compile of HOL-Mirabelle-ex, Codegen, etc.
+EXEC_PROCESS_PV="1.0.3"
+EXEC_PROCESS_PN="exec_process"
+EXEC_PROCESS_P="${EXEC_PROCESS_PN}-${EXEC_PROCESS_PV}"
+EXEC_PROCESS_IC_PN="${EXEC_PROCESS_PN}-isabelle-component"
+EXEC_PROCESS_IC_P="${EXEC_PROCESS_IC_PN}-${EXEC_PROCESS_PV}"
+
+JEDIT_PV="20150228"
+JEDIT_PN="jedit_build"
+JEDIT_P="${JEDIT_PN}-${JEDIT_PV}"
+JEDIT_IC_PN="${JEDIT_PN}-isabelle-component"
+JEDIT_IC_P="${JEDIT_IC_PN}-${JEDIT_PV}"
+
+JFREECHART_PV="1.0.14-1"
+JFREECHART_PN="jfreechart"
+JFREECHART_P="${JFREECHART_PN}-${JFREECHART_PV}"
+JFREECHART_IC_PN="${JFREECHART_PN}-isabelle-component"
+JFREECHART_IC_P="${JFREECHART_IC_PN}-${JFREECHART_PV}"
+
+POLYML_PV="5.5.2-3"
+POLYML_PN="polyml"
+POLYML_P="${POLYML_PN}-${POLYML_PV}"
+POLYML_IC_PN="${POLYML_PN}-isabelle-component"
+POLYML_IC_P="${POLYML_IC_PN}-${POLYML_PV}"
+
+XZ_JAVA_PV="1.5"
+XZ_JAVA_PN="xz-java"
+XZ_JAVA_P="${XZ_JAVA_PN}-${XZ_JAVA_PV}"
+XZ_JAVA_IC_PN="${XZ_JAVA_PN}-isabelle-component"
+XZ_JAVA_IC_P="${XZ_JAVA_IC_PN}-${XZ_JAVA_PV}"
+
+SS="2.11"
+
+DESCRIPTION="Isabelle is a generic proof assistant"
+HOMEPAGE="http://www.cl.cam.ac.uk/research/hvg/Isabelle/index.html"
+SRC_URI="http://isabelle.in.tum.de/dist/${MY_P}.tar.gz
+ http://dev.gentoo.org/~gienah/snapshots/${CSDP_IC_P}.tar.gz
+ http://dev.gentoo.org/~gienah/snapshots/${EXEC_PROCESS_IC_P}.tar.gz
+ http://isabelle.in.tum.de/components/${JEDIT_P}.tar.gz -> ${JEDIT_IC_P}.tar.gz
+ http://isabelle.in.tum.de/dist/contrib/${JFREECHART_P}.tar.gz -> ${JFREECHART_IC_P}.tar.gz
+ http://dev.gentoo.org/~gienah/snapshots/${POLYML_IC_P}.tar.gz
+ http://dev.gentoo.org/~gienah/snapshots/${XZ_JAVA_IC_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc graphbrowsing ledit readline proofgeneral"
+
+#upstream says
+#bash 2.x/3.x, Poly/ML 5.x, Perl 5.x,
+#for document preparation: complete LaTeX
+DEPEND=">=app-shells/bash-3.0:*
+ >=dev-java/jcommon-1.0.18:1.0
+ >=dev-java/jfreechart-1.0.14:1.0
+ >=dev-java/itext-2.1.5:0
+ dev-java/xz-java:0
+ >=dev-lang/ghc-7.6.3
+ >=dev-lang/polyml-5.5.2:=[-portable]
+ >=dev-lang/perl-5.8.8-r2
+ dev-lang/swi-prolog
+ sci-mathematics/csdp
+ =virtual/jdk-1.7*
+ doc? (
+ virtual/latex-base
+ dev-tex/rail
+ )
+ >=dev-lang/scala-2.11.6:${SS}
+ ledit? (
+ app-misc/ledit
+ )
+ readline? (
+ app-misc/rlwrap
+ )"
+
+RDEPEND="dev-perl/libwww-perl
+ sci-mathematics/sha1-polyml
+ >=virtual/jre-1.7
+ proofgeneral? (
+ >=app-emacs/proofgeneral-4.1
+ )
+ ${DEPEND}"
+
+S="${WORKDIR}"/Isabelle${MY_PV}
+CSDP_S="${WORKDIR}/${CSDP_P}"
+EXEC_PROCESS_S="${WORKDIR}/${EXEC_PROCESS_P}"
+JEDIT_S="${WORKDIR}/${JEDIT_P}"
+JFREECHART_S="${WORKDIR}/${JFREECHART_P}"
+XZ_JAVA_S="${WORKDIR}/${XZ_JAVA_P}"
+TARGETDIR="/usr/share/Isabelle"${MY_PV}
+LIBDIR="/usr/"$(get_libdir)"/Isabelle"${MY_PV}
+
+# Notes on QA warnings: * Class files not found via DEPEND in package.env
+# Stuff with $ in the name appear to be spurious:
+# isabelle/Markup_Tree$$anonfun$results$1$1.class
+# scala/tools/nsc/backend/jvm/GenJVM$BytecodeGenerator$$anonfun$computeLocalVarsIndex$1.class
+# It wants javafx, I am unsure how to fix this. I test isabelle with the Sun JDK:
+# javafx/application/Platform.class javafx
+# Presumably the user can provide the jEdit plugins if they are necessary:
+# marker/MarkerSetsPlugin.class http://plugins.jedit.org/plugins/?MarkerSets
+# projectviewer/gui/OptionPaneBase.class http://plugins.jedit.org/plugins/?ProjectViewer
+
+LIBRARY_PKGS="itext,jcommon-1.0,jfreechart-1.0,scala-${SS},xz-java"
+
+CHECKREQS_MEMORY="8192M"
+CHECKREQS_DISK_BUILD="35G"
+CHECKREQS_DISK_USR="17G"
+
+src_unpack() {
+ unpack "${MY_P}.tar.gz"
+ cd "${S}/contrib" || die
+ unpack ${CSDP_IC_P}.tar.gz
+ unpack ${EXEC_PROCESS_IC_P}.tar.gz
+ unpack ${JEDIT_IC_P}.tar.gz
+ unpack ${JFREECHART_IC_P}.tar.gz
+ unpack ${POLYML_IC_P}.tar.gz
+ unpack ${XZ_JAVA_IC_P}.tar.gz
+}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ java-pkg_getjars ${LIBRARY_PKGS}
+ epatch "${FILESDIR}/${PN}-2013-gentoo-settings.patch"
+ epatch "${FILESDIR}/${PN}-2015-classpath.patch"
+ epatch "${FILESDIR}/${PN}-2015-jfreechart-classpath.patch"
+ polymlver=$(poly -v | cut -d' ' -f2)
+ polymlarch=$(poly -v | cut -d' ' -f9 | cut -d'-' -f1)
+ sed -e "s@5.5.0@${polymlver}@g" \
+ -i "${S}/etc/settings" \
+ || die "Could not configure polyml version in etc/settings"
+ sed -e "s@ML_HOME=\"/@ML_HOME=\"${ROOT}@" \
+ -i "${S}/etc/settings" \
+ || die "Could not configure polyml ML_HOME in etc/settings"
+ sed -e "s@x86_64@${polymlarch}@g" \
+ -i "${S}/etc/settings" \
+ || die "Could not configure polyml arch in etc/settings"
+ sed -e "s@PROOFGENERAL_HOME=\"/@PROOFGENERAL_HOME=\"${ROOT}@" \
+ -i "${S}/etc/settings" \
+ || die "Could not configure PROOFGENERAL_HOME in etc/settings"
+ sed -e "s@/usr/lib64/Isabelle${MY_PV}@${LIBDIR}@g" \
+ -i "${S}/etc/settings" \
+ || die "Could not configure Isabelle lib directory in etc/settings"
+ epatch "${FILESDIR}/${PN}-2012-graphbrowser.patch"
+ epatch "${FILESDIR}/${PN}-2012-libsha1.patch"
+ # this example fails to compile with swi-prolog 6.5.2, so patch it so that
+ # Isabelle will build, then reverse the patch so that the user can see the
+ # original code.
+ epatch "${FILESDIR}/${PN}-2013.2-HOL-Predicate_Compile_Examples.patch"
+ cat <<- EOF >> "${S}/etc/settings"
+
+ ISABELLE_GHC="${ROOT}usr/bin/ghc"
+ ISABELLE_OCAML="${ROOT}usr/bin/ocaml"
+ ISABELLE_SWIPL="${ROOT}usr/bin/swipl"
+ ISABELLE_JDK_HOME="\$(java-config --jdk-home)"
+ SCALA_HOME="${ROOT}usr/share/scala-${SS}"
+ SHA1_HOME="/usr/$(get_libdir)/sha1-polyml"
+ EOF
+ cat <<- EOF >> "${S}/etc/components"
+ #bundled components
+ contrib/${CSDP_P}
+ contrib/${EXEC_PROCESS_P}
+ contrib/${JEDIT_P}
+ contrib/${JFREECHART_P}
+ contrib/${POLYML_P}
+ contrib/${XZ_JAVA_P}
+ EOF
+ if use ledit && ! use readline; then
+ epatch "${FILESDIR}/${PN}-2012-reverse-line-editor-order.patch"
+ fi
+ rm -f "${S}/contrib/jfreechart-1.0.14-1/lib/jcommon-1.0.18.jar" \
+ "${S}/contrib/jfreechart-1.0.14-1/lib/jfreechart-1.0.14.jar" \
+ "${S}/contrib/jfreechart-1.0.14-1/lib/iText-2.1.5.jar" \
+ || die "Could not rm bundled jar files supplied by Gentoo"
+}
+
+src_compile() {
+ einfo "Building Isabelle. This may take some time."
+ pushd contrib/${EXEC_PROCESS_P} || die "Could not cd to contrib/${EXEC_PROCESS_P}"
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${EXEC_PROCESS_PN} ${EXEC_PROCESS_PN}.c \
+ || die "Could not build ${EXEC_PROCESS_PN}"
+ popd
+ if use graphbrowsing
+ then
+ rm -f "${S}/lib/browser/GraphBrowser.jar" \
+ || die "failed cleaning graph browser directory"
+ pushd "${S}/lib/browser" \
+ || die "Could not change directory to lib/browser"
+ ./build || die "failed building the graph browser"
+ popd
+ fi
+ ./bin/isabelle jedit -b -f || die "pide build failed"
+ pushd "${S}"/src/Pure || die "Could not change directory to src/Pure"
+ ../../bin/isabelle env ./build-jars -f || die "build-jars failed"
+ popd
+ ./bin/isabelle build -a -b -s -v || die "isabelle build failed"
+ epatch --reverse "${FILESDIR}/${PN}-2013.2-HOL-Predicate_Compile_Examples.patch"
+}
+
+src_install() {
+ insinto ${TARGETDIR}
+ doins -r src
+ doins -r lib
+ doins -r contrib
+ doins ROOTS
+
+ docompress -x /usr/share/doc/${PF}
+ dodoc -r doc
+ if use doc; then
+ dosym /usr/share/doc/${PF}/doc "${TARGETDIR}/doc"
+ # The build of sci-mathematics/haskabelle with use doc requires
+ # sci-mathematics/isabelle[doc?]. The haskabelle doc build requires
+ # the src/Doc directory stuff in the isabelle package.
+ doins -r src/Doc
+ for i in $(find ./src/Doc -type f -executable -print)
+ do
+ exeinto $(dirname "${TARGETDIR}/${i}")
+ doexe ${i}
+ done
+ fi
+
+ for i in $(find ./{bin,lib,src/HOL,src/Pure,src/Tools} -type f -executable -print)
+ do
+ exeinto $(dirname "${TARGETDIR}/${i}")
+ doexe ${i}
+ done
+
+ insinto /etc/isabelle
+ doins -r etc/*
+ dosym /etc/isabelle "${TARGETDIR}/etc"
+
+ dosym "${LIBDIR}/heaps" "${TARGETDIR}/heaps"
+ insinto ${LIBDIR}
+ doins -r heaps
+
+ ./bin/isabelle install -d ${TARGETDIR} "${ED}usr/bin" \
+ || die "isabelle install failed"
+ newicon lib/icons/"${PN}.xpm" "${PN}.xpm"
+ newicon lib/icons/"${PN}-mini.xpm" "${PN}-mini.xpm"
+ dodoc ANNOUNCE CONTRIBUTORS COPYRIGHT NEWS README
+
+ java-pkg_regjar \
+ $(find . -type f -name \*.jar -print | sed -e "s@^\.@${ED}${TARGETDIR}@g")
+}
+
+pkg_postinst() {
+ # If any of the directories in /etc/isabelle/components do not exist, then
+ # even isabelle getenv ISABELLE_HOME fails. Hence it is necessary to
+ # to delete any non-existing directories. If an old Isabelle version was
+ # installed with component ebuilds like sci-mathematics/e, then the
+ # Isabelle version is upgraded, then the contrib directories will not
+ # exist initially, it is necessary to delete them from /etc/isabelle/components.
+ # Then these components are rebuilt (creating these directories) using the
+ # EAPI=5 subslot depends.
+ for i in $(egrep '^[^#].*$' "${ROOT}etc/isabelle/components")
+ do
+ if [ ! -d /usr/share/${MY_P}/${i} ]; then
+ sed -e "\@${i}@d" -i "${ROOT}etc/isabelle/components"
+ fi
+ done
+ if use ledit && use readline; then
+ elog "Both readline and ledit use flags specified. The default setting"
+ elog "if both are installed is to use readline (rlwrap), this can be"
+ elog "modfied by editing the ISABELLE_LINE_EDITOR setting in"
+ elog "${ROOT}/etc/isabelle/settings"
+ fi
+ elog "Please ensure you have a pdf viewer installed, for example:"
+ elog "As root: emerge app-text/zathura-pdf-poppler"
+ elog "Please configure your preferred pdf viewer, something like:"
+ elog "As normal user: xdg-mime default zathura.desktop application/pdf"
+ elog "Or alternatively by editing the PDF_VIEWER variable in the system"
+ elog "settings file ${ROOT}etc/isabelle/settings and/or the user"
+ elog "settings file \$HOME/.isabelle/${MY_P}/etc/settings"
+ elog "To improve sledgehammer performance, consider installing:"
+ elog "USE=isabelle emerge sci-mathematics/e sci-mathematics/spass"
+ elog "For nitpick it is necessary to install:"
+ elog "emerge sci-mathematics/kodkodi"
+}