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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
--- Isabelle2013-2-orig/lib/Tools/java 2013-12-06 02:18:34.000000000 +1100
+++ Isabelle2013-2/lib/Tools/java 2015-04-17 12:23:11.535463796 +1000
@@ -10,5 +10,5 @@
unset CLASSPATH
isabelle_jdk java "${JAVA_ARGS[@]}" \
- -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
+ -classpath "$(jvmpath "$ISABELLE_CLASSPATH:$(java-config -p scala-2.11 | sed 's@\([^:]*\)/[^:]*:.*@\1@')")" "$@"
--- Isabelle2013-2-orig/lib/Tools/scala 2013-12-06 02:18:34.000000000 +1100
+++ Isabelle2013-2/lib/Tools/scala 2015-04-17 12:23:24.836455672 +1000
@@ -7,5 +7,5 @@
isabelle_admin_build jars || exit $?
isabelle_scala scala -Dfile.encoding=UTF-8 \
- -classpath "$(jvmpath "$ISABELLE_CLASSPATH")" "$@"
+ -classpath "$(jvmpath "$ISABELLE_CLASSPATH:$(java-config -p scala-2.11 | sed 's@\([^:]*\)/[^:]*:.*@\1@')")" "$@"
--- Isabelle2013-2-orig/lib/Tools/scalac 2013-12-06 02:18:34.000000000 +1100
+++ Isabelle2013-2/lib/Tools/scalac 2015-04-17 12:23:33.084450628 +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 | sed 's@\([^:]*\)/[^:]*:.*@\1@')")" "$@"
--- Isabelle2013-2-orig/src/Tools/jEdit/lib/Tools/jedit 2013-12-06 02:19:04.000000000 +1100
+++ Isabelle2013-2/src/Tools/jEdit/lib/Tools/jedit 2014-02-09 20:59:14.026841490 +1100
@@ -211,105 +211,6 @@
"$ISABELLE_JEDIT_BUILD_HOME/contrib/jsr305-2.0.0.jar"
)
-
-# target
-
-TARGET="dist/jars/Isabelle-jEdit.jar"
-
-declare -a UPDATED=()
-
-if [ "$BUILD_JARS" = jars_fresh ]; then
- OUTDATED=true
-else
- OUTDATED=false
- if [ ! -e "$TARGET" ]; then
- OUTDATED=true
- else
- if [ -n "$ISABELLE_JEDIT_BUILD_HOME" ]; then
- declare -a DEPS=(
- "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR" "$GRAPHVIEW_JAR"
- "${SOURCES[@]}" "${RESOURCES[@]}"
- )
- elif [ -e "$ISABELLE_HOME/Admin/build" ]; then
- declare -a DEPS=("$PURE_JAR" "$GRAPHVIEW_JAR" "${SOURCES[@]}" "${RESOURCES[@]}")
- else
- declare -a DEPS=()
- fi
- for DEP in "${DEPS[@]}"
- do
- [ ! -e "$DEP" ] && fail "Missing file: $DEP"
- [ "$DEP" -nt "$TARGET" ] && {
- OUTDATED=true
- UPDATED["${#UPDATED[@]}"]="$DEP"
- }
- done
- fi
-fi
-
-
-# build
-
-if [ "$OUTDATED" = true ]
-then
- echo "### Building Isabelle/jEdit ..."
-
- [ "${#UPDATED[@]}" -gt 0 ] && {
- echo "Changed files:"
- for FILE in "${UPDATED[@]}"
- do
- echo " $FILE"
- done
- }
-
- [ -z "$ISABELLE_JEDIT_BUILD_HOME" ] && \
- fail "Unknown ISABELLE_JEDIT_BUILD_HOME -- missing auxiliary component"
-
- rm -rf dist || failed
- mkdir -p dist dist/classes || failed
-
- cp -p -R -f "$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/." dist/.
- cp -p -R -f "${RESOURCES[@]}" dist/classes/.
- cp src/jEdit.props dist/properties/.
- cp -p -R -f src/modes/. dist/modes/.
-
- perl -i -e 'while (<>) {
- if (m/NAME="javacc"/) {
- print qq,<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="*.thy"/>\n\n,;
- print qq,<MODE NAME="isabelle-news" FILE="isabelle-news.xml"/>\n\n,;
- print qq,<MODE NAME="isabelle-options" FILE="isabelle-options.xml"/>\n\n,;
- print qq,<MODE NAME="isabelle-root" FILE="isabelle-root.xml" FILE_NAME_GLOB="ROOT"/>\n\n,; }
- print; }' dist/modes/catalog
-
- cd dist
- isabelle_jdk jar xf jedit.jar
- cp "$ISABELLE_HOME/lib/logo/isabelle-32.gif" \
- "org/gjt/sp/jedit/icons/themes/classic/32x32/apps/isabelle.gif" || failed
- cp "$ISABELLE_HOME/lib/logo/isabelle-32.gif" \
- "org/gjt/sp/jedit/icons/themes/tango/32x32/apps/isabelle.gif" || failed
- isabelle_jdk jar cfe jedit.jar org.gjt.sp.jedit.jEdit org || failed
- rm -rf META-INF org
- cd ..
-
- cp -p -R -f "${JEDIT_JARS[@]}" dist/jars/. || failed
- (
- #workaround for scalac 2.10.2
- function stty() { :; }
- export -f stty
-
- for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR" "$GRAPHVIEW_JAR"
- do
- classpath "$JAR"
- done
- export CLASSPATH="$(jvmpath "$ISABELLE_CLASSPATH")"
- exec "$SCALA_HOME/bin/scalac" $ISABELLE_SCALA_BUILD_OPTIONS -d dist/classes "${SOURCES[@]}"
- ) || fail "Failed to compile sources"
-
- cd dist/classes
- isabelle_jdk jar cf "../jars/Isabelle-jEdit.jar" * || failed
- cd ../..
- rm -rf dist/classes
-fi
-
popd >/dev/null
|