diff options
-rw-r--r-- | java/ecj-bootstrap/Makefile | 1 | ||||
-rw-r--r-- | java/ecj-bootstrap/files/build.sh | 13 | ||||
-rw-r--r-- | java/ecj-bootstrap/files/ecj-patch-Main.java | 21 |
3 files changed, 34 insertions, 1 deletions
diff --git a/java/ecj-bootstrap/Makefile b/java/ecj-bootstrap/Makefile index 98af3f974a34..89a6a8f955d7 100644 --- a/java/ecj-bootstrap/Makefile +++ b/java/ecj-bootstrap/Makefile @@ -7,6 +7,7 @@ PORTNAME= ecj-bootstrap PORTVERSION= 3.2 +PORTREVISION= 1 CATEGORIES= java devel MASTER_SITES= ${MASTER_SITE_ECLIPSE:S,%SUBDIR%/,R-${PORTVERSION}-200606291905/,} \ ${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:antbin,} diff --git a/java/ecj-bootstrap/files/build.sh b/java/ecj-bootstrap/files/build.sh index aa8b03563348..fb9722a52772 100644 --- a/java/ecj-bootstrap/files/build.sh +++ b/java/ecj-bootstrap/files/build.sh @@ -5,13 +5,24 @@ # http://fedora.redhat.com/download/mirrors.html # Bootstrapping is 3 parts: + # 0. Patch ecj.zip # 1. Build ecj with gcj -C # 2. Build ecj with gcj-built ecj ("javac") # 3. Re-build ecj with output of 2. - + + # Patch ecj.zip first + rm -rf tmp + mkdir tmp + unzip -qq -d tmp jdtcoresrc/src/ecj.zip + cd tmp + patch < ../../files/ecj-patch-Main.java + zip -r ../jdtcoresrc/src/ecj.zip * + cd .. + # Unzip the "stable compiler" source into a temp dir and build it. # Note: we don't want to build the CompilerAdapter. + rm -rf ecj-bootstrap-tmp mkdir ecj-bootstrap-tmp unzip -qq -d ecj-bootstrap-tmp jdtcoresrc/src/ecj.zip rm -f ecj-bootstrap-tmp/org/eclipse/jdt/core/JDTCompilerAdapter.java diff --git a/java/ecj-bootstrap/files/ecj-patch-Main.java b/java/ecj-bootstrap/files/ecj-patch-Main.java new file mode 100644 index 000000000000..80c93af6ff65 --- /dev/null +++ b/java/ecj-bootstrap/files/ecj-patch-Main.java @@ -0,0 +1,21 @@ +Dirty hack...recognize sun.boot.class.path for implicit bootclasspath. + +--- org/eclipse/jdt/internal/compiler/batch/Main.java Fri Aug 4 15:14:29 2006 ++++ org/eclipse/jdt/internal/compiler/batch/Main.java Fri Aug 4 16:04:13 2006 +@@ -2448,6 +2448,16 @@ + } + } + } ++ ++ /* ++ * Handle sun.boot.class.path ++ */ ++ String sunboot = System.getProperty("sun.boot.class.path"); ++ File sunbootclasspath = new File (sunboot); ++ FileSystem.Classpath classpath = FileSystem.getClasspath( ++ sunbootclasspath.getAbsolutePath(), ++ null, false, null); ++ if (classpath != null) {bootclasspaths.add(classpath);} + } + final int classpathsSize = classpaths.size(); + if (classpaths.size() != 0) { |