isabelle-2016.1-disable-jedit-build-after-install.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. --- Isabelle2016-1-orig/src/Tools/jEdit/lib/Tools/jedit 2016-12-13 01:03:49.000000000 +1100
  2. +++ Isabelle2016-1/src/Tools/jEdit/lib/Tools/jedit 2017-01-01 17:24:50.107722845 +1100
  3. @@ -239,125 +239,6 @@
  4. "$ISABELLE_JEDIT_BUILD_HOME/contrib/jsr305-2.0.0.jar"
  5. )
  6. -
  7. -# target
  8. -
  9. -TARGET="dist/jars/Isabelle-jEdit.jar"
  10. -
  11. -declare -a UPDATED=()
  12. -
  13. -if [ "$BUILD_JARS" = jars_fresh ]; then
  14. - OUTDATED=true
  15. -else
  16. - OUTDATED=false
  17. - if [ ! -e "$TARGET" ]; then
  18. - OUTDATED=true
  19. - else
  20. - if [ -n "$ISABELLE_JEDIT_BUILD_HOME" ]; then
  21. - declare -a DEPS=(
  22. - "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR"
  23. - "${SOURCES[@]}" "${RESOURCES[@]}"
  24. - )
  25. - elif [ -e "$ISABELLE_HOME/Admin/build" ]; then
  26. - declare -a DEPS=("$PURE_JAR" "${SOURCES[@]}" "${RESOURCES[@]}")
  27. - else
  28. - declare -a DEPS=()
  29. - fi
  30. - for DEP in "${DEPS[@]}"
  31. - do
  32. - [ ! -e "$DEP" ] && fail "Missing file: $DEP"
  33. - [ "$DEP" -nt "$TARGET" ] && {
  34. - OUTDATED=true
  35. - UPDATED["${#UPDATED[@]}"]="$DEP"
  36. - }
  37. - done
  38. - fi
  39. -fi
  40. -
  41. -
  42. -# build
  43. -
  44. -if [ "$OUTDATED" = true ]
  45. -then
  46. - echo "### Building Isabelle/jEdit ..."
  47. -
  48. - [ "${#UPDATED[@]}" -gt 0 ] && {
  49. - echo "Changed files:"
  50. - for FILE in "${UPDATED[@]}"
  51. - do
  52. - echo " $FILE"
  53. - done
  54. - }
  55. -
  56. - [ -z "$ISABELLE_JEDIT_BUILD_HOME" ] && \
  57. - fail "Unknown ISABELLE_JEDIT_BUILD_HOME -- missing auxiliary component"
  58. -
  59. - rm -rf dist || failed
  60. - mkdir -p dist dist/classes || failed
  61. -
  62. - cp -p -R -f "$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/." dist/.
  63. - cp -p -R -f "${RESOURCES[@]}" dist/classes/.
  64. - cp src/jEdit.props dist/properties/.
  65. - cp -p -R -f src/modes/. dist/modes/.
  66. -
  67. - perl -i -e 'while (<>) {
  68. - if (m/FILE="ml.xml"/ or m/FILE_NAME_GLOB="...sml,ml."/) { }
  69. - elsif (m/NAME="javacc"/) {
  70. - print qq!<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="{*.thy,ROOT0.ML,ROOT.ML}"/>\n\n!;
  71. - print qq!<MODE NAME="isabelle-ml" FILE="isabelle-ml.xml" FILE_NAME_GLOB="*.ML"/>\n\n!;
  72. - print qq!<MODE NAME="isabelle-news" FILE="isabelle-news.xml"/>\n\n!;
  73. - print qq!<MODE NAME="isabelle-options" FILE="isabelle-options.xml"/>\n\n!;
  74. - print qq!<MODE NAME="isabelle-root" FILE="isabelle-root.xml" FILE_NAME_GLOB="ROOT"/>\n\n!;
  75. - print;
  76. - }
  77. - elsif (m/NAME="sqr"/) {
  78. - print qq!<MODE NAME="sml" FILE="sml.xml" FILE_NAME_GLOB="*.{sml,sig}"/>\n\n!;
  79. - print;
  80. - }
  81. - else { print; }
  82. - }' dist/modes/catalog
  83. -
  84. - cd dist
  85. - isabelle_jdk jar xf jedit.jar
  86. - cp "$ISABELLE_HOME/lib/logo/isabelle_transparent-32.gif" \
  87. - "org/gjt/sp/jedit/icons/themes/classic/32x32/apps/isabelle.gif" || failed
  88. - cp "$ISABELLE_HOME/lib/logo/isabelle_transparent-32.gif" \
  89. - "org/gjt/sp/jedit/icons/themes/tango/32x32/apps/isabelle.gif" || failed
  90. - isabelle_jdk jar cfe jedit.jar org.gjt.sp.jedit.jEdit org || failed
  91. - rm -rf META-INF org
  92. - cd ..
  93. -
  94. - cp -p -R -f "${JEDIT_JARS[@]}" dist/jars/. || failed
  95. - (
  96. - #FIXME workarounds for scalac 2.11.0
  97. - export CYGWIN="nodosfilewarning"
  98. - function stty() { :; }
  99. - export -f stty
  100. -
  101. - for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR"
  102. - do
  103. - classpath "$JAR"
  104. - done
  105. - export CLASSPATH="$(platform_path "$ISABELLE_CLASSPATH")"
  106. - exec "$SCALA_HOME/bin/scalac" $ISABELLE_SCALA_BUILD_OPTIONS -d dist/classes "${SOURCES[@]}"
  107. - ) || fail "Failed to compile sources"
  108. -
  109. - cd dist/classes
  110. - isabelle_jdk jar cf "../jars/Isabelle-jEdit.jar" * || failed
  111. - cd ../..
  112. - rm -rf dist/classes
  113. -
  114. - cp "$ISABELLE_JEDIT_BUILD_HOME/doc/jedit5.3.0manual-a4.pdf" dist/doc/jedit-manual.pdf
  115. - cp dist/doc/CHANGES.txt dist/doc/jedit-changes
  116. - cat > dist/doc/Contents <<EOF
  117. -Original jEdit Documentation
  118. - jedit-manual jEdit 5.3 User's Guide
  119. - jedit-changes jEdit 5.3 Version History
  120. -
  121. -EOF
  122. -
  123. -fi
  124. -
  125. popd >/dev/null