patch-tools_gjdoc_in 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. $OpenBSD: patch-tools_gjdoc_in,v 1.1 2009/06/16 15:31:02 kurt Exp $
  2. --- tools/gjdoc.in.orig Sat Jun 21 17:20:23 2008
  3. +++ tools/gjdoc.in Thu Apr 16 21:59:53 2009
  4. @@ -1,49 +1,51 @@
  5. #!/bin/sh
  6. -## Copyright (C) 2006 Free Software Foundation, Inc.
  7. -##
  8. -## This file is a part of GNU Classpath.
  9. -##
  10. -## GNU Classpath is free software; you can redistribute it and/or modify
  11. -## it under the terms of the GNU General Public License as published by
  12. -## the Free Software Foundation; either version 2 of the License, or (at
  13. -## your option) any later version.
  14. -##
  15. -## GNU Classpath is distributed in the hope that it will be useful, but
  16. -## WITHOUT ANY WARRANTY; without even the implied warranty of
  17. -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. -## General Public License for more details.
  19. -##
  20. -## You should have received a copy of the GNU General Public License
  21. -## along with GNU Classpath; if not, write to the Free Software
  22. -## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
  23. -## USA.
  24. -##
  25. -## Linking this library statically or dynamically with other modules is
  26. -## making a combined work based on this library. Thus, the terms and
  27. -## conditions of the GNU General Public License cover the whole
  28. -## combination.
  29. -##
  30. -## As a special exception, the copyright holders of this library give you
  31. -## permission to link this library with independent modules to produce an
  32. -## executable, regardless of the license terms of these independent
  33. -## modules, and to copy and distribute the resulting executable under
  34. -## terms of your choice, provided that you also meet, for each linked
  35. -## independent module, the terms and conditions of the license of that
  36. -## module. An independent module is a module which is not derived from
  37. -## or based on this library. If you modify this library, you may extend
  38. -## this exception to your version of the library, but you are not
  39. -## obligated to do so. If you do not wish to do so, delete this
  40. -## exception statement from your version.
  41. -##
  42. -##
  43. -## A simple shell script to launch the GNU Classpath javadoc tool.
  44. -##
  45. +# gjdoc.sh.in
  46. +# Copyright (C) 2005 Free Software Foundation, Inc.
  47. +#
  48. +# This file is part of GNU Classpath.
  49. +#
  50. +# GNU Classpath is free software; you can redistribute it and/or modify
  51. +# it under the terms of the GNU General Public License as published by
  52. +# the Free Software Foundation; either version 2, or (at your option)
  53. +# any later version.
  54. +#
  55. +# GNU Classpath is distributed in the hope that it will be useful, but
  56. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  57. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  58. +# General Public License for more details.
  59. +#
  60. +# You should have received a copy of the GNU General Public License
  61. +# along with GNU Classpath; see the file COPYING. If not, write to the
  62. +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63. +# 02111-1307 USA.
  64. prefix=@prefix@
  65. -datarootdir=@datarootdir@
  66. -tools_dir=@datadir@/@PACKAGE@
  67. -tools_cp=${tools_dir}/tools.zip
  68. -antlr_jar=@ANTLR_JAR@
  69. +datadir=@datadir@
  70. +version=@VERSION@
  71. +ANTLR_JAR=@ANTLR_JAR@
  72. -exec @JAVA@ -classpath "${tools_cp}:${antlr_jar}" gnu.classpath.tools.gjdoc.Main "$@"
  73. +if [ -z "${JAVA}" ]; then
  74. + if [ -n "$JAVA_HOME" ]; then
  75. + JAVA="${JAVA_HOME}/bin/java"
  76. + elif [ -x "${prefix}/bin/java" ]; then
  77. + JAVA="${prefix}/bin/java"
  78. + else
  79. + JAVA=@JAVA@
  80. + fi
  81. +fi
  82. +
  83. +gjdocpath=${datadir}/classpath/tools.zip:${ANTLR_JAR}:${CLASSPATH}
  84. +
  85. +for i in ${1+"$@"}; do
  86. + if test "$(expr "$i" : '\(..\)')no" = "-Jno"; then
  87. + len=$(expr "$i" : '.*')
  88. + vmparams="$vmparams '$(expr "$i" '...\(.*\)')'"
  89. + else
  90. + gjdocparams="$gjdocparams '$i'"
  91. + fi
  92. +done
  93. +
  94. +#hint: for large frameworks: -JXmx800m
  95. +
  96. +exec ${SHELL} -c "exec ${JAVA} ${vmparams} -classpath ${gjdocpath} gnu.classpath.tools.gjdoc.Main ${gjdocparams}"