summaryrefslogtreecommitdiff
path: root/recipes/ecj
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/ecj
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/ecj')
-rw-r--r--recipes/ecj/ecj-bootstrap-native.bb38
-rw-r--r--recipes/ecj/ecj-initial.bb31
-rwxr-xr-xrecipes/ecj/files/ecj.in1
-rw-r--r--recipes/ecj/libecj-bootstrap.inc67
-rw-r--r--recipes/ecj/libecj-bootstrap_3.3.2.bb6
-rw-r--r--recipes/ecj/libecj-bootstrap_3.3.bb6
-rw-r--r--recipes/ecj/libecj-bootstrap_3.4.1.bb8
-rw-r--r--recipes/ecj/libecj-bootstrap_3.4.bb8
8 files changed, 165 insertions, 0 deletions
diff --git a/recipes/ecj/ecj-bootstrap-native.bb b/recipes/ecj/ecj-bootstrap-native.bb
new file mode 100644
index 0000000000..2bda972207
--- /dev/null
+++ b/recipes/ecj/ecj-bootstrap-native.bb
@@ -0,0 +1,38 @@
+# ECJ as a bootstrap compiler is a drop-in replacement for Sun's javac. It offers no more
+# and no less features.
+#
+# This recipe uses the jar created by libecj-bootstrap.
+
+DESCRIPTION = "JDT Core Batch Compiler - Bootstrap variant"
+HOMEPAGE = "http://www.eclipse.org/"
+SECTION = "devel"
+PRIORITY = "optional"
+LICENSE = "EPL"
+
+DEPENDS = "libecj-bootstrap virtual/java-native"
+
+PROVIDES = "virtual/javac-native"
+
+SRC_URI = "file://ecj.in"
+
+S = "${WORKDIR}"
+
+PR = "r1"
+
+JAR = "ecj-bootstrap.jar"
+
+inherit native
+
+do_compile() {
+ # Create the start script
+ echo "#!/bin/sh" > ecj-bootstrap
+ echo "ECJ_JAR=${STAGING_DATADIR}/java/${JAR}" >> ecj-bootstrap
+ echo "RUNTIME=java" >> ecj-bootstrap
+ cat ecj.in >> ecj-bootstrap
+}
+
+do_stage() {
+ install -d ${STAGING_BINDIR}
+ install -m 755 ${S}/ecj-bootstrap ${STAGING_BINDIR}
+ install -m 755 ${S}/ecj-bootstrap ${STAGING_BINDIR}/javac
+}
diff --git a/recipes/ecj/ecj-initial.bb b/recipes/ecj/ecj-initial.bb
new file mode 100644
index 0000000000..106453691b
--- /dev/null
+++ b/recipes/ecj/ecj-initial.bb
@@ -0,0 +1,31 @@
+# ECJ as a bootstrap compiler is a drop-in replacement for Sun's javac. It offers no more
+# and no less features.
+
+# This variant runs on the initial (not Java5-compatible runtime).
+
+DESCRIPTION = "JDT Core Batch Compiler - Bootstrap variant"
+HOMEPAGE = "http://www.eclipse.org/"
+LICENSE = "EPL"
+
+DEPENDS = "libecj-bootstrap"
+
+SRC_URI = "file://ecj.in"
+
+S = "${WORKDIR}"
+
+inherit native
+
+JAR = "ecj-bootstrap.jar"
+
+do_compile() {
+ # Create the start script
+ echo "#!/bin/sh" > ecj-initial
+ echo "ECJ_JAR=${STAGING_DATADIR}/java/${JAR}" >> ecj-initial
+ echo "RUNTIME=java-initial" >> ecj-initial
+ cat ecj.in >> ecj-initial
+}
+
+do_stage() {
+ install -d ${STAGING_BINDIR}
+ install -m 755 ${S}/ecj-initial ${STAGING_BINDIR}
+}
diff --git a/recipes/ecj/files/ecj.in b/recipes/ecj/files/ecj.in
new file mode 100755
index 0000000000..2099991cef
--- /dev/null
+++ b/recipes/ecj/files/ecj.in
@@ -0,0 +1 @@
+${RUNTIME} -Xmx512m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"}
diff --git a/recipes/ecj/libecj-bootstrap.inc b/recipes/ecj/libecj-bootstrap.inc
new file mode 100644
index 0000000000..c24c1af5ca
--- /dev/null
+++ b/recipes/ecj/libecj-bootstrap.inc
@@ -0,0 +1,67 @@
+# This package compiles and stages only the Jar.
+
+DESCRIPTION = "JDT Core Batch Compiler - Jar only"
+HOMEPAGE = "http://www.eclipse.org/"
+LICENSE = "EPL"
+
+DEPENDS = "fastjar-native jikes-initial virtual/java-initial"
+
+inherit native java
+
+S = "${WORKDIR}"
+
+JAR = "ecj-bootstrap-${PV}.jar"
+
+do_unpackpost() {
+ if [ ! -d source ]; then
+ mkdir source
+ fi
+
+ if [ ! -d build ]; then
+ mkdir build
+ fi
+
+ # Remove crap.
+ rm about.html build.xml
+ rm -rf META-INF
+
+ # Move source into separate subdir.
+ mv org source/
+
+ # Remove stuff unneeded for the bootstrap compiler.
+ rm -rf source/org/eclipse/jdt/internal/compiler/apt
+ rm -rf source/org/eclipse/jdt/internal/compiler/tool
+ rm -rf source/org/eclipse/jdt/internal/antadapter
+ rm source/org/eclipse/jdt/core/JDTCompilerAdapter.java
+
+ # Make a copy of the remaining source to get the embedded
+ # resources.
+ cp -r source/org build/
+
+ # Remove source code and other stuff.
+ find build -name '*.java' -exec rm -f {} \;
+ find build -name '*.html' -exec rm -f {} \;
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+do_compile() {
+ find source -name '*.java' > sourcefiles
+ split -l 25 sourcefiles ecj-sources.
+
+ # Compiling in place is done because the sources contain
+ # property files which need to be available at runtime.
+ for list in `find . -name 'ecj-sources.*'`; do
+ echo "building files in $list ...";
+ echo jikes-initial -d build -source 1.4 -sourcepath source `cat $list`;
+ jikes-initial \
+ -d build -source 1.4 -sourcepath source `cat $list`;
+ done
+
+ fastjar -c -C build . -f ${JAR}
+}
+
+do_stage() {
+ oe_jarinstall -s ${JAR} ecj-bootstrap.jar
+}
+
diff --git a/recipes/ecj/libecj-bootstrap_3.3.2.bb b/recipes/ecj/libecj-bootstrap_3.3.2.bb
new file mode 100644
index 0000000000..dab6ed724c
--- /dev/null
+++ b/recipes/ecj/libecj-bootstrap_3.3.2.bb
@@ -0,0 +1,6 @@
+require libecj-bootstrap.inc
+
+SRC_URI = "\
+ http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.3.2-200802211800/ecjsrc.zip \
+ "
+
diff --git a/recipes/ecj/libecj-bootstrap_3.3.bb b/recipes/ecj/libecj-bootstrap_3.3.bb
new file mode 100644
index 0000000000..b65e99cb54
--- /dev/null
+++ b/recipes/ecj/libecj-bootstrap_3.3.bb
@@ -0,0 +1,6 @@
+require libecj-bootstrap.inc
+
+SRC_URI = "\
+ http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.3-200706251500/ecjsrc.zip \
+ "
+
diff --git a/recipes/ecj/libecj-bootstrap_3.4.1.bb b/recipes/ecj/libecj-bootstrap_3.4.1.bb
new file mode 100644
index 0000000000..85662abb4c
--- /dev/null
+++ b/recipes/ecj/libecj-bootstrap_3.4.1.bb
@@ -0,0 +1,8 @@
+require libecj-bootstrap.inc
+
+PR = "r0"
+
+SRC_URI = "\
+ http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.4.1-200809111700/ecjsrc-3.4.1.zip \
+ "
+
diff --git a/recipes/ecj/libecj-bootstrap_3.4.bb b/recipes/ecj/libecj-bootstrap_3.4.bb
new file mode 100644
index 0000000000..381f424735
--- /dev/null
+++ b/recipes/ecj/libecj-bootstrap_3.4.bb
@@ -0,0 +1,8 @@
+require libecj-bootstrap.inc
+
+PR = "r1"
+
+SRC_URI = "\
+ http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.4-200806172000/ecjsrc-3.4.zip \
+ "
+