Ticket #14934: patch-files-ecj.in

File patch-files-ecj.in, 1.3 KB (added by mvfranz@…, 17 years ago)

Patch to files/ecj.in

Line 
1--- files/ecj.in.org    2008-04-06 00:41:53.000000000 -0400
2+++ files/ecj.in        2008-04-06 00:43:21.000000000 -0400
3@@ -1,31 +1,6 @@
4-#!/bin/bash
5-# remove double bootclasspath entries:
6-BOOTCLASSPATH=""
7-BOOTCLASSPATH=$(find @PREFIX@/share/java -name "libgcj*.jar" -print | tr "\n" ":"):$(find @PREFIX@/share/java/ -name "glibj*.jar" -print | tr "\n" ":")
8-OPTIONS=""
9-while [ $# -gt 0 ]
10-do
11if [ $1 = "-bootclasspath" ]
12then
13-    BOOTCLASSPATH=$2:$BOOTCLASSPATH
14-    shift
15-    shift
16-    continue
17fi
18OPTIONS="$OPTIONS $1"
19shift
20-done
21-GIJ_EXECUTABLE=$(ls @PREFIX@/bin/gij* | tail -n1)
22-if [ -e /usr/bin/java ]
23-then
24exec /usr/bin/java -jar @PREFIX@/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS
25-elif [ -e /usr/bin/cacao ]
26-then
27exec /usr/bin/cacao -jar @PREFIX@/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS
28-elif [ -e  ]
29-then
30exec $GIJ_EXECUTABLE -jar @PREFIX@/share/java/eclipse-ecj.jar -bootclasspath $BOOTCLASSPATH $OPTIONS
31-else
32echo "no java vm found :("
33exit -1
34-fi
35+#!/bin/sh
36+# add the compiler to the classpath and then use the default java
37+# implementation.  If the user wants to change the version of java
38+# they can define what 'java' resolves to.
39+CLASSPATH=/opt/local/share/java/eclipse-ecj.jar${CLASSPATH:+:}$CLASSPATH \
40+java org.eclipse.jdt.internal.compiler.batch.Main "$@"