[oe-commits] org.oe.dev ecj-initial 3.4: New recipe for version 3.4.

thebohemian2 commit oe at amethyst.openembedded.net
Sun Jul 27 15:48:55 UTC 2008


ecj-initial 3.4: New recipe for version 3.4.
ecj-bootstrap-native 3.4: New recipe for version 3.4.

Author: thebohemian2 at openembedded.org
Branch: org.openembedded.dev
Revision: 6ca499af1613b08ef437cfa3285ae0b2ed3fbfcb
ViewMTN: http://monotone.openembedded.org/revision/info/6ca499af1613b08ef437cfa3285ae0b2ed3fbfcb
Files:
1
packages/ecj/ecj-bootstrap-native_3.4.bb
packages/ecj/ecj-initial_3.4.bb
Diffs:

#
# mt diff -rff3cafe77c935d7b92703d6844722054ef7f9774 -r6ca499af1613b08ef437cfa3285ae0b2ed3fbfcb
#
#
#
# add_file "packages/ecj/ecj-bootstrap-native_3.4.bb"
#  content [defbc5098ae61f56a2ac8c59ace6bbe9c8007eb3]
# 
# add_file "packages/ecj/ecj-initial_3.4.bb"
#  content [dc998c357be888fbd841ad9adf79ff8c384a7f84]
#
============================================================
--- packages/ecj/ecj-bootstrap-native_3.4.bb	defbc5098ae61f56a2ac8c59ace6bbe9c8007eb3
+++ packages/ecj/ecj-bootstrap-native_3.4.bb	defbc5098ae61f56a2ac8c59ace6bbe9c8007eb3
@@ -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.
+#
+# Since the VM running the compiler has no effect on the produced bytecode this recipe
+# uses the jar created by ecj-initial and creates a start script that runs it with a different
+# VM.
+
+DESCRIPTION = "JDT Core Batch Compiler - Bootstrap variant"
+HOMEPAGE = "http://www.eclipse.org/"
+SECTION = "devel"
+PRIORITY = "optional"
+LICENSE = "EPL"
+
+DEPENDS = "ecj-initial virtual/java-native"
+
+PROVIDES = "virtual/javac-native"
+
+SRC_URI = "file://ecj.in"
+
+S = "${WORKDIR}"
+
+JAR = "ecj-bootstrap-${PV}.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
+}
============================================================
--- packages/ecj/ecj-initial_3.4.bb	dc998c357be888fbd841ad9adf79ff8c384a7f84
+++ packages/ecj/ecj-initial_3.4.bb	dc998c357be888fbd841ad9adf79ff8c384a7f84
@@ -0,0 +1,84 @@
+# 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 = "fastjar-native jikes-initial virtual/java-initial"
+
+SRC_URI = "\
+    http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.4-200806172000/ecjsrc-3.4.zip \
+    file://ecj.in \
+    "
+
+S = "${WORKDIR}"
+
+inherit native
+
+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}
+
+  # 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_DATADIR}/java
+  install -m 755 ${S}/${JAR} ${STAGING_DATADIR}/java
+
+  install -d ${STAGING_BINDIR}
+  install -m 755 ${S}/ecj-initial ${STAGING_BINDIR}
+}






More information about the Openembedded-commits mailing list