summaryrefslogtreecommitdiffstats
path: root/recipes-core/ecj/libecj-bootstrap.inc
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2011-11-12 20:58:34 +0100
committerHenning Heinold <heinold@inf.fu-berlin.de>2011-11-26 23:41:44 +0100
commit57e069cde6617f00ca8834a82c6f360af43d5067 (patch)
tree48cbe15e96d217c45acfa64b0c13aad8c6424980 /recipes-core/ecj/libecj-bootstrap.inc
downloadmeta-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/libecj-bootstrap.inc')
-rw-r--r--recipes-core/ecj/libecj-bootstrap.inc68
1 files changed, 68 insertions, 0 deletions
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
3DESCRIPTION = "JDT Core Batch Compiler - Jar only"
4HOMEPAGE = "http://www.eclipse.org/"
5LICENSE = "EPL-1"
6LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/EPL-1;md5=d830412fb40c35122cb4d78375d30f76"
7
8DEPENDS = "fastjar-native jikes-initial virtual/java-initial"
9
10inherit native java
11
12S = "${WORKDIR}"
13
14JAR = "ecj-bootstrap-${PV}.jar"
15
16do_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
47addtask unpackpost after do_unpack before do_patch
48
49do_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
65do_install() {
66 oe_jarinstall ${JAR} ecj-bootstrap.jar
67}
68