aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-01-26 08:53:14 +0000
committerKoen Kooi <koen@openembedded.org>2008-01-26 08:53:14 +0000
commite384970fc818e395c9915ffc3f448de377e72c0f (patch)
tree794f64267ac33929c9430647ad3ce2ffd2da7955
parent57ba35d320e4ac809e602f0f5acb9d94f639344b (diff)
downloadopenembedded-e384970fc818e395c9915ffc3f448de377e72c0f.tar.gz
java: add backports from .dev
-rw-r--r--BACKPORTS.txt24
-rw-r--r--packages/cacao/cacao-cldc.inc64
-rw-r--r--packages/cacao/cacao-cldc_0.98.bb42
-rw-r--r--packages/cacao/cacao-initial_0.98.bb34
-rw-r--r--packages/cacao/cacao-native.inc27
-rw-r--r--packages/cacao/cacao-native_0.98+hg20071001.bb5
-rw-r--r--packages/cacao/cacao.inc51
-rw-r--r--packages/cacao/cacao_0.98+hg20071001.bb22
-rw-r--r--packages/cacao/cacaoh-cldc-native_0.98.bb25
-rw-r--r--packages/cacao/cacaoh-native.inc27
-rw-r--r--packages/cacao/cacaoh-native_0.98+hg20071001.bb5
-rw-r--r--packages/cacao/files/cacao-0.98+hg-arm-cacheflush-fix.patch18
-rw-r--r--packages/cacao/files/cacao-0.98+hg-arm-cacheflush-workaround.patch50
-rw-r--r--packages/cacao/files/cacao-0.98+hg-attachthread.patch89
-rw-r--r--packages/cacao/files/cacao-0.98+svn-classpath_var.patch56
-rw-r--r--packages/cacao/files/cacao-0.98+svn-libdir.diff30
-rw-r--r--packages/cacao/files/cacao-0.98-initial.patch45
-rw-r--r--packages/classpath/classpath-initial_0.93.bb28
-rw-r--r--packages/classpath/classpath-minimal_0.96.1.bb17
-rw-r--r--packages/classpath/classpath-native.inc32
-rw-r--r--packages/classpath/classpath-native_0.96.1.bb6
-rw-r--r--packages/classpath/classpath.inc60
-rw-r--r--packages/classpath/classpath_0.95.bb20
-rw-r--r--packages/classpath/classpath_0.96.1.bb20
-rw-r--r--packages/classpath/files/gjar-prefix-patch.diff40
-rw-r--r--packages/ecj/ecj-bootstrap-native_3.3.bb38
-rw-r--r--packages/ecj/ecj-initial_3.3.bb84
-rwxr-xr-xpackages/ecj/files/ecj.in1
-rw-r--r--packages/jamvm/files/.mtn2git_empty0
-rw-r--r--packages/jamvm/files/jamvm-1.3.1-size-defaults.patch12
-rw-r--r--packages/jamvm/files/jamvm_1.5.0-initial.patch82
-rw-r--r--packages/jamvm/jamvm-initial_1.5.0.bb36
-rw-r--r--packages/jamvm/jamvm.inc22
-rw-r--r--packages/jamvm/jamvm_1.4.5.bb24
-rw-r--r--packages/jamvm/jamvm_1.5.0.bb5
-rw-r--r--packages/jikes/jikes-initial.bb23
-rw-r--r--packages/jikes/jikes-native_1.21.bb1
-rw-r--r--packages/midpath/midpath-alsa_0.1.bb1
-rw-r--r--packages/midpath/midpath-cldc-native_0.1.bb5
-rw-r--r--packages/midpath/midpath-cldc-sdl_0.1.bb1
-rw-r--r--packages/midpath/midpath-cldc-x11_0.1.bb3
-rw-r--r--packages/midpath/midpath-cldc_0.1.bb16
-rw-r--r--packages/midpath/midpath-gtk_0.1.bb1
-rw-r--r--packages/midpath/midpath-pulseaudio_0.1.bb1
-rw-r--r--packages/midpath/midpath-qt3x11_0.1.bb1
-rw-r--r--packages/midpath/midpath-qte_0.1.bb1
-rw-r--r--packages/midpath/midpath-test_0.1.bb1
-rw-r--r--packages/midpath/midpath.inc8
-rw-r--r--packages/midpath/midpath_0.1.bb1
-rw-r--r--packages/swt/.mtn2git_empty0
-rw-r--r--packages/swt/files/.mtn2git_empty0
-rw-r--r--packages/swt/files/Makefile78
-rw-r--r--packages/swt/files/swt-hildon.patch128
-rw-r--r--packages/swt/swt-gtk.inc58
-rw-r--r--packages/swt/swt3.3-gtk_3.3.1.bb10
-rw-r--r--packages/swt/swt3.4-gtk-hildon_3.3+3.4M3.bb7
-rw-r--r--packages/swt/swt3.4-gtk_3.3+3.4M3.bb12
57 files changed, 1385 insertions, 113 deletions
diff --git a/BACKPORTS.txt b/BACKPORTS.txt
index 3b805198bc..d2520f21d8 100644
--- a/BACKPORTS.txt
+++ b/BACKPORTS.txt
@@ -49,3 +49,27 @@ ed94d35280e9dbc28ff90a5b175dc47c752bf347 "
a187890b5224af772da71b35cf822fe014826a92 "
986ab26afb8364d7b6c5fe4af2fcef9ebf72d5a1 "
n/a build-feeds.sh: Add python-pygtk (PaulS, Koen)
+10d839841515280475537b389b383e3e3686c117 Java updates (Koen, PaulS)
+eed8e44709b0135c476bb86fd537e46917805a76 "
+b1835c42933e0c943d142d1781f5b360a057294b "
+776a345f052c5352efa0a810830a321456747f8a "
+631a3e8b95d1d4ee1d1a9ed29390bcd59924f06e "
+a33eb17e4fab8b119709ca7c8430f47513a457d9 "
+64c06913c22a9e5e86178b37c2a23bd8aa5baf77 "
+631a3e8b95d1d4ee1d1a9ed29390bcd59924f06e "
+f7a565e7e910cea46808ec61590556a6b97dff74 "
+f69d33ca84f78b23a444272f70d92f9de97b221f "
+64c06913c22a9e5e86178b37c2a23bd8aa5baf77 "
+64c06913c22a9e5e86178b37c2a23bd8aa5baf77 "
+213c582b00d27a563e968bbcd4a9c276301fc7cc "
+b144146d96293ddc0c8140f894293debe08cc3af "
+64c06913c22a9e5e86178b37c2a23bd8aa5baf77 "
+fcb60e20d2bda504bfd7af6775c815a4c014185e "
+f7a565e7e910cea46808ec61590556a6b97dff74 "
+64c06913c22a9e5e86178b37c2a23bd8aa5baf77 "
+3ba9bb700e2671c899e7dd7c9cb3fd8bff810325 "
+68cf185f4c430068e53df070e20c8f35971eb3d6 "
+631a3e8b95d1d4ee1d1a9ed29390bcd59924f06e "
+396d43c9459edaab2f04c5dd3825de0391fc1b73 "
+9005ec7475f13738f08b14c023c457704df3f4af "
+
diff --git a/packages/cacao/cacao-cldc.inc b/packages/cacao/cacao-cldc.inc
new file mode 100644
index 0000000000..0a6e5249e7
--- /dev/null
+++ b/packages/cacao/cacao-cldc.inc
@@ -0,0 +1,64 @@
+DESCRIPTION = "Cacao-cldc is a Java Virtual Machine, which uses MIDPath CLDC as default Java core library"
+HOMEPAGE = "http://www.cacaojvm.org/"
+LICENSE = "GPL"
+PRIORITY = "optional"
+SECTION = "interpreters"
+
+DEPENDS = "zlib libtool classpath midpath-cldc cacaoh-cldc-native virtual/javac-native"
+
+# Avoid version number here, otherwise dpkg will expect a package name
+# and cannot be satisfied with a package that provides classpath.
+RDEPENDS = "midpath-cldc"
+
+PROVIDES = "cacao-cldc virtual/java-cldc"
+RPROVIDES_cacao-cldc = "java-cldc-runtime"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF = "\
+ ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
+ --enable-debug \
+ --enable-jni \
+ --disable-libjvm \
+ --enable-java=cldc1.1 \
+ --with-classpath=cldc1.1 \
+ --with-classpath-classes=${STAGING_DATADIR}/midpath-cldc/midpath-cldc1.1.jar \
+ --with-target-classpath-classes=${datadir}/midpath-cldc/midpath-cldc1.1.jar \
+ --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-cldc-${PV} \
+ --with-classpath-libdir=${STAGING_LIBDIR}/classpath \
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --with-vm-zip=${datadir}/cacao-cldc/vm.zip \
+ --libdir=${libdir}/cacao-cldc \
+ --program-suffix=-cldc \
+ "
+
+S = "${WORKDIR}/cacao-${PV}"
+
+PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
+
+FILES_${PN} = "${bindir}/${PN} ${libdir}/lib*.so* ${datadir}/${PN}"
+FILES_${PN}-doc = "${datadir}/man"
+FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/.debug/lib*.so*"
+
+ALTERNATIVE_NAME = "java-cldc"
+ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
+ALTERNATIVE_PATH = "${bindir}/cacao-cldc"
+ALTERNATIVE_PRIORITY = "10"
+
+do_configure_prepend() {
+ # Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
+ # configured in OE.
+ if [ -e src/vm/properties.c ]; then
+ sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/properties.c
+ fi
+
+ if [ -e src/vm/properties.c ]; then
+ sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/vm.c
+ fi
+}
+
+do_configure_append() {
+ # Fix the executable name in the wrapper script.
+ sed -i -e "s|exec cacao|exec cacao-cldc|" src/scripts/java.in
+}
+
diff --git a/packages/cacao/cacao-cldc_0.98.bb b/packages/cacao/cacao-cldc_0.98.bb
index 0f6af678f5..f5a48c40a9 100644
--- a/packages/cacao/cacao-cldc_0.98.bb
+++ b/packages/cacao/cacao-cldc_0.98.bb
@@ -1,35 +1,17 @@
+# Compatible with GNU Classpath 0.95 only!
-require cacao.inc
+require cacao-cldc.inc
-SRC_URI +="file://midpath.patch;patch=1 \
- file://offsets_make.patch;patch=1 \
- file://classpath_var.patch;patch=1 \
- file://libmath.patch;patch=1 \
- file://arm_mmap.patch;patch=1 \
- "
-SRC_URI_append_arm = "file://offset.h_arm.patch;patch=1"
-
-DEPENDS = "cacaoh-cldc-native ecj-native classpath-minimal-native virtual/cldc-api-1.1 libtool zlib"
-RDEPENDS = "virtual/cldc-api-1.1 libltdl"
-RPROVIDES = "virtual/java"
+PR = "r1"
-EXTRA_OECONF += "--with-classpath-libdir=${STAGING_DATADIR}/classpath-minimal \
- --with-classpath-includedir=${STAGING_INCDIR}/classpath-minimal \
- --enable-jni \
- --enable-java=cldc1.1 \
- --with-classpath=cldc1.1 \
- --with-classpath-classes=${STAGING_DATADIR}/java/cldc1.1.jar \
- --with-target-classpath-classes=${datadir}/java/cldc1.1.jar \
- --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh \
- --disable-libjvm \
- "
+SRC_URI += "\
+ http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2;md5sum=8b8907c8b925761c9410bcadb9705346 \
+ file://midpath.patch;patch=1 \
+ file://offsets_make.patch;patch=1 \
+ file://classpath_var.patch;patch=1 \
+ file://libmath.patch;patch=1 \
+ file://arm_mmap.patch;patch=1 \
+ "
-PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
-
-FILES_${PN} = "${bindir}/cacao"
-FILES_${PN}-doc = "${datadir}/man"
-FILES_${PN}-dbg = "${bindir}/.debug"
+SRC_URI_append_arm = "file://offset.h_arm.patch;patch=1"
-ALTERNATIVE_NAME = "java"
-ALTERNATIVE_PATH = "${bindir}/cacao"
-ALTERNATIVE_PRIORITY = "10"
diff --git a/packages/cacao/cacao-initial_0.98.bb b/packages/cacao/cacao-initial_0.98.bb
new file mode 100644
index 0000000000..08abf41c33
--- /dev/null
+++ b/packages/cacao/cacao-initial_0.98.bb
@@ -0,0 +1,34 @@
+require cacao-native.inc
+
+PROVIDES = "virtual/java-initial"
+
+DEPENDS = "zlib-native libtool-native fastjar-native classpath-initial jikes-initial"
+
+PR = "r0"
+
+SRC_URI = "\
+ http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2; \
+ file://cacao-0.98-initial.patch;patch=1;pnum=1 \
+ "
+
+# libjvm disabled - it would conflict with cacao-native installations
+EXTRA_OECONF = "\
+ --enable-debug \
+ --with-classpath-libdir=${libdir} \
+ --with-classpath-includedir=${includedir}/classpath-initial \
+ --with-classpath-classes=${datadir}/classpath-initial/glibj.zip \
+ --with-vm-zip=${datadir}/cacao-initial/vm.zip \
+ --program-suffix=-initial \
+ --disable-libjvm \
+ "
+
+# enforces the usage of jikes-initial
+export JAVAC=jikes-initial
+
+# enforces the usage of fastjar
+export JAR=fastjar
+
+do_configure_append() {
+ # Fix the executable name in the wrapper script.
+ sed -i -e "s|exec cacao|exec cacao-initial|" src/scripts/java.in
+}
diff --git a/packages/cacao/cacao-native.inc b/packages/cacao/cacao-native.inc
new file mode 100644
index 0000000000..26d3d37f58
--- /dev/null
+++ b/packages/cacao/cacao-native.inc
@@ -0,0 +1,27 @@
+DESCRIPTION = "CacaoVM for use as OpenEmbedded's Java VM"
+HOMEPAGE = "http://www.cacaojvm.org/"
+LICENSE = "GPL"
+PRIORITY = "optional"
+SECTION = "interpreters"
+
+DEPENDS = "zlib-native libtool-native classpath-native ecj-initial fastjar-native"
+
+PROVIDES = "virtual/java-native"
+
+S = "${WORKDIR}/cacao-${PV}"
+
+inherit native autotools
+
+EXTRA_OECONF = "\
+ --enable-debug \
+ --with-classpath-libdir=${libdir} \
+ --with-classpath-includedir=${includedir}/classpath \
+ --with-classpath-classes=${datadir}/classpath/glibj.zip \
+ --with-vm-zip=${datadir}/cacao/vm.zip \
+ "
+
+# force usage of ecj-initial (but Java5-compatible class library)
+export JAVAC="${STAGING_BINDIR_NATIVE}/ecj-initial -bootclasspath ${STAGING_DATADIR_NATIVE}/classpath/glibj.zip"
+
+# force usage of fastjar
+export JAR=fastjar
diff --git a/packages/cacao/cacao-native_0.98+hg20071001.bb b/packages/cacao/cacao-native_0.98+hg20071001.bb
new file mode 100644
index 0000000000..409d2c7858
--- /dev/null
+++ b/packages/cacao/cacao-native_0.98+hg20071001.bb
@@ -0,0 +1,5 @@
+require cacao-native.inc
+
+PR = "r1"
+
+SRC_URI = "http://jalimo.evolvis.org/repository/sources/cacao-${PV}.tar.bz2;md5sum=9ff10c929bd0cbf15909107c1aff7518"
diff --git a/packages/cacao/cacao.inc b/packages/cacao/cacao.inc
index 9315babfb9..09fc741579 100644
--- a/packages/cacao/cacao.inc
+++ b/packages/cacao/cacao.inc
@@ -1,16 +1,51 @@
-DESCRIPTION = "cacao is a Java Virtual Machine, which uses GNU Classpath as default Java core library"
+DESCRIPTION = "Cacao is a Java Virtual Machine, which uses GNU Classpath as default Java core library"
HOMEPAGE = "http://www.cacaojvm.org/"
LICENSE = "GPL"
PRIORITY = "optional"
SECTION = "interpreters"
-PR = "r1"
-inherit autotools
+DEPENDS = "zlib libtool classpath cacaoh-native virtual/javac-native"
-SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-0.98/cacao-${PV}.tar.bz2;md5sum=8b8907c8b925761c9410bcadb9705346"
+# Avoid version number here, otherwise dpkg will expect a package name
+# and cannot be satisfied with a package that provides classpath.
+RDEPENDS = "classpath"
-S = "${WORKDIR}/cacao-${PV}"
+PROVIDES = "cacao virtual/java"
+RPROVIDES_cacao = "java2-runtime"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF = "\
+ ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
+ --enable-debug \
+ --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-${PV} \
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --with-classpath-classes=${STAGING_DATADIR}/classpath/glibj.zip \
+ --with-target-classpath-classes=${datadir}/classpath/glibj.zip \
+ --with-vm-zip=${datadir}/cacao/vm.zip \
+ --with-classpath-libdir=${libdir} \
+ "
+
+PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
+
+FILES_${PN} = "${bindir}/${PN} ${libdir}/lib*.so* ${datadir}/${PN}"
+FILES_${PN}-doc = "${datadir}/man"
+FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/.debug/lib*.so*"
+
+ALTERNATIVE_NAME = "java"
+ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
+ALTERNATIVE_PATH = "${bindir}/cacao"
+ALTERNATIVE_PRIORITY = "10"
+
+do_configure_prepend() {
+ # Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
+ # configured in OE.
+ if [ -e src/vm/properties.c ]; then
+ sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/properties.c
+ fi
+
+ if [ -e src/vm/properties.c ]; then
+ sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/vm.c
+ fi
+}
-EXTRA_OECONF = "--disable-debug \
- ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
- "
diff --git a/packages/cacao/cacao_0.98+hg20071001.bb b/packages/cacao/cacao_0.98+hg20071001.bb
new file mode 100644
index 0000000000..94919ad24a
--- /dev/null
+++ b/packages/cacao/cacao_0.98+hg20071001.bb
@@ -0,0 +1,22 @@
+require cacao.inc
+
+PR = "r7"
+
+SRC_URI = "\
+ http://jalimo.evolvis.org/repository/sources/cacao-${PV}.tar.bz2;md5sum=9ff10c929bd0cbf15909107c1aff7518 \
+ file://cacao-0.98+svn-libdir.diff;patch=1 \
+ file://cacao-0.98+svn-classpath_var.patch;patch=1 \
+ file://cacao-0.98+hg-arm-cacheflush-fix.patch;patch=1 \
+ file://cacao-0.98+hg-attachthread.patch;patch=1 \
+ "
+
+EXTRA_OECONF += "\
+ --enable-annotations \
+ "
+
+# Quirks for Nokia N800:
+# - with mfloat-abi=softfp the runtime fails to run anything
+# - without --enable-softfloat it cannot find files within Jars
+TARGET_CC_ARCH_nokia800 = "-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=soft"
+
+EXTRA_OECONF_append_nokia800 = "--enable-softfloat"
diff --git a/packages/cacao/cacaoh-cldc-native_0.98.bb b/packages/cacao/cacaoh-cldc-native_0.98.bb
index 7ea7cad5dd..e2c92cc328 100644
--- a/packages/cacao/cacaoh-cldc-native_0.98.bb
+++ b/packages/cacao/cacaoh-cldc-native_0.98.bb
@@ -1,16 +1,19 @@
+require cacaoh-native.inc
-require cacao.inc
+DEPENDS += "midpath-cldc-native"
-DEPENDS = "ecj-native classpath-minimal-native virtual/cldc-api-1.1-native libtool-native zlib-native"
+SRC_URI = "\
+ http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2;md5sum=8b8907c8b925761c9410bcadb9705346 \
+ "
-inherit native
-
-EXTRA_OECONF += "--with-classpath-includedir=${STAGING_INCDIR}/classpath-minimal \
- --enable-jni \
- --enable-java=cldc1.1 \
- --with-classpath=cldc1.1 \
- --with-classpath-classes=${STAGING_DATADIR}/java/cldc1.1.jar \
- "
+EXTRA_OECONF += "\
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --enable-jni \
+ --enable-java=cldc1.1 \
+ --with-classpath=cldc1.1 \
+ --with-classpath-classes=${STAGING_DATADIR}/midpath-cldc/midpath-cldc1.1.jar \
+"
+
do_stage() {
- install -m 0755 src/cacaoh/.libs/cacaoh ${STAGING_BINDIR}/
+ install -m 0755 src/cacaoh/.libs/cacaoh ${STAGING_BINDIR}/cacaoh-cldc-${PV}
}
diff --git a/packages/cacao/cacaoh-native.inc b/packages/cacao/cacaoh-native.inc
new file mode 100644
index 0000000000..3e7fdd60c6
--- /dev/null
+++ b/packages/cacao/cacaoh-native.inc
@@ -0,0 +1,27 @@
+DESCRIPTION = "Header generator for Cacao JVM - Needed for cross-compilation builds"
+HOMEPAGE = "http://www.cacaojvm.org/"
+LICENSE = "GPL"
+
+DEPENDS = "libtool-native zlib-native virtual/javac-native classpath-native"
+
+S = "${WORKDIR}/cacao-${PV}"
+
+PR = "r1"
+
+inherit autotools native
+
+EXTRA_OECONF = " \
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --with-classpath-classes=${STAGING_DATADIR}/classpath/glibj.zip \
+ "
+
+do_compile() {
+ # Compile the header generator only (and what is needed for it).
+ oe_runmake -C src/toolbox libtoolbox.la
+ oe_runmake -C src/vmcore libvmcore.la
+ oe_runmake -C src/cacaoh cacaoh
+}
+
+do_stage() {
+ install -m 0755 src/cacaoh/.libs/cacaoh ${STAGING_BINDIR}/cacaoh-${PV}
+}
diff --git a/packages/cacao/cacaoh-native_0.98+hg20071001.bb b/packages/cacao/cacaoh-native_0.98+hg20071001.bb
new file mode 100644
index 0000000000..cb552df827
--- /dev/null
+++ b/packages/cacao/cacaoh-native_0.98+hg20071001.bb
@@ -0,0 +1,5 @@
+require cacaoh-native.inc
+
+SRC_URI = "http://jalimo.evolvis.org/repository/sources/cacao-${PV}.tar.bz2;md5sum=9ff10c929bd0cbf15909107c1aff7518"
+
+
diff --git a/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-fix.patch b/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-fix.patch
new file mode 100644
index 0000000000..4e63f501ff
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-fix.patch
@@ -0,0 +1,18 @@
+diff -r df1b780317c3 src/vm/jit/arm/asmpart.S
+--- a/src/vm/jit/arm/asmpart.S Thu Jan 17 01:01:35 2008 +0100
++++ b/src/vm/jit/arm/asmpart.S Mon Jan 21 00:14:41 2008 +0100
+@@ -323,10 +323,11 @@ asm_cacheflush:
+ mov a1, #0xff000000
+ #endif
+
++#if defined(__ARM_EABI__)
++ swi 0x0
++ ldmfd sp!, {r7}
++#else
+ swi sys_cacheflush
+-
+-#if defined(__ARM_EABI__)
+- ldmfd sp!, {r7}
+ #endif
+
+ mov pc, lr
diff --git a/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-workaround.patch b/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-workaround.patch
new file mode 100644
index 0000000000..813cb683f6
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-workaround.patch
@@ -0,0 +1,50 @@
+Index: cacao-0.98+hg7750/src/vm/jit/arm/asmpart.S
+===================================================================
+--- cacao-0.98+hg7750.orig/src/vm/jit/arm/asmpart.S 2007-11-28 10:14:51.000000000 +0100
++++ cacao-0.98+hg7750/src/vm/jit/arm/asmpart.S 2007-11-28 10:15:31.000000000 +0100
+@@ -302,35 +302,21 @@
+ * *
+ *******************************************************************************/
+
+-.equ sys_cacheflush,__ARM_NR_cacheflush /* syscall number for cache flushing */
+-
++.equ sys_cacheflush, 0x9f0002
+ asm_cacheflush:
+- add a1, a0, a1
+- mov a2, #0
+-
+-#if defined(__ARM_EABI__)
+- /* According to EABI, the syscall number should be passed via R7,
+- see "http://wiki.debian.org/ArmEabiPort" for additional details. */
+-
+- stmfd sp!, {r7}
+- mov r7, #0x0f0000
+- add r7, r7, #0x000002
+-#endif
++ add a1, a0, a1
++ mov a2, #0
+
+ #if 0
+- /* TWISTI: required on iyonix, maybe a linux-2.4 bug */
+- mov a0, #0x0
+- mov a1, #0xff000000
++ /* TWISTI: required on iyonix, maybe a linux-2.4 bug */
++ /* TODO: repeair this! */
++ /* cacheflush is messed up beyond all repair! */
++ mov a0, #0x0
++ mov a1, #0xff000000
+ #endif
+
+- swi sys_cacheflush
+-
+-#if defined(__ARM_EABI__)
+- ldmfd sp!, {r7}
+-#endif
+-
+- mov pc, lr
+-
++ swi #sys_cacheflush
++ mov pc, lr
+
+ /* disable exec-stacks ********************************************************/
+
diff --git a/packages/cacao/files/cacao-0.98+hg-attachthread.patch b/packages/cacao/files/cacao-0.98+hg-attachthread.patch
new file mode 100644
index 0000000000..cda01bcfb2
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+hg-attachthread.patch
@@ -0,0 +1,89 @@
+# Makes the JNI function AttachCurrentThread work properly.
+
+Index: cacao-0.98+hg20071001/src/mm/boehm-gc/include/gc.h
+===================================================================
+--- cacao-0.98+hg20071001.orig/src/mm/boehm-gc/include/gc.h 2008-01-15 14:45:41.000000000 +0100
++++ cacao-0.98+hg20071001/src/mm/boehm-gc/include/gc.h 2008-01-15 14:46:30.000000000 +0100
+@@ -905,6 +905,8 @@
+ /* in returned list. */
+ extern void GC_thr_init GC_PROTO((void));/* Needed for Solaris/X86 */
+
++extern void GC_thr_init_foreign GC_PROTO((void));/* Needed for Solaris/X86 */
++
+ #endif /* THREADS && !SRC_M3 */
+
+ #if defined(GC_WIN32_THREADS) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
+Index: cacao-0.98+hg20071001/src/mm/boehm-gc/pthread_support.c
+===================================================================
+--- cacao-0.98+hg20071001.orig/src/mm/boehm-gc/pthread_support.c 2008-01-15 14:45:41.000000000 +0100
++++ cacao-0.98+hg20071001/src/mm/boehm-gc/pthread_support.c 2008-01-15 14:46:30.000000000 +0100
+@@ -864,6 +864,27 @@
+ }
+ #endif /* GC_NETBSD_THREADS */
+
++void GC_thr_init_foreign()
++{
++# ifndef GC_DARWIN_THREADS
++ int dummy;
++# endif
++ GC_thread t;
++ LOCK();
++
++ /* Add the initial thread, so we can stop it. */
++ t = GC_new_thread(pthread_self());
++# ifdef GC_DARWIN_THREADS
++ t -> stop_info.mach_thread = mach_thread_self();
++# else
++ t -> stop_info.stack_ptr = (ptr_t)(&dummy);
++# endif
++ t -> flags = DETACHED;
++
++ UNLOCK();
++
++}
++
+ /* We hold the allocation lock. */
+ void GC_thr_init()
+ {
+Index: cacao-0.98+hg20071001/src/mm/boehm.c
+===================================================================
+--- cacao-0.98+hg20071001.orig/src/mm/boehm.c 2008-01-15 14:45:41.000000000 +0100
++++ cacao-0.98+hg20071001/src/mm/boehm.c 2008-01-15 14:46:30.000000000 +0100
+@@ -108,6 +108,10 @@
+ GC_expand_hp(heapstartsize - heapcurrentsize);
+ }
+
++void gc_init_foreign()
++{
++ GC_thr_init_foreign();
++}
+
+ static void gc_ignore_warnings(char *msg, GC_word arg)
+ {
+Index: cacao-0.98+hg20071001/src/mm/gc-common.h
+===================================================================
+--- cacao-0.98+hg20071001.orig/src/mm/gc-common.h 2008-01-15 14:45:41.000000000 +0100
++++ cacao-0.98+hg20071001/src/mm/gc-common.h 2008-01-15 14:46:30.000000000 +0100
+@@ -74,6 +74,7 @@
+ void gc_finalize_all(void);
+ void *gc_out_of_memory(size_t bytes_requested);
+
++void gc_init_foreign();
+
+ /* inlined functions **********************************************************/
+
+Index: cacao-0.98+hg20071001/src/threads/native/threads.c
+===================================================================
+--- cacao-0.98+hg20071001.orig/src/threads/native/threads.c 2008-01-15 14:45:41.000000000 +0100
++++ cacao-0.98+hg20071001/src/threads/native/threads.c 2008-01-15 16:01:22.000000000 +0100
+@@ -1392,7 +1392,10 @@
+
+ /* thread is completely initialized */
+
++ gc_init_foreign();
++
+ threads_thread_state_runnable(thread);
++ threads_set_current_threadobject(thread);
+
+ DEBUGTHREADS("attaching", thread);
+
diff --git a/packages/cacao/files/cacao-0.98+svn-classpath_var.patch b/packages/cacao/files/cacao-0.98+svn-classpath_var.patch
new file mode 100644
index 0000000000..255281d386
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+svn-classpath_var.patch
@@ -0,0 +1,56 @@
+Index: cacao-trunk/src/vm/properties.c
+===================================================================
+--- cacao-trunk.orig/src/vm/properties.c 2007-08-31 13:28:53.000000000 +0200
++++ cacao-trunk/src/vm/properties.c 2007-09-03 00:36:14.000000000 +0200
+@@ -294,14 +294,14 @@
+ len =
+ strlen(CACAO_VM_ZIP) +
+ strlen(":") +
+- strlen(CLASSPATH_CLASSES) +
++ strlen(TARGET_CLASSPATH_CLASSES) +
+ strlen("0");
+
+ boot_class_path = MNEW(char, len);
+
+ strcpy(boot_class_path, CACAO_VM_ZIP);
+ strcat(boot_class_path, ":");
+- strcat(boot_class_path, CLASSPATH_CLASSES);
++ strcat(boot_class_path, TARGET_CLASSPATH_CLASSES);
+
+ # elif defined(WITH_CLASSPATH_SUN)
+
+Index: cacao-trunk/configure.ac
+===================================================================
+--- cacao-trunk.orig/configure.ac 2007-08-31 13:22:03.000000000 +0200
++++ cacao-trunk/configure.ac 2007-08-31 13:30:44.000000000 +0200
+@@ -851,6 +851,7 @@
+ AC_CHECK_WITH_CLASSPATH
+ AC_CHECK_WITH_CLASSPATH_PREFIX
+ AC_CHECK_WITH_CLASSPATH_CLASSES
++AC_CHECK_WITH_TARGET_CLASSPATH_CLASSES
+ AC_CHECK_WITH_CLASSPATH_LIBDIR
+ AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
+
+Index: cacao-trunk/m4/classpath.m4
+===================================================================
+--- cacao-trunk.orig/m4/classpath.m4 2007-08-31 13:22:21.000000000 +0200
++++ cacao-trunk/m4/classpath.m4 2007-08-31 13:30:55.000000000 +0200
+@@ -98,6 +98,18 @@
+ AC_SUBST(CLASSPATH_CLASSES)
+ ])
+
++dnl where are Java core library classes installed on the target
++
++AC_DEFUN([AC_CHECK_WITH_TARGET_CLASSPATH_CLASSES],[
++AC_MSG_CHECKING(where Java core library classes are installed on the target)
++AC_ARG_WITH([target-classpath-classes],
++ [AS_HELP_STRING(--with-target-classpath-classes=<path>,path to Java core library classes (includes the name of the file and may be flat) [[default=/usr/local/classpath/share/classpath/glibj.zip]])],
++ [TARGET_CLASSPATH_CLASSES=${withval}],
++ [TARGET_CLASSPATH_CLASSES=${CLASSPATH_PREFIX}/share/classpath/glibj.zip])
++AC_MSG_RESULT(${TARGET_CLASSPATH_CLASSES})
++AC_DEFINE_UNQUOTED([TARGET_CLASSPATH_CLASSES], "${TARGET_CLASSPATH_CLASSES}", [Java core library classes on the target])
++AC_SUBST(TARGET_CLASSPATH_CLASSES)
++])
+
+ dnl where are Java core library native libraries installed
+
diff --git a/packages/cacao/files/cacao-0.98+svn-libdir.diff b/packages/cacao/files/cacao-0.98+svn-libdir.diff
new file mode 100644
index 0000000000..f5cf9ba5a1
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+svn-libdir.diff
@@ -0,0 +1,30 @@
+Index: cacao-trunk/src/vm/properties.c
+===================================================================
+--- cacao-trunk.orig/src/vm/properties.c 2007-08-31 13:20:41.000000000 +0200
++++ cacao-trunk/src/vm/properties.c 2007-09-04 14:54:19.000000000 +0200
+@@ -210,15 +210,22 @@
+
+ # if defined(WITH_CLASSPATH_GNU)
+
+- boot_library_path = CLASSPATH_LIBDIR"/classpath";
++ boot_library_path = CLASSPATH_LIBDIR"/classpath:OE_LIBDIR_JNI";
+
+ # elif defined(WITH_CLASSPATH_SUN)
+
+- boot_library_path = CLASSPATH_LIBDIR;
++ boot_library_path = CLASSPATH_LIBDIR":OE_LIBDIR_JNI";
+
+ # elif defined(WITH_CLASSPATH_CLDC1_1)
+
+- /* No boot_library_path required. */
++ /* No boot_library_path required.
++ Well, don't be that strict on Debian-like
++ environments. Setting this to /usr/lib/jni
++ makes it unneccessary to fumble with
++ LD_LIBRARY_PATH to get things like MIDPath
++ running.
++ */
++ boot_library_path = "OE_LIBDIR_JNI";
+
+ # else
+ # error unknown classpath configuration
diff --git a/packages/cacao/files/cacao-0.98-initial.patch b/packages/cacao/files/cacao-0.98-initial.patch
new file mode 100644
index 0000000000..30b6d147e8
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98-initial.patch
@@ -0,0 +1,45 @@
+Index: cacao-0.98/configure.ac
+===================================================================
+--- cacao-0.98.orig/configure.ac 2007-12-19 22:07:55.000000000 +0100
++++ cacao-0.98/configure.ac 2007-12-19 22:08:02.000000000 +0100
+@@ -27,7 +27,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+
+
+-AC_INIT(cacao, 0.98, cacao@cacaojvm.org)
++AC_INIT(cacao-initial, 0.98, cacao@cacaojvm.org)
+ AC_CONFIG_SRCDIR(src/cacao/cacao.c)
+ AC_CANONICAL_HOST
+ AC_PREREQ(2.59)
+Index: cacao-0.98/src/vm/vm.c
+===================================================================
+--- cacao-0.98.orig/src/vm/vm.c 2007-12-19 22:31:19.000000000 +0100
++++ cacao-0.98/src/vm/vm.c 2007-12-19 22:32:36.000000000 +0100
+@@ -623,7 +623,7 @@
+ #else
+ puts(" java.boot.class.path : "CLASSPATH_CLASSES"");
+ #endif
+- puts(" gnu.classpath.boot.library.path: "CLASSPATH_LIBDIR"/classpath\n");
++ puts(" gnu.classpath.boot.library.path: "CLASSPATH_LIBDIR"/classpath-initial\n");
+
+ puts("Runtime variables:\n");
+ printf(" maximum heap size : %d\n", opt_heapmaxsize);
+@@ -828,15 +828,15 @@
+
+ /* and finally set the path to GNU Classpath libraries */
+
+- len = strlen(cacao_prefix) + strlen("/lib/classpath") + strlen("0");
++ len = strlen(cacao_prefix) + strlen("/lib/classpath-initial") + strlen("0");
+
+ classpath_libdir = MNEW(char, len);
+ strcpy(classpath_libdir, cacao_prefix);
+- strcat(classpath_libdir, "/lib/classpath");
++ strcat(classpath_libdir, "/lib/classpath-initial");
+ #else
+ cacao_prefix = CACAO_PREFIX;
+ cacao_libjvm = CACAO_LIBDIR"/libjvm";
+- classpath_libdir = CLASSPATH_LIBDIR"/classpath";
++ classpath_libdir = CLASSPATH_LIBDIR"/classpath-initial";
+ #endif
+
+ /* set the bootclasspath */
diff --git a/packages/classpath/classpath-initial_0.93.bb b/packages/classpath/classpath-initial_0.93.bb
new file mode 100644
index 0000000000..9e303f6eba
--- /dev/null
+++ b/packages/classpath/classpath-initial_0.93.bb
@@ -0,0 +1,28 @@
+# No later version of Classpath may be used because this is the latest that can be compiled
+# by jikes!
+
+require classpath-native.inc
+
+DESCRIPTION="Java1.4-compatible GNU Classpath variant that is used as bootclasspath for jikes-native."
+
+PR = "r0"
+
+DEPENDS = "zip-native fastjar-native jikes-native"
+
+EXTRA_OECONF = "\
+ --with-jikes=jikes \
+ --with-fastjar=fastjar \
+ --with-glibj \
+ --disable-local-sockets \
+ --disable-alsa \
+ --disable-gconf-peer \
+ --disable-gtk-peer \
+ --disable-plugin \
+ --disable-dssi \
+ --disable-examples \
+ --disable-tools \
+ --with-glibj-dir=${STAGING_DATADIR}/classpath-initial \
+ --with-native-libdir=${STAGING_LIBDIR}/classpath-initial \
+ --includedir=${STAGING_INCDIR}/classpath-initial \
+ "
+
diff --git a/packages/classpath/classpath-minimal_0.96.1.bb b/packages/classpath/classpath-minimal_0.96.1.bb
new file mode 100644
index 0000000000..0597274915
--- /dev/null
+++ b/packages/classpath/classpath-minimal_0.96.1.bb
@@ -0,0 +1,17 @@
+require classpath.inc
+
+PR = "r3"
+
+SRC_URI += "file://gjar-prefix-patch.diff;patch=1;pnum=0"
+
+PROVIDES = "${PN} classpath"
+
+EXTRA_OECONF += "\
+ --enable-local-sockets \
+ --disable-alsa \
+ --disable-gconf-peer \
+ --disable-gtk-peer \
+ --disable-plugin \
+ --disable-dssi \
+ --disable-examples \
+ "
diff --git a/packages/classpath/classpath-native.inc b/packages/classpath/classpath-native.inc
new file mode 100644
index 0000000000..bb5abaf178
--- /dev/null
+++ b/packages/classpath/classpath-native.inc
@@ -0,0 +1,32 @@
+DESCRIPTION = "GNU Classpath standard Java libraries - For native Java-dependent programs"
+HOMEPAGE = "http://www.gnu.org/software/classpath/"
+LICENSE = "Classpath"
+
+S = "${WORKDIR}/classpath-${PV}"
+
+SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz"
+
+DEPENDS = "ecj-initial fastjar-native zip-native"
+
+inherit autotools native
+
+EXTRA_OECONF = "\
+ --with-glibj \
+ --with-ecj=${STAGING_BINDIR_NATIVE}/ecj-initial \
+ --with-fastjar=fastjar \
+ --enable-local-sockets \
+ --disable-alsa \
+ --disable-gconf-peer \
+ --disable-gtk-peer \
+ --disable-plugin \
+ --disable-dssi \
+ --enable-examples \
+ --enable-tools \
+ --includedir=${STAGING_INCDIR}/classpath \
+ --with-vm=java \
+ "
+
+do_stage() {
+ oe_runmake install
+}
+
diff --git a/packages/classpath/classpath-native_0.96.1.bb b/packages/classpath/classpath-native_0.96.1.bb
new file mode 100644
index 0000000000..e7d1d07a81
--- /dev/null
+++ b/packages/classpath/classpath-native_0.96.1.bb
@@ -0,0 +1,6 @@
+require classpath-native.inc
+
+PR = "r1"
+
+SRC_URI += "file://gjar-prefix-patch.diff;patch=1;pnum=0"
+
diff --git a/packages/classpath/classpath.inc b/packages/classpath/classpath.inc
index d9498c99d5..97c081af89 100644
--- a/packages/classpath/classpath.inc
+++ b/packages/classpath/classpath.inc
@@ -3,28 +3,62 @@ HOMEPAGE = "http://www.gnu.org/software/classpath/"
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "Classpath"
-PROVIDES = "classpath"
-RPROVIDES = "classpath"
+PBN = "classpath"
-SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz \
- file://gconf_version.patch;patch=1 \
- file://fix-endian-arm-floats.patch;patch=1"
+DEPENDS = "virtual/javac-native fastjar-native zip-native"
+RPROVIDES = ""
+
+RDEPENDS_${PN} = "${PBN}-common (>= ${PV})"
+
+RPROVIDES_${PN} = "${PBN}"
+RPROVIDES_${PN}-gtk = "${PBN}-awt"
+
+SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz"
+
+S = "${WORKDIR}/${PBN}-${PV}"
+
+EXTRA_OECONF = "\
+ --with-glibj \
+ --with-ecj=javac \
+ --with-fastjar=fastjar \
+ --includedir=${includedir}/classpath \
+ --with-vm=java \
+ "
inherit autotools
do_stage() {
install -d ${STAGING_INCDIR}/classpath
- install -m 0755 include/jni* ${STAGING_INCDIR}/classpath/
+ install -m 0644 include/jni* ${STAGING_INCDIR}/classpath
+ install -m 0644 include/jni_md.h ${STAGING_INCDIR}/classpath/
+
+ install -d ${STAGING_DATADIR}/classpath
+ install -m 0644 lib/glibj.zip ${STAGING_DATADIR}/classpath
}
do_install() {
autotools_do_install
- mv ${D}${libdir}/security ${D}${libdir}/${PN}
+ mv ${D}${libdir}/security ${D}${libdir}/${PBN}
}
-PACKAGES =+ "classpath-common classpath-examples classpath-tools"
-FILES_classpath-common += "${datadir}/classpath/glibj.zip"
-FILES_classpath-examples += "${datadir}/classpath/examples"
-FILES_classpath-tools += "${datadir}/classpath/tools.zip ${datadir}/classpath/tools"
-FILES_classpath-dev += "${libdir}/*.so"
-FILES_classpath-dbg += "${libdir}/classpath/.debug"
+PACKAGES =+ "${PBN}-common ${PN}-examples \
+ ${PN}-tools ${PN}-tools-doc \
+ ${PN}-gtk ${PN}-gconf "
+
+FILES_${PN}-dev += "${libdir}/${PBN}/*.la ${incdir}/${PBN}"
+
+FILES_${PBN}-common = "${datadir}/${PBN}/glibj.zip ${libdir}/logging.properties ${libdir}/${PBN}/security"
+FILES_${PN}-examples = "${datadir}/${PBN}/examples"
+
+FILES_${PN}-tools = "${datadir}/${PBN}/tools.zip ${bindir}"
+FILES_${PN}-tools-doc = "${mandir}"
+
+FILES_${PN}-dbg += "${libdir}/${PBN}/.debug"
+FILES_${PN}-doc = "${infodir}"
+
+# gcjwebplugin - not built yet
+#FILES_${PN}-gcjwebplugin = "${libdir}/${PBN}/libgcjwebplugin.so"
+FILES_${PN}-gtk = "${libdir}/${PBN}/libgtkpeer.so ${libdir}/${PBN}/libjawt.so"
+FILES_${PN}-gconf = "${libdir}/${PBN}/libgconfpeer.so"
+FILES_${PN} = "${libdir}/${PBN}/lib*so*"
+
diff --git a/packages/classpath/classpath_0.95.bb b/packages/classpath/classpath_0.95.bb
new file mode 100644
index 0000000000..6b167a2d47
--- /dev/null
+++ b/packages/classpath/classpath_0.95.bb
@@ -0,0 +1,20 @@
+require classpath.inc
+
+SRC_URI += "file://gjar-prefix-patch.diff;patch=1;pnum=0"
+
+PR = "r2"
+
+DEPENDS += "gtk+ gconf libxtst"
+
+EXTRA_OECONF += "\
+ --disable-alsa \
+ --disable-dssi \
+ --disable-qt4-peer \
+ --disable-plugin \
+ --enable-gconf-peer \
+ --enable-gtk-peer \
+ --enable-local-sockets \
+ --with-vm=java \
+ "
+
+
diff --git a/packages/classpath/classpath_0.96.1.bb b/packages/classpath/classpath_0.96.1.bb
new file mode 100644
index 0000000000..6b167a2d47
--- /dev/null
+++ b/packages/classpath/classpath_0.96.1.bb
@@ -0,0 +1,20 @@
+require classpath.inc
+
+SRC_URI += "file://gjar-prefix-patch.diff;patch=1;pnum=0"
+
+PR = "r2"
+
+DEPENDS += "gtk+ gconf libxtst"
+
+EXTRA_OECONF += "\
+ --disable-alsa \
+ --disable-dssi \
+ --disable-qt4-peer \
+ --disable-plugin \
+ --enable-gconf-peer \
+ --enable-gtk-peer \
+ --enable-local-sockets \
+ --with-vm=java \
+ "
+
+
diff --git a/packages/classpath/files/gjar-prefix-patch.diff b/packages/classpath/files/gjar-prefix-patch.diff
new file mode 100644
index 0000000000..64b262cb41
--- /dev/null
+++ b/packages/classpath/files/gjar-prefix-patch.diff
@@ -0,0 +1,40 @@
+Index: tools/gnu/classpath/tools/jar/Entry.java
+===================================================================
+RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/jar/Entry.java,v
+retrieving revision 1.1
+diff -u -r1.1 Entry.java
+--- tools/gnu/classpath/tools/jar/Entry.java 8 May 2006 18:38:20 -0000 1.1
++++ tools/gnu/classpath/tools/jar/Entry.java 10 Dec 2007 22:20:05 -0000
+@@ -1,5 +1,5 @@
+ /* Entry.java - represent a single file to write to a jar
+- Copyright (C) 2006 Free Software Foundation, Inc.
++ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+
+ This file is part of GNU Classpath.
+
+@@ -49,12 +49,22 @@
+ public Entry(File file, String name)
+ {
+ this.file = file;
+- this.name = name;
++
++ /* Removes any './' prefixes automatically. Those caused trouble
++ * in (boot) classpath use-cases. See #32516.
++ */
++ int start = 0;
++ while (name.length() > start + 2
++ && name.codePointAt(start) == '.'
++ && name.codePointAt(start + 1) == File.separatorChar)
++ start += 2;
++
++ this.name = name.substring(start);
+ }
+
+ public Entry(File file)
+ {
+- this.file = file;
+- this.name = file.toString();
++ this(file, file.toString());
+ }
++
+ }
diff --git a/packages/ecj/ecj-bootstrap-native_3.3.bb b/packages/ecj/ecj-bootstrap-native_3.3.bb
new file mode 100644
index 0000000000..bd4347457c
--- /dev/null
+++ b/packages/ecj/ecj-bootstrap-native_3.3.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.
+#
+# 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
+}
diff --git a/packages/ecj/ecj-initial_3.3.bb b/packages/ecj/ecj-initial_3.3.bb
new file mode 100644
index 0000000000..7b65daef99
--- /dev/null
+++ b/packages/ecj/ecj-initial_3.3.bb
@@ -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.3-200706251500/ecjsrc.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}
+}
diff --git a/packages/ecj/files/ecj.in b/packages/ecj/files/ecj.in
new file mode 100755
index 0000000000..2099991cef
--- /dev/null
+++ b/packages/ecj/files/ecj.in
@@ -0,0 +1 @@
+${RUNTIME} -Xmx512m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"}
diff --git a/packages/jamvm/files/.mtn2git_empty b/packages/jamvm/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/jamvm/files/.mtn2git_empty
diff --git a/packages/jamvm/files/jamvm-1.3.1-size-defaults.patch b/packages/jamvm/files/jamvm-1.3.1-size-defaults.patch
new file mode 100644
index 0000000000..a41beee982
--- /dev/null
+++ b/packages/jamvm/files/jamvm-1.3.1-size-defaults.patch
@@ -0,0 +1,12 @@
+--- jamvm-1.3.1.orig/src/jam.h 2005-07-17 23:53:34.000000000 +0200
++++ jamvm-1.3.1/src/jam.h 2005-07-17 23:54:17.000000000 +0200
+@@ -548,7 +548,9 @@
+ #endif
+
+ /* default size of the Java stack */
++#ifndef DEFAULT_STACK
+ #define DEFAULT_STACK 64*KB
++#endif
+
+ /* size of emergency area - big enough to create
+ a StackOverflow exception */
diff --git a/packages/jamvm/files/jamvm_1.5.0-initial.patch b/packages/jamvm/files/jamvm_1.5.0-initial.patch
new file mode 100644
index 0000000000..9b972da014
--- /dev/null
+++ b/packages/jamvm/files/jamvm_1.5.0-initial.patch
@@ -0,0 +1,82 @@
+Index: jamvm-1.5.0/configure.ac
+===================================================================
+--- jamvm-1.5.0.orig/configure.ac 2007-12-20 00:01:08.000000000 +0100
++++ jamvm-1.5.0/configure.ac 2007-12-20 00:03:40.000000000 +0100
+@@ -22,7 +22,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+
+ AC_INIT(src/jam.c)
+-AM_INIT_AUTOMAKE(jamvm, 1.5.0)
++AM_INIT_AUTOMAKE(jamvm-initial, 1.5.0)
+ AC_CONFIG_HEADERS([src/config.h])
+ AC_PREFIX_DEFAULT(/usr/local/jamvm)
+
+Index: jamvm-1.5.0/java-initial
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ jamvm-1.5.0/java-initial 2007-12-20 00:03:27.000000000 +0100
+@@ -0,0 +1,5 @@
++#!/bin/sh
++#
++# Wrapper script inspired by the one provided by cacao.
++
++exec jamvm-initial ${1+"$@"}
+Index: jamvm-1.5.0/lib/Makefile.am
+===================================================================
+--- jamvm-1.5.0.orig/lib/Makefile.am 2007-12-20 00:05:24.000000000 +0100
++++ jamvm-1.5.0/lib/Makefile.am 2007-12-20 00:05:28.000000000 +0100
+@@ -19,7 +19,7 @@
+ ## Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ##
+
+-CP_LIB_DIR = ${with_classpath_install_dir}/share/classpath
++CP_LIB_DIR = ${with_classpath_install_dir}/share/classpath-initial
+ GLIBJ_ZIP = ${CP_LIB_DIR}/glibj.zip
+
+ SUBDIRS = jamvm java gnu sun
+Index: jamvm-1.5.0/src/class.h
+===================================================================
+--- jamvm-1.5.0.orig/src/class.h 2007-12-20 00:06:34.000000000 +0100
++++ jamvm-1.5.0/src/class.h 2007-12-20 00:16:41.000000000 +0100
+@@ -39,11 +39,11 @@
+ separate class files in a directory structure */
+
+ #ifdef USE_ZIP
+-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip"
+-#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath/glibj.zip"
++#define JAMVM_CLASSES CLASSPATH_INSTALL_DIR"/share/jamvm-initial/classes.zip"
++#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath-initial/glibj.zip"
+ #else
+-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes"
+-#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath"
++#define JAMVM_CLASSES CLASSPATH_INSTALL_DIR"/share/jamvm-initial/classes"
++#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath-initial"
+ #endif
+
+ #define DFLT_BCP JAMVM_CLASSES":"CLASSPATH_CLASSES
+Index: jamvm-1.5.0/src/dll.c
+===================================================================
+--- jamvm-1.5.0.orig/src/dll.c 2007-12-20 00:01:24.000000000 +0100
++++ jamvm-1.5.0/src/dll.c 2007-12-20 00:03:27.000000000 +0100
+@@ -294,7 +294,7 @@
+ }
+
+ char *getBootDllPath() {
+- return CLASSPATH_INSTALL_DIR"/lib/classpath";
++ return CLASSPATH_INSTALL_DIR"/lib/classpath-initial";
+ }
+
+ char *getDllName(char *name) {
+Index: jamvm-1.5.0/src/Makefile.am
+===================================================================
+--- jamvm-1.5.0.orig/src/Makefile.am 2007-12-20 00:21:37.000000000 +0100
++++ jamvm-1.5.0/src/Makefile.am 2007-12-20 00:21:46.000000000 +0100
+@@ -23,7 +23,7 @@
+ DIST_SUBDIRS = os arch interp
+
+ bin_PROGRAMS = jamvm
+-include_HEADERS = jni.h
++noinst_HEADERS = jni.h
+
+ lib_LTLIBRARIES = libjvm.la
+ noinst_LTLIBRARIES = libcore.la
diff --git a/packages/jamvm/jamvm-initial_1.5.0.bb b/packages/jamvm/jamvm-initial_1.5.0.bb
new file mode 100644
index 0000000000..3369733340
--- /dev/null
+++ b/packages/jamvm/jamvm-initial_1.5.0.bb
@@ -0,0 +1,36 @@
+SUMMARY = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
+HOMEPAGE = "http://jamvm.sourceforge.net/"
+LICENSE = "GPL"
+
+DEPENDS = "zlib-native classpath-initial jikes-initial"
+
+PROVIDES = "virtual/java-initial"
+
+S = "${WORKDIR}/jamvm-${PV}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \
+ file://jamvm_${PV}-initial.patch;patch=1;pnum=1 \
+ "
+
+# This uses 32 bit arm, so force the instruction set to arm, not thumb
+ARM_INSTRUCTION_SET = "arm"
+
+inherit native autotools
+
+EXTRA_OECONF = "\
+ --with-classpath-install-dir=${STAGING_DIR_NATIVE}\
+ --program-suffix=-initial \
+ "
+
+CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
+
+do_compile() {
+ oe_runmake \
+ JAVAC=jikes-initial \
+ GLIBJ_ZIP=${STAGING_DATADIR_NATIVE}/classpath-initial/glibj.zip
+}
+
+do_stage_append() {
+ install -d ${STAGING_BINDIR}
+ install -m 0755 java-initial ${STAGING_BINDIR}
+}
diff --git a/packages/jamvm/jamvm.inc b/packages/jamvm/jamvm.inc
new file mode 100644
index 0000000000..36378370c5
--- /dev/null
+++ b/packages/jamvm/jamvm.inc
@@ -0,0 +1,22 @@
+DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
+HOMEPAGE = "http://jamvm.sourceforge.net/"
+LICENSE = "GPL"
+
+DEPENDS = "zlib classpath virtual/javac-native"
+RDEPENDS = "classpath"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz"
+
+RPROVIDES_jamvm = "java2-runtime"
+
+# This uses 32 bit arm, so force the instruction set to arm, not thumb
+ARM_INSTRUCTION_SET = "arm"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF = "--with-classpath-install-dir=${prefix}"
+CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
+
+ALTERNATIVE_NAME = "java"
+ALTERNATIVE_PATH = "${bindir}/jamvm"
+ALTERNATIVE_PRIORITY = "10"
diff --git a/packages/jamvm/jamvm_1.4.5.bb b/packages/jamvm/jamvm_1.4.5.bb
index 489b4fb94b..3cc0431266 100644
--- a/packages/jamvm/jamvm_1.4.5.bb
+++ b/packages/jamvm/jamvm_1.4.5.bb
@@ -1,24 +1,4 @@
-DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
-HOMEPAGE = "http://jamvm.sourceforge.net/"
-LICENSE = "GPL"
-PRIORITY = "optional"
-SECTION = "interpreters"
+require jamvm.inc
-DEPENDS = "zlib classpath"
-RDEPENDS = "classpath (>= 0.18) classpath-common (>= 0.18)"
+SRC_URI += "file://jamvm-1.3.1-size-defaults.patch;patch=1"
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz \
- file://jamvm-1.3.1-size-defaults.patch;patch=1"
-
-# This uses 32 bit arm, so force the instruction set to arm, not thumb
-ARM_INSTRUCTION_SET = "arm"
-
-inherit autotools update-alternatives
-
-EXTRA_OECONF = "--with-classpath-install-dir=${prefix}"
-CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
-
-PROVIDES = "virtual/java"
-ALTERNATIVE_NAME = "java"
-ALTERNATIVE_PATH = "${bindir}/jamvm"
-ALTERNATIVE_PRIORITY = "10"
diff --git a/packages/jamvm/jamvm_1.5.0.bb b/packages/jamvm/jamvm_1.5.0.bb
new file mode 100644
index 0000000000..efa959f0f9
--- /dev/null
+++ b/packages/jamvm/jamvm_1.5.0.bb
@@ -0,0 +1,5 @@
+require jamvm.inc
+
+PR = "r0"
+
+
diff --git a/packages/jikes/jikes-initial.bb b/packages/jikes/jikes-initial.bb
new file mode 100644
index 0000000000..0e2f4d0748
--- /dev/null
+++ b/packages/jikes/jikes-initial.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Initial Java 1.4-compatible (and not higher) compiler"
+
+DEPENDS = "jikes-native classpath-initial"
+
+SRC_URI = ""
+
+S = "${WORKDIR}"
+
+inherit native
+
+do_configure() {
+ :
+}
+
+do_compile() {
+ echo "#!/bin/sh" > jikes-initial
+ echo "${STAGING_BINDIR_NATIVE}/jikes -bootclasspath ${STAGING_DATADIR_NATIVE}/classpath-initial/glibj.zip \$@" >> jikes-initial
+}
+
+do_stage() {
+ install -d ${STAGING_BINDIR}
+ install -m 0755 jikes-initial ${STAGING_BINDIR}
+}
diff --git a/packages/jikes/jikes-native_1.21.bb b/packages/jikes/jikes-native_1.21.bb
index 2996046639..b95cbfcd75 100644
--- a/packages/jikes/jikes-native_1.21.bb
+++ b/packages/jikes/jikes-native_1.21.bb
@@ -1,7 +1,6 @@
inherit native
require jikes_${PV}.bb
-PROVIDES = "virtual/javac-native"
S = "${WORKDIR}/jikes-${PV}"
do_stage() {
diff --git a/packages/midpath/midpath-alsa_0.1.bb b/packages/midpath/midpath-alsa_0.1.bb
index 6d580405b6..1ccace8500 100644
--- a/packages/midpath/midpath-alsa_0.1.bb
+++ b/packages/midpath/midpath-alsa_0.1.bb
@@ -30,7 +30,6 @@ do_stage() {
:
}
-PACKAGES = "${PN}"
FILES_${PN} = "${libdir}/libmidpathalsa.so \
${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
diff --git a/packages/midpath/midpath-cldc-native_0.1.bb b/packages/midpath/midpath-cldc-native_0.1.bb
index 27700d2e61..4e54497bde 100644
--- a/packages/midpath/midpath-cldc-native_0.1.bb
+++ b/packages/midpath/midpath-cldc-native_0.1.bb
@@ -4,10 +4,7 @@ inherit native
require midpath-cldc_${PV}.bb
-PROVIDES = "virtual/cldc-api-1.1-native"
-RPROVIDES = " "
-
-PACKAGES = " "
+PACKAGES = "${PN}-dbg "
do_install() {
:
diff --git a/packages/midpath/midpath-cldc-sdl_0.1.bb b/packages/midpath/midpath-cldc-sdl_0.1.bb
index 65850e2f4c..6d777f6e8c 100644
--- a/packages/midpath/midpath-cldc-sdl_0.1.bb
+++ b/packages/midpath/midpath-cldc-sdl_0.1.bb
@@ -32,7 +32,6 @@ do_stage() {
install -m 0644 ${S}/external/sdljava-cldc/sdljava-cldc.jar ${STAGING_DATADIR}/java
}
-PACKAGES = "${PN}"
FILES_${PN} = "${datadir}/java/sdljava-cldc.jar \
${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
diff --git a/packages/midpath/midpath-cldc-x11_0.1.bb b/packages/midpath/midpath-cldc-x11_0.1.bb
index 9db0c4a686..7aa8e9c6d9 100644
--- a/packages/midpath/midpath-cldc-x11_0.1.bb
+++ b/packages/midpath/midpath-cldc-x11_0.1.bb
@@ -1,7 +1,7 @@
require midpath.inc
-DEPENDS += " virtual/libx11 virtual/cldc-api-1.1"
+DEPENDS += "virtual/libx11 midpath-cldc"
do_configure() {
@@ -31,7 +31,6 @@ do_stage() {
install -m 0644 ${S}/external/escher-cldc/core/escher-x11-cldc.jar ${STAGING_DATADIR}/java
}
-PACKAGES = "${PN}"
FILES_${PN} = "${datadir}/java/escher-x11-cldc.jar \
${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
diff --git a/packages/midpath/midpath-cldc_0.1.bb b/packages/midpath/midpath-cldc_0.1.bb
index 51a1314467..e18d42781d 100644
--- a/packages/midpath/midpath-cldc_0.1.bb
+++ b/packages/midpath/midpath-cldc_0.1.bb
@@ -1,9 +1,6 @@
require midpath.inc
-PROVIDES = "virtual/cldc-api-1.1"
-RPROVIDES = "virtual/cldc-api-1.1"
-
do_compile() {
mkdir -p ${S}/dist
@@ -18,21 +15,20 @@ cd ${S}/src/cldc-glue
make JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -sourcepath ${S}/src/cldc-glue -source 1.3 -target 1.1"
make install JAVAC=${JAVAC_CMD} JAVAC_FLAGS="-bootclasspath ${S}/external/cldc1.1/classes -source 1.3 -target 1.1" CLASS_DIR=${S}/external/cldc1.1/classes
# Make a jar
-${FASTJAR_CMD} cvf ${S}/dist/cldc1.1.jar -C ${S}/external/cldc1.1/classes .
+${FASTJAR_CMD} cvf ${S}/dist/midpath-cldc1.1.jar -C ${S}/external/cldc1.1/classes .
}
do_install() {
- install -d ${D}${datadir}/java
- install -m 0644 dist/cldc1.1.jar ${D}${datadir}/java
+ install -d ${D}${datadir}/midpath-cldc
+ install -m 0644 dist/midpath-cldc1.1.jar ${D}${datadir}/midpath-cldc
}
do_stage() {
- install -d ${STAGING_DATADIR}/java
- install -m 0644 dist/cldc1.1.jar ${STAGING_DATADIR}/java
+ install -d ${STAGING_DATADIR}/midpath-cldc
+ install -m 0644 dist/midpath-cldc1.1.jar ${STAGING_DATADIR}/midpath-cldc
}
-PACKAGES = "${PN}"
-FILES_${PN} = "${datadir}/java/cldc1.1.jar"
+FILES_${PN} = "${datadir}/midpath-cldc/midpath-cldc1.1.jar"
diff --git a/packages/midpath/midpath-gtk_0.1.bb b/packages/midpath/midpath-gtk_0.1.bb
index 7bf5570ef2..42f6325efa 100644
--- a/packages/midpath/midpath-gtk_0.1.bb
+++ b/packages/midpath/midpath-gtk_0.1.bb
@@ -32,7 +32,6 @@ do_stage() {
:
}
-PACKAGES = "${PN}"
FILES_${PN} = "${libdir}/libmidpathgtk.so \
${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
diff --git a/packages/midpath/midpath-pulseaudio_0.1.bb b/packages/midpath/midpath-pulseaudio_0.1.bb
index 6344e018a0..1a8c44d38c 100644
--- a/packages/midpath/midpath-pulseaudio_0.1.bb
+++ b/packages/midpath/midpath-pulseaudio_0.1.bb
@@ -30,7 +30,6 @@ do_stage() {
:
}
-PACKAGES = "${PN}"
FILES_${PN} = "${libdir}/libmidpathpulse.so \
${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
diff --git a/packages/midpath/midpath-qt3x11_0.1.bb b/packages/midpath/midpath-qt3x11_0.1.bb
index 1d24012810..7ad9af9991 100644
--- a/packages/midpath/midpath-qt3x11_0.1.bb
+++ b/packages/midpath/midpath-qt3x11_0.1.bb
@@ -37,7 +37,6 @@ do_stage() {
:
}
-PACKAGES = "${PN}"
FILES_${PN} = "${libdir}/libmidpathqt.so \
${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
diff --git a/packages/midpath/midpath-qte_0.1.bb b/packages/midpath/midpath-qte_0.1.bb
index 39b9264930..4b7144722f 100644
--- a/packages/midpath/midpath-qte_0.1.bb
+++ b/packages/midpath/midpath-qte_0.1.bb
@@ -35,7 +35,6 @@ do_stage() {
:
}
-PACKAGES = "${PN}"
FILES_${PN} = "${libdir}/libmidpathqt.so \
${datadir}/java/resources-embedded/com/sun/midp/configuration/configuration.cfg \
diff --git a/packages/midpath/midpath-test_0.1.bb b/packages/midpath/midpath-test_0.1.bb
index 14bfdc97f0..3d06e80797 100644
--- a/packages/midpath/midpath-test_0.1.bb
+++ b/packages/midpath/midpath-test_0.1.bb
@@ -37,7 +37,6 @@ do_stage() {
:
}
-PACKAGES = "${PN}"
FILES_${PN} = "${datadir}/java/midpath-tests.jar \
# ${bindir}/graphical_launcher-j2se.sh \
diff --git a/packages/midpath/midpath.inc b/packages/midpath/midpath.inc
index 33793bffd0..4bc3b71598 100644
--- a/packages/midpath/midpath.inc
+++ b/packages/midpath/midpath.inc
@@ -9,14 +9,14 @@ SRC_URI = "http://downloads.sourceforge.net/midpath/midpath-${PV}.tar.gz"
S = "${WORKDIR}/midpath-${PV}"
-DEPENDS = "ecj-native fastjar-native classpath-minimal"
+DEPENDS = "virtual/javac-native fastjar-native classpath"
-JAVAC_CMD = "${STAGING_BINDIR_NATIVE}/ecj"
+JAVAC_CMD = "${STAGING_BINDIR_NATIVE}/javac"
FASTJAR_CMD = "${STAGING_BINDIR_NATIVE}/fastjar"
JAVA_PATH = "${STAGING_DATADIR}/java"
-GNU_CLASSPATH_PATH = "${JAVA_PATH}/classpath-minimal/glibj.zip"
+GNU_CLASSPATH_PATH = "${JAVA_PATH}/classpath/glibj.zip"
-CLDC_PATH = ${JAVA_PATH}/cldc1.1.jar
+CLDC_PATH = ${STAGING_DATADIR}/midpath-cldc/midpath-cldc1.1.jar
diff --git a/packages/midpath/midpath_0.1.bb b/packages/midpath/midpath_0.1.bb
index 3501144701..e787b053be 100644
--- a/packages/midpath/midpath_0.1.bb
+++ b/packages/midpath/midpath_0.1.bb
@@ -48,7 +48,6 @@ do_stage() {
install -m 0644 dist/midpath.jar ${STAGING_DATADIR}/java
}
-PACKAGES = "${PN}"
FILES_${PN} = "${datadir}/java/midpath.jar \
${datadir}/java/resources-embedded/com/sun/midp/configuration/ \
diff --git a/packages/swt/.mtn2git_empty b/packages/swt/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/swt/.mtn2git_empty
diff --git a/packages/swt/files/.mtn2git_empty b/packages/swt/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/swt/files/.mtn2git_empty
diff --git a/packages/swt/files/Makefile b/packages/swt/files/Makefile
new file mode 100644
index 0000000000..2eb3557cdd
--- /dev/null
+++ b/packages/swt/files/Makefile
@@ -0,0 +1,78 @@
+JAVA=swt-gtk-$(RELEASE).jar
+LIBRARIES=libswt.so libswt-pi.so libswt-mozilla.so
+CLEANFILES=*.files *.jar *.so* *-stamp
+
+RELEASE=OE_SWT_RELEASE
+SONAME_VERSION=OE_SWT_API_VERSION
+
+GCJ=gcj
+JAR=gjar
+JAVAC=javac -classpath .
+LDCONFIG=/sbin/ldconfig
+LN_S=ln -s
+RM=rm -f
+
+GCJFLAGS=-O2 -fPIC -fjni -shared
+
+LINK=$(GCJ) $(GCJFLAGS) -o $@ -Wl,-soname=lib$*.so.$(SONAME_VERSION)
+
+# Build without Jars
+#all:
+# $(MAKE) -f make_linux.mak make_swt make_atk make_cairo
+
+# Build with Jars
+all: $(JAVA)
+ $(MAKE) -f make_linux.mak make_swt make_atk make_cairo
+
+# all: $(JAVA) $(LIBRARIES)
+# $(MAKE) -f make_linux.mak make_swt make_atk make_gnome make_mozilla
+
+clean distclean:
+ $(RM) $(CLEANFILES)
+ $(RM) -r swt swt-pi swt-mozilla
+ -$(MAKE) -f make_linux.mak clean
+
+.PHONY: all clean distclean
+
+swt.files:
+ find org -name *.java \
+ -not -path org/eclipse/swt/internal\* \
+ -not -path org/eclipse/swt/browser\* | sort > $@
+
+swt-mozilla.files:
+ find org/eclipse/swt/browser org/eclipse/swt/internal/mozilla \
+ -name *.java | sort > $@
+
+swt-pi.files:
+ find org/eclipse/swt/internal -name *.java \
+ -not -path org/eclipse/swt/internal/mozilla\* | sort > $@
+
+%-stamp: %.files
+ mkdir -p $*
+ for i in `cat $<`; do \
+ if [ -e $*/$${i%java}class ]; then \
+ echo SKIPPING $$i; \
+ else \
+ echo $(JAVAC) -d $* $$i; \
+ $(JAVAC) -d $* $$i || exit $$?; \
+ fi \
+ done
+ touch $@
+
+%.jar: %-stamp
+ $(JAR) -C $* -cf $@ .
+
+lib%.so.$(RELEASE): %.jar
+ $(LINK) $<
+ $(LDCONFIG) -n .
+
+%.so: %.so.$(RELEASE)
+ $(LN_S) -f $< $@
+
+swt-gtk-$(RELEASE).jar: swt.jar swt-pi.jar swt-mozilla.jar
+ mkdir _jar
+ cd _jar && for i in $^; do $(JAR) -xf ../$$i || exit $$?; done
+ $(JAR) -C _jar -cf $@ org
+ rm -rf _jar
+
+.SECONDARY:
diff --git a/packages/swt/files/swt-hildon.patch b/packages/swt/files/swt-hildon.patch
new file mode 100644
index 0000000000..728dd3070c
--- /dev/null
+++ b/packages/swt/files/swt-hildon.patch
@@ -0,0 +1,128 @@
+Index: swt-hildon/swt-source/make_linux.mak
+===================================================================
+--- swt-hildon.orig/swt-source/make_linux.mak 2008-01-08 09:35:29.000000000 +0100
++++ swt-hildon/swt-source/make_linux.mak 2008-01-08 11:35:01.000000000 +0100
+@@ -45,8 +45,8 @@
+ CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo
+
+ # Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0)
+-GTKCFLAGS = `pkg-config --cflags gtk+-2.0`
+-GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib $(XLIB64) -lXtst
++GTKCFLAGS = `pkg-config --cflags gtk+-2.0 hildon-1`
++GTKLIBS = -lhildon-1 `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` -lgtk-x11-2.0 -lgthread-2.0 -L/usr/X11R6/lib $(XLIB64) -lXtst
+
+ CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc
+
+@@ -74,8 +74,6 @@
+ -Wno-non-virtual-dtor \
+ -fPIC \
+ -I. \
+- -I$(JAVA_HOME)/include \
+- -I$(JAVA_HOME)/include/linux \
+ ${SWT_PTR_CFLAGS}
+ MOZILLALIBS = -shared -Wl,--version-script=mozilla_exports -Bsymbolic
+ MOZILLAEXCLUDES = -DNO_XPCOMGlueShutdown -DNO_XPCOMGlueStartup
+@@ -96,8 +94,6 @@
+ -DSWT_VERSION=$(SWT_VERSION) \
+ $(NATIVE_STATS) \
+ -DLINUX -DGTK \
+- -I$(JAVA_HOME)/include \
+- -I$(JAVA_HOME)/include/linux \
+ -fPIC \
+ ${SWT_PTR_CFLAGS}
+ LIBS = -shared -fPIC
+Index: swt-hildon/swt-source/os.c
+===================================================================
+--- swt-hildon.orig/swt-source/os.c 2008-01-08 09:35:29.000000000 +0100
++++ swt-hildon/swt-source/os.c 2008-01-08 09:37:00.000000000 +0100
+@@ -17,6 +17,9 @@
+ #include "os_structs.h"
+ #include "os_stats.h"
+
++#include <hildon/hildon-program.h>
++#include <hildon/hildon-window.h>
++
+ #define OS_NATIVE(func) Java_org_eclipse_swt_internal_gtk_OS_##func
+
+ #ifndef NO_Call
+@@ -7015,9 +7018,18 @@
+ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1container_1add)
+ (JNIEnv *env, jclass that, jint arg0, jint arg1)
+ {
++ GtkContainer *container = (GtkContainer *) arg0;
++ GtkWidget *widget = (GtkWidget *) arg1;
+ OS_NATIVE_ENTER(env, that, _1gtk_1container_1add_FUNC);
+- gtk_container_add((GtkContainer *)arg0, (GtkWidget *)arg1);
+- OS_NATIVE_EXIT(env, that, _1gtk_1container_1add_FUNC);
++ if (GTK_CHECK_TYPE (widget, GTK_TYPE_MENU)
++ && !strcmp(gtk_menu_get_title(GTK_MENU(widget)), "__main_menu__"))
++ {
++ hildon_window_set_menu(HILDON_WINDOW(container), GTK_MENU(widget));
++ }
++ else
++ gtk_container_add((GtkContainer *)arg0, (GtkWidget *)arg1);
++
++ OS_NATIVE_EXIT(env, that, _1gtk_1container_1add_FUNC);
+ }
+ #endif
+
+@@ -9121,9 +9133,12 @@
+ JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1menu_1bar_1new)
+ (JNIEnv *env, jclass that)
+ {
++ GtkWidget *menu;
+ jint rc = 0;
+ OS_NATIVE_ENTER(env, that, _1gtk_1menu_1bar_1new_FUNC);
+- rc = (jint)gtk_menu_bar_new();
++ menu = gtk_menu_new();
++ gtk_menu_set_title(menu, "__main_menu__");
++ rc = (jint) menu;
+ OS_NATIVE_EXIT(env, that, _1gtk_1menu_1bar_1new_FUNC);
+ return rc;
+ }
+@@ -15464,8 +15479,22 @@
+ (JNIEnv *env, jclass that, jint arg0)
+ {
+ jint rc = 0;
++ HildonProgram *p;
++ GtkWidget *w;
+ OS_NATIVE_ENTER(env, that, _1gtk_1window_1new_FUNC);
+- rc = (jint)gtk_window_new((GtkWindowType)arg0);
++/*
++ if (GTK_WINDOW_TOPLEVEL == (GtkWindowType) arg0)
++ {
++*/
++ p = hildon_program_get_instance();
++ w = hildon_window_new();
++ hildon_program_add_window(p, HILDON_WINDOW(w));
++/*
++ }
++ else
++ w = gtk_window_new(GTK_WINDOW_POPUP);
++*/
++ rc = (jint) w;
+ OS_NATIVE_EXIT(env, that, _1gtk_1window_1new_FUNC);
+ return rc;
+ }
+Index: swt-hildon/swt-source/org/eclipse/swt/widgets/Menu.java
+===================================================================
+--- swt-hildon.orig/swt-source/org/eclipse/swt/widgets/Menu.java 2008-01-08 09:34:55.000000000 +0100
++++ swt-hildon/swt-source/org/eclipse/swt/widgets/Menu.java 2008-01-08 09:36:01.000000000 +0100
+@@ -259,9 +259,17 @@
+ if ((style & SWT.BAR) != 0) {
+ handle = OS.gtk_menu_bar_new ();
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
++ if (parent instanceof Shell)
++ {
++ int /*long*/ shellHandle = ((Shell) parent).shellHandle;
++ OS.gtk_container_add (shellHandle, handle);
++ }
++ else
++ {
+ int /*long*/ vboxHandle = parent.vboxHandle;
+ OS.gtk_container_add (vboxHandle, handle);
+ OS.gtk_box_set_child_packing (vboxHandle, handle, false, true, 0, OS.GTK_PACK_START);
++ }
+ } else {
+ handle = OS.gtk_menu_new ();
+ if (handle == 0) error (SWT.ERROR_NO_HANDLES);
diff --git a/packages/swt/swt-gtk.inc b/packages/swt/swt-gtk.inc
new file mode 100644
index 0000000000..6afadf1cab
--- /dev/null
+++ b/packages/swt/swt-gtk.inc
@@ -0,0 +1,58 @@
+DESCRIPTION = "SWT is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities"
+LICENSE = "CPL MPL LGPL"
+
+inherit java-library
+
+DEPENDS = "cairo gtk+ atk libxtst"
+
+S = "${WORKDIR}/swt-source"
+
+# A number which is used by SWT to mark the shared libraries. It can be found
+# in the version.txt file inside the source directory.
+SWTVERSION = ${@bb.fatal('SWTVERSION is not defined in this swt-gtk recipe!')}
+SWT_API_VERSION = ${@bb.fatal('SWT_API_VERSION is not defined in this swt-gtk recipe!')}
+
+do_unpackpost() {
+ if [ ! -d ${S} ]; then
+ mkdir ${S}
+ cd ${S}
+ fi
+
+ unzip -o ../src.zip
+ cp ../Makefile .
+
+ sed -i -e "s|RELEASE=OE_SWT_RELEASE|RELEASE=${PV}|" Makefile
+ sed -i -e "s|SONAME_VERSION=OE_SWT_API_VERSION|SONAME_VERSION=${SWT_API_VERSION}|" Makefile
+}
+
+do_compile() {
+ oe_runmake NATIVE_STATS="-I${STAGING_INCDIR}/classpath"
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+do_install() {
+ oe_jarinstall swt-pi.jar
+ oe_jarinstall swt.jar
+ oe_jarinstall swt-gtk-${PV}.jar swt-gtk.jar
+
+ install -d ${D}${libdir_jni}
+ oe_libinstall -so libswt-atk-gtk-${SWTVERSION} ${D}/${libdir_jni}
+ oe_libinstall -so libswt-cairo-gtk-${SWTVERSION} ${D}/${libdir_jni}
+ oe_libinstall -so libswt-pi-gtk-${SWTVERSION} ${D}/${libdir_jni}
+ oe_libinstall -so libswt-gtk-${SWTVERSION} ${D}/${libdir_jni}
+}
+
+do_stage() {
+ oe_jarinstall -s swt-pi.jar
+ oe_jarinstall -s swt.jar
+ oe_jarinstall -s swt-gtk-${PV}.jar swt-gtk.jar
+}
+
+PACKAGES += "lib${PN}-jni"
+
+FILES_lib${PN}-jni = "${libdir_jni}/lib*.so*"
+
+RDEPENDS_${JPN} = "lib${PN}-jni"
+RPROVIDES_${JPN} = "libswt${SWT_API_VERSION}-gtk-java"
+
diff --git a/packages/swt/swt3.3-gtk_3.3.1.bb b/packages/swt/swt3.3-gtk_3.3.1.bb
new file mode 100644
index 0000000000..5b17853725
--- /dev/null
+++ b/packages/swt/swt3.3-gtk_3.3.1.bb
@@ -0,0 +1,10 @@
+require swt-gtk.inc
+
+SRC_URI = "http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/eclipse/downloads/drops/R-${PV}-200710231652/swt-${PV}-gtk-linux-x86.zip \
+ file://Makefile"
+
+# A number which is used by SWT to mark the shared libraries.
+SWTVERSION = "3347"
+SWT_API_VERSION = "3.3"
+
+RCONFLICTS = "libswt3.4-gtk-java"
diff --git a/packages/swt/swt3.4-gtk-hildon_3.3+3.4M3.bb b/packages/swt/swt3.4-gtk-hildon_3.3+3.4M3.bb
new file mode 100644
index 0000000000..628dcdd810
--- /dev/null
+++ b/packages/swt/swt3.4-gtk-hildon_3.3+3.4M3.bb
@@ -0,0 +1,7 @@
+require swt3.4-gtk_${PV}.bb
+
+PR = "r1"
+
+DEPENDS += "hildon-1"
+
+SRC_URI += "file://swt-hildon.patch;patch=1;pnum=2"
diff --git a/packages/swt/swt3.4-gtk_3.3+3.4M3.bb b/packages/swt/swt3.4-gtk_3.3+3.4M3.bb
new file mode 100644
index 0000000000..5d411f1be6
--- /dev/null
+++ b/packages/swt/swt3.4-gtk_3.3+3.4M3.bb
@@ -0,0 +1,12 @@
+require swt-gtk.inc
+
+SRC_URI = "http://ftp.wh2.tu-dresden.de/pub/mirrors/eclipse/eclipse/downloads/drops/S-3.4M3-200711012000/swt-3.4M3-gtk-linux-x86.zip \
+ file://Makefile"
+
+# A number which is used by SWT to mark the shared libraries.
+SWTVERSION = "3416"
+SWT_API_VERSION = "3.4"
+
+PROVIDES = "swt3.4-gtk"
+
+RCONFLICTS = "libswt3.3-gtk-java"