diff options
| author | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-12 20:58:34 +0100 |
|---|---|---|
| committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-26 23:41:44 +0100 |
| commit | 57e069cde6617f00ca8834a82c6f360af43d5067 (patch) | |
| tree | 48cbe15e96d217c45acfa64b0c13aad8c6424980 /recipes-core/ecj | |
| download | meta-java-57e069cde6617f00ca8834a82c6f360af43d5067.tar.gz | |
meta-java: initial commit
* taken over mostly stuff from oe classic
* cleaned up recipes
* added license checksums
* bump icedtea6-native to 1.8.11
* use jamvm from git as native
Diffstat (limited to 'recipes-core/ecj')
| -rw-r--r-- | recipes-core/ecj/ecj-bootstrap-native.bb | 38 | ||||
| -rw-r--r-- | recipes-core/ecj/ecj-initial.bb | 32 | ||||
| -rwxr-xr-x | recipes-core/ecj/files/ecj-initial.in | 1 | ||||
| -rwxr-xr-x | recipes-core/ecj/files/ecj.in | 12 | ||||
| -rw-r--r-- | recipes-core/ecj/libecj-bootstrap.inc | 68 | ||||
| -rw-r--r-- | recipes-core/ecj/libecj-bootstrap_3.6.2.bb | 7 |
6 files changed, 158 insertions, 0 deletions
diff --git a/recipes-core/ecj/ecj-bootstrap-native.bb b/recipes-core/ecj/ecj-bootstrap-native.bb new file mode 100644 index 0000000..df05be5 --- /dev/null +++ b/recipes-core/ecj/ecj-bootstrap-native.bb | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | # ECJ as a bootstrap compiler is a drop-in replacement for Sun's javac. It offers no more | ||
| 2 | # and no less features. | ||
| 3 | # | ||
| 4 | # This recipe uses the jar created by libecj-bootstrap. | ||
| 5 | |||
| 6 | DESCRIPTION = "JDT Core Batch Compiler - Bootstrap variant" | ||
| 7 | HOMEPAGE = "http://www.eclipse.org/" | ||
| 8 | SECTION = "devel" | ||
| 9 | LICENSE = "MIT" | ||
| 10 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ | ||
| 11 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ | ||
| 12 | " | ||
| 13 | |||
| 14 | DEPENDS = "libecj-bootstrap virtual/java-native" | ||
| 15 | |||
| 16 | PROVIDES = "virtual/javac-native" | ||
| 17 | |||
| 18 | SRC_URI = "file://ecj.in" | ||
| 19 | |||
| 20 | S = "${WORKDIR}" | ||
| 21 | |||
| 22 | JAR = "ecj-bootstrap.jar" | ||
| 23 | |||
| 24 | inherit native | ||
| 25 | |||
| 26 | do_compile() { | ||
| 27 | # Create the start script | ||
| 28 | echo "#!/bin/sh" > ecj-bootstrap | ||
| 29 | echo "ECJ_JAR=${STAGING_DATADIR}/java/${JAR}" >> ecj-bootstrap | ||
| 30 | echo "RUNTIME=java" >> ecj-bootstrap | ||
| 31 | cat ecj.in >> ecj-bootstrap | ||
| 32 | } | ||
| 33 | |||
| 34 | do_install() { | ||
| 35 | install -d ${D}${bindir} | ||
| 36 | install -m 755 ${S}/ecj-bootstrap ${D}${bindir} | ||
| 37 | install -m 755 ${S}/ecj-bootstrap ${D}${bindir}/javac | ||
| 38 | } | ||
diff --git a/recipes-core/ecj/ecj-initial.bb b/recipes-core/ecj/ecj-initial.bb new file mode 100644 index 0000000..45317a6 --- /dev/null +++ b/recipes-core/ecj/ecj-initial.bb | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # ECJ as a bootstrap compiler is a drop-in replacement for Sun's javac. It offers no more | ||
| 2 | # and no less features. | ||
| 3 | |||
| 4 | # This variant runs on the initial (not Java5-compatible runtime). | ||
| 5 | |||
| 6 | DESCRIPTION = "JDT Core Batch Compiler - Bootstrap variant" | ||
| 7 | HOMEPAGE = "http://www.eclipse.org/" | ||
| 8 | LICENSE = "MIT" | ||
| 9 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
| 10 | |||
| 11 | DEPENDS = "libecj-bootstrap" | ||
| 12 | |||
| 13 | SRC_URI = "file://ecj-initial.in" | ||
| 14 | |||
| 15 | S = "${WORKDIR}" | ||
| 16 | |||
| 17 | inherit native | ||
| 18 | |||
| 19 | JAR = "ecj-bootstrap.jar" | ||
| 20 | |||
| 21 | do_compile() { | ||
| 22 | # Create the start script | ||
| 23 | echo "#!/bin/sh" > ecj-initial | ||
| 24 | echo "ECJ_JAR=${STAGING_DATADIR}/java/${JAR}" >> ecj-initial | ||
| 25 | echo "RUNTIME=java-initial" >> ecj-initial | ||
| 26 | cat ecj-initial.in >> ecj-initial | ||
| 27 | } | ||
| 28 | |||
| 29 | do_install() { | ||
| 30 | install -d ${D}${bindir} | ||
| 31 | install -m 755 ${S}/ecj-initial ${D}${bindir} | ||
| 32 | } | ||
diff --git a/recipes-core/ecj/files/ecj-initial.in b/recipes-core/ecj/files/ecj-initial.in new file mode 100755 index 0000000..2099991 --- /dev/null +++ b/recipes-core/ecj/files/ecj-initial.in | |||
| @@ -0,0 +1 @@ | |||
| ${RUNTIME} -Xmx512m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"} | |||
diff --git a/recipes-core/ecj/files/ecj.in b/recipes-core/ecj/files/ecj.in new file mode 100755 index 0000000..30c3862 --- /dev/null +++ b/recipes-core/ecj/files/ecj.in | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | error_counter=0; | ||
| 2 | error_occured=139 | ||
| 3 | while [ ${error_counter} -le 50 -a ${error_occured} -eq 139 ]; do | ||
| 4 | ${RUNTIME} -Xmx1024m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"} | ||
| 5 | error_occured=$? | ||
| 6 | if [ ${error_occured} -eq 139 ]; then | ||
| 7 | echo "ecj crashed - silently trying again" | ||
| 8 | error_counter=$(( $error_counter + 1 )) | ||
| 9 | fi | ||
| 10 | done | ||
| 11 | |||
| 12 | exit ${error_occured} | ||
diff --git a/recipes-core/ecj/libecj-bootstrap.inc b/recipes-core/ecj/libecj-bootstrap.inc new file mode 100644 index 0000000..e704a87 --- /dev/null +++ b/recipes-core/ecj/libecj-bootstrap.inc | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | # This package compiles and stages only the Jar. | ||
| 2 | |||
| 3 | DESCRIPTION = "JDT Core Batch Compiler - Jar only" | ||
| 4 | HOMEPAGE = "http://www.eclipse.org/" | ||
| 5 | LICENSE = "EPL-1" | ||
| 6 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/EPL-1;md5=d830412fb40c35122cb4d78375d30f76" | ||
| 7 | |||
| 8 | DEPENDS = "fastjar-native jikes-initial virtual/java-initial" | ||
| 9 | |||
| 10 | inherit native java | ||
| 11 | |||
| 12 | S = "${WORKDIR}" | ||
| 13 | |||
| 14 | JAR = "ecj-bootstrap-${PV}.jar" | ||
| 15 | |||
| 16 | do_unpackpost() { | ||
| 17 | if [ ! -d source ]; then | ||
| 18 | mkdir source | ||
| 19 | fi | ||
| 20 | |||
| 21 | if [ ! -d build ]; then | ||
| 22 | mkdir build | ||
| 23 | fi | ||
| 24 | |||
| 25 | # Remove crap. | ||
| 26 | rm about.html build.xml | ||
| 27 | rm -rf META-INF | ||
| 28 | |||
| 29 | # Move source into separate subdir. | ||
| 30 | mv org source/ | ||
| 31 | |||
| 32 | # Remove stuff unneeded for the bootstrap compiler. | ||
| 33 | rm -rf source/org/eclipse/jdt/internal/compiler/apt | ||
| 34 | rm -rf source/org/eclipse/jdt/internal/compiler/tool | ||
| 35 | rm -rf source/org/eclipse/jdt/internal/antadapter | ||
| 36 | rm source/org/eclipse/jdt/core/JDTCompilerAdapter.java | ||
| 37 | |||
| 38 | # Make a copy of the remaining source to get the embedded | ||
| 39 | # resources. | ||
| 40 | cp -R source/org build/ | ||
| 41 | |||
| 42 | # Remove source code and other stuff. | ||
| 43 | find build -name '*.java' -exec rm -f {} \; | ||
| 44 | find build -name '*.html' -exec rm -f {} \; | ||
| 45 | } | ||
| 46 | |||
| 47 | addtask unpackpost after do_unpack before do_patch | ||
| 48 | |||
| 49 | do_compile() { | ||
| 50 | find source -name '*.java' > sourcefiles | ||
| 51 | split -l 25 sourcefiles ecj-sources. | ||
| 52 | |||
| 53 | # Compiling in place is done because the sources contain | ||
| 54 | # property files which need to be available at runtime. | ||
| 55 | for list in `find . -name 'ecj-sources.*'`; do | ||
| 56 | echo "building files in $list ..."; | ||
| 57 | echo jikes-initial -d build -source 1.4 -sourcepath source `cat $list`; | ||
| 58 | jikes-initial \ | ||
| 59 | -d build -source 1.4 -sourcepath source `cat $list`; | ||
| 60 | done | ||
| 61 | |||
| 62 | fastjar -c -C build . -f ${JAR} | ||
| 63 | } | ||
| 64 | |||
| 65 | do_install() { | ||
| 66 | oe_jarinstall ${JAR} ecj-bootstrap.jar | ||
| 67 | } | ||
| 68 | |||
diff --git a/recipes-core/ecj/libecj-bootstrap_3.6.2.bb b/recipes-core/ecj/libecj-bootstrap_3.6.2.bb new file mode 100644 index 0000000..98edc01 --- /dev/null +++ b/recipes-core/ecj/libecj-bootstrap_3.6.2.bb | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | require libecj-bootstrap.inc | ||
| 2 | |||
| 3 | SRC_URI = " http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.6.2-201102101200/ecjsrc-${PV}.zip" | ||
| 4 | |||
| 5 | SRC_URI[md5sum] = "3f3ca1973dd7a21780525c9ffba7a263" | ||
| 6 | SRC_URI[sha256sum] = "94f2095d38d71b414a593ec56847008bec267a926ec935959fecdde44f98467f" | ||
| 7 | |||
