summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--org.handhelds.familiar/classes/java.bbclass25
-rw-r--r--org.handhelds.familiar/packages/classpath/classpath-native_0.18.bb40
-rw-r--r--org.handhelds.familiar/packages/classpath/classpath-native_0.90.bb40
-rw-r--r--org.handhelds.familiar/packages/classpath/classpath_0.18.bb41
-rw-r--r--org.handhelds.familiar/packages/classpath/classpath_0.90.bb41
-rw-r--r--org.handhelds.familiar/packages/classpath/cp-tools-native_0.00-cvs20050701.bb31
-rw-r--r--org.handhelds.familiar/packages/classpath/cp-tools/bytecodejar-workaround.patch38
-rw-r--r--org.handhelds.familiar/packages/classpath/cp-tools/destdir.patch15
-rw-r--r--org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20020812.bb55
-rw-r--r--org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20050701.bb74
-rw-r--r--org.handhelds.familiar/packages/classpath/files/jikes-classpath.sh11
-rw-r--r--org.handhelds.familiar/packages/fastjar/fastjar-native_0.92+gcc3.4.4.bb36
-rw-r--r--org.handhelds.familiar/packages/jamvm/jamvm-native_1.3.3.bb25
-rw-r--r--org.handhelds.familiar/packages/jamvm/jamvm-native_1.4.2.bb25
-rw-r--r--org.handhelds.familiar/packages/jamvm/jamvm/debian-jni.patch19
-rw-r--r--org.handhelds.familiar/packages/jamvm/jamvm_1.3.3.bb10
-rw-r--r--org.handhelds.familiar/packages/jamvm/jamvm_1.4.2.bb10
-rw-r--r--org.handhelds.familiar/packages/java-wrappers/files/jar12
-rw-r--r--org.handhelds.familiar/packages/java-wrappers/files/java12
-rw-r--r--org.handhelds.familiar/packages/java-wrappers/files/javac12
-rw-r--r--org.handhelds.familiar/packages/java-wrappers/files/javadoc12
-rw-r--r--org.handhelds.familiar/packages/java-wrappers/files/javah12
-rw-r--r--org.handhelds.familiar/packages/java-wrappers/files/javap12
-rw-r--r--org.handhelds.familiar/packages/java-wrappers/java-wrappers-native_0.1.bb23
24 files changed, 619 insertions, 12 deletions
diff --git a/org.handhelds.familiar/classes/java.bbclass b/org.handhelds.familiar/classes/java.bbclass
new file mode 100644
index 0000000..71f50da
--- /dev/null
+++ b/org.handhelds.familiar/classes/java.bbclass
@@ -0,0 +1,25 @@
+# java.bbclass OE class file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+DEPENDS += "java-wrappers-native \
+ classpath \
+ fastjar-native \
+ jamvm-native \
+ jikes-native \
+ cp-tools-native \
+ zip-native"
+RDEPENDS += "classpath"
+
+export JAVA = "jamvm"
+export JAVAC = "jikes-classpath"
+export JAVAH = "javah-cp -classpath ."
+export JAVAP = "false"
+export JAR = "fastjar"
+export JAVADOC = "true"
+
+export CLASSPATH = ".:${STAGING_DATADIR}/classpath/glibj.zip"
+
+CFLAGS += "-I${STAGING_INCDIR}/classpath"
+
+EXTRA_OEMAKE += "-e JAVA='${JAVA}' JAVAC='${JAVAC}' JAVAH='${JAVAH}' JAR='${JAR}' JAVADOC='${JAVADOC}'"
diff --git a/org.handhelds.familiar/packages/classpath/classpath-native_0.18.bb b/org.handhelds.familiar/packages/classpath/classpath-native_0.18.bb
new file mode 100644
index 0000000..48d54bb
--- /dev/null
+++ b/org.handhelds.familiar/packages/classpath/classpath-native_0.18.bb
@@ -0,0 +1,40 @@
+# classpath-native OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+# NOTE: This is supposed to be used in conjunction with a VM (JamVM)
+# to run build tools only. Don't compile any target java code
+# against this!
+
+include classpath_${PV}.bb
+inherit native
+
+DEPENDS = "jikes-native zip-native"
+
+EXTRA_OECONF += "--disable-gtk-peer"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/classpath"
+S = "${WORKDIR}/classpath-${PV}"
+
+STAGE_TEMP="${WORKDIR}/temp-staging"
+
+do_stage() {
+ rm -rf ${STAGE_TEMP}
+ mkdir -p ${STAGE_TEMP}
+ make DESTDIR="${STAGE_TEMP}" install
+
+ # stage class library
+ mkdir -p ${STAGING_DATADIR}/classpath
+ for i in `find ${STAGE_TEMP} -name 'glibj.zip'`; do
+ install -m 0644 $i ${STAGING_DATADIR}/classpath
+ done
+
+ # stage JNI libraries
+ mkdir -p ${STAGING_LIBDIR}/classpath
+ for i in `find ${STAGE_TEMP} -name '*.so*'`; do
+ install -m 0644 $i ${STAGING_LIBDIR}/classpath
+ done
+
+ rm -rf ${STAGE_TEMP}
+}
+
diff --git a/org.handhelds.familiar/packages/classpath/classpath-native_0.90.bb b/org.handhelds.familiar/packages/classpath/classpath-native_0.90.bb
new file mode 100644
index 0000000..48d54bb
--- /dev/null
+++ b/org.handhelds.familiar/packages/classpath/classpath-native_0.90.bb
@@ -0,0 +1,40 @@
+# classpath-native OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+# NOTE: This is supposed to be used in conjunction with a VM (JamVM)
+# to run build tools only. Don't compile any target java code
+# against this!
+
+include classpath_${PV}.bb
+inherit native
+
+DEPENDS = "jikes-native zip-native"
+
+EXTRA_OECONF += "--disable-gtk-peer"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/classpath"
+S = "${WORKDIR}/classpath-${PV}"
+
+STAGE_TEMP="${WORKDIR}/temp-staging"
+
+do_stage() {
+ rm -rf ${STAGE_TEMP}
+ mkdir -p ${STAGE_TEMP}
+ make DESTDIR="${STAGE_TEMP}" install
+
+ # stage class library
+ mkdir -p ${STAGING_DATADIR}/classpath
+ for i in `find ${STAGE_TEMP} -name 'glibj.zip'`; do
+ install -m 0644 $i ${STAGING_DATADIR}/classpath
+ done
+
+ # stage JNI libraries
+ mkdir -p ${STAGING_LIBDIR}/classpath
+ for i in `find ${STAGE_TEMP} -name '*.so*'`; do
+ install -m 0644 $i ${STAGING_LIBDIR}/classpath
+ done
+
+ rm -rf ${STAGE_TEMP}
+}
+
diff --git a/org.handhelds.familiar/packages/classpath/classpath_0.18.bb b/org.handhelds.familiar/packages/classpath/classpath_0.18.bb
index 028e161..79bb1c9 100644
--- a/org.handhelds.familiar/packages/classpath/classpath_0.18.bb
+++ b/org.handhelds.familiar/packages/classpath/classpath_0.18.bb
@@ -1,32 +1,65 @@
+# classpath OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
DESCRIPTION = "GNU Classpath standard Java libraries"
HOMEPAGE = "http://www.gnu.org/software/classpath/"
LICENSE = "Classpath"
PRIORITY = "optional"
MAINTAINER = "Rene Wagner <rw@handhelds.org>"
SECTION = "libs"
+PR = "r2"
DEPENDS = "glib-2.0 gtk+ libart-lgpl pango xtst jikes-native zip-native"
RDEPENDS_${PN} = "${PN}-common (>= ${PV})"
+RDEPENDS_jikes-${PN} = "${PN} jikes"
-SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz \
- file://disable-automake-checks.patch;patch=1"
+SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz \
+ file://disable-automake-checks.patch;patch=1 \
+ file://jikes-classpath.sh"
inherit autotools
EXTRA_OECONF = "--with-jikes"
-PACKAGES += " ${PN}-common ${PN}-examples"
+PACKAGES += " ${PN}-common ${PN}-examples jikes-${PN}"
FILES_${PN} = "${libdir}/${PN}"
FILES_${PN}-common = "${datadir}/${PN}/glibj.zip"
FILES_${PN}-examples = "${datadir}/${PN}/examples"
+FILES_jikes-${PN} = "${bindir}"
do_stage() {
+ # stage JNI headers
install -d ${STAGING_INCDIR}/classpath
- install -m 0755 include/jni* ${STAGING_INCDIR}/classpath/
+ install -m 0644 include/jni* ${STAGING_INCDIR}/classpath/
+
+ # stage glibj.zip (containing all class files)
+ install -d ${STAGING_DATADIR}/classpath
+ install -m 0644 lib/glibj.zip ${STAGING_DATADIR}/classpath/
+
+ # stage jikes-classpath wrapper script
+ install -d ${STAGING_BINDIR}
+ # just to get the permissions right
+ install -m 0755 ${WORKDIR}/jikes-classpath.sh ${STAGING_BINDIR}/jikes-classpath
+ sed -e "s:DATADIR:${STAGING_DATADIR}:" ${WORKDIR}/jikes-classpath.sh > ${STAGING_BINDIR}/jikes-classpath
}
do_install() {
autotools_do_install
mv ${D}${libdir}/security ${D}${libdir}/${PN}
+
+ # install jikes-classpath wrapper script
+ install -d ${D}${bindir}
+ # just to get the permissions right
+ install -m 0755 ${WORKDIR}/jikes-classpath.sh ${D}${bindir}/jikes-classpath
+ sed -e "s:DATADIR:${datadir}:" ${WORKDIR}/jikes-classpath.sh > ${D}${bindir}/jikes-classpath
+}
+
+pkg_postinst_jikes-${PN} () {
+ update-alternatives --install ${bindir}/javac javac ${bindir}/jikes-${PN} 10
+}
+
+pkg_postrm_jikes-${PN} () {
+ update-alternatives --remove javac ${bindir}/jikes-${PN}
}
diff --git a/org.handhelds.familiar/packages/classpath/classpath_0.90.bb b/org.handhelds.familiar/packages/classpath/classpath_0.90.bb
index 4b4647f..9d8bfb9 100644
--- a/org.handhelds.familiar/packages/classpath/classpath_0.90.bb
+++ b/org.handhelds.familiar/packages/classpath/classpath_0.90.bb
@@ -1,32 +1,65 @@
+# classpath OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
DESCRIPTION = "GNU Classpath standard Java libraries"
HOMEPAGE = "http://www.gnu.org/software/classpath/"
LICENSE = "Classpath"
PRIORITY = "optional"
MAINTAINER = "Rene Wagner <rw@handhelds.org>"
SECTION = "libs"
+PR = "r1"
DEPENDS = "glib-2.0 gtk+ libart-lgpl pango xtst jikes-native zip-native"
RDEPENDS_${PN} = "${PN}-common (>= ${PV})"
+RDEPENDS_jikes-${PN} = "${PN} jikes"
-SRC_URI = "${GNU_MIRROR}/${PN}/${P}.tar.gz \
- file://disable-automake-checks.patch;patch=1"
+SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz \
+ file://disable-automake-checks.patch;patch=1 \
+ file://jikes-classpath.sh"
inherit autotools
EXTRA_OECONF = "--with-jikes --disable-alsa"
-PACKAGES += " ${PN}-common ${PN}-examples"
+PACKAGES += " ${PN}-common ${PN}-examples jikes-${PN}"
FILES_${PN} = "${libdir}/${PN}"
FILES_${PN}-common = "${datadir}/${PN}/glibj.zip"
FILES_${PN}-examples = "${datadir}/${PN}/examples"
+FILES_jikes-${PN} = "${bindir}"
do_stage() {
+ # stage JNI headers
install -d ${STAGING_INCDIR}/classpath
- install -m 0755 include/jni* ${STAGING_INCDIR}/classpath/
+ install -m 0644 include/jni* ${STAGING_INCDIR}/classpath/
+
+ # stage glibj.zip (containing all class files)
+ install -d ${STAGING_DATADIR}/classpath
+ install -m 0644 lib/glibj.zip ${STAGING_DATADIR}/classpath/
+
+ # stage jikes-classpath wrapper script
+ install -d ${STAGING_BINDIR}
+ # just to get the permissions right
+ install -m 0755 ${WORKDIR}/jikes-classpath.sh ${STAGING_BINDIR}/jikes-classpath
+ sed -e "s:DATADIR:${STAGING_DATADIR}:" ${WORKDIR}/jikes-classpath.sh > ${STAGING_BINDIR}/jikes-classpath
}
do_install() {
autotools_do_install
mv ${D}${libdir}/security ${D}${libdir}/${PN}
+
+ # install jikes-classpath wrapper script
+ install -d ${D}${bindir}
+ # just to get the permissions right
+ install -m 0755 ${WORKDIR}/jikes-classpath.sh ${D}${bindir}/jikes-classpath
+ sed -e "s:DATADIR:${datadir}:" ${WORKDIR}/jikes-classpath.sh > ${D}${bindir}/jikes-classpath
+}
+
+pkg_postinst_jikes-${PN} () {
+ update-alternatives --install ${bindir}/javac javac ${bindir}/jikes-${PN} 10
+}
+
+pkg_postrm_jikes-${PN} () {
+ update-alternatives --remove javac ${bindir}/jikes-${PN}
}
diff --git a/org.handhelds.familiar/packages/classpath/cp-tools-native_0.00-cvs20050701.bb b/org.handhelds.familiar/packages/classpath/cp-tools-native_0.00-cvs20050701.bb
new file mode 100644
index 0000000..29c7d63
--- /dev/null
+++ b/org.handhelds.familiar/packages/classpath/cp-tools-native_0.00-cvs20050701.bb
@@ -0,0 +1,31 @@
+# cp-tools-native OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+include cp-tools_${PV}.bb
+inherit native
+
+DEPENDS="autoconf-native automake-native libtool-native gnu-config-native quilt-native \
+ java-wrappers-native classpath fastjar-native jamvm-native jikes-native zip-native"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/cp-tools"
+
+do_stage() {
+
+ # stage jars
+ mkdir -p ${STAGING_DATADIR}/java
+
+ install -m 0644 cptools-0.00-cvs.jar ${STAGING_DATADIR}/java/cptools-${PV}.jar
+ (cd ${STAGING_DATADIR}/java && ln -sf cptools-${PV}.jar cptools-0.00-cvs.jar)
+ (cd ${STAGING_DATADIR}/java && ln -sf cptools-${PV}.jar cptools.jar)
+
+ install -m 0644 ${WORKDIR}/bytecode.jar ${STAGING_DATADIR}/java/
+
+ # stage wrapper scripts
+ mkdir -p ${STAGING_BINDIR}
+ for i in ${binprograms}; do
+ sed -e 's,java,java -cp .:${STAGING_DATADIR}/java/bytecode.jar:${STAGING_DATADIR}/java/cptools.jar,' bin/$i > bin/$i-cp
+ install -m 0755 bin/$i-cp ${STAGING_BINDIR}/$i-cp
+ done
+}
+
diff --git a/org.handhelds.familiar/packages/classpath/cp-tools/bytecodejar-workaround.patch b/org.handhelds.familiar/packages/classpath/cp-tools/bytecodejar-workaround.patch
new file mode 100644
index 0000000..f1336c2
--- /dev/null
+++ b/org.handhelds.familiar/packages/classpath/cp-tools/bytecodejar-workaround.patch
@@ -0,0 +1,38 @@
+--- cp-tools.orig/configure.ac 2005-10-01 19:26:32.000000000 +0200
++++ cp-tools/configure.ac 2005-10-01 19:34:12.000000000 +0200
+@@ -75,8 +75,21 @@
+ with_gnubytecode=yes
+ ]
+ )
++AC_ARG_WITH([gnu-bytecode-jar],
++ [AS_HELP_STRING(--with-gnu-bytecode-jar,where to look for the gnu.bytecode.jar [[default=search]])],
++ [
++ if test "x${withval}" != xno; then
++ with_gnubytecodejar=${withval}
++ else
++ with_gnubytecodejar=no
++ fi
++ ],
++ [
++ with_gnubytecodejar=no
++ ]
++)
+ AM_CONDITIONAL(USE_GNUBYTECODE, test "x${with_gnubytecode}" = xyes)
+-if test "x${with_gnubytecode}" = xyes
++if test "x${with_gnubytecode}" = xyes -a "x${with_gnubytecodejar}" = xno
+ then
+ for path in /usr /usr/local; do
+ AC_CHECK_FILE([$path/share/java/bytecode.jar],
+@@ -88,6 +101,12 @@
+ test -d src || mkdir src
+ test -d src/jars || mkdir src/jars
+ cp -f ${BYTECODE_JAR} src/jars/
++else
++ BYTECODE_JAR=$with_gnubytecodejar
++ export BYTECODE_JAR
++ test -d src || mkdir src
++ test -d src/jars || mkdir src/jars
++ cp -f ${BYTECODE_JAR} src/jars/
+ fi
+
+ dnl
diff --git a/org.handhelds.familiar/packages/classpath/cp-tools/destdir.patch b/org.handhelds.familiar/packages/classpath/cp-tools/destdir.patch
new file mode 100644
index 0000000..d4740e2
--- /dev/null
+++ b/org.handhelds.familiar/packages/classpath/cp-tools/destdir.patch
@@ -0,0 +1,15 @@
+--- cp-tools/Makefile.am.orig 2005-10-01 20:34:45.000000000 +0200
++++ cp-tools/Makefile.am 2005-10-01 20:36:28.000000000 +0200
+@@ -187,9 +187,9 @@
+ cp $(srcdir)/bin/serialver $(distdir)/bin/
+
+ install-data-hook:
+- $(INSTALL) -d $(datadir)/java
+- $(INSTALL) --mode 644 $(data_JARS) $(datadir)/java
+- $(LN_S) -f $(datadir)/java/cptools-$(VERSION).jar $(datadir)/java/cptools.jar
++ $(INSTALL) -d $(DESTDIR)$(datadir)/java
++ $(INSTALL) --mode 644 $(data_JARS) $(DESTDIR)$(datadir)/java
++ $(LN_S) -f $(DESTDIR)$(datadir)/java/cptools-$(VERSION).jar $(DESTDIR)$(datadir)/java/cptools.jar
+
+ test: tests/%.class $(srcdir)/src/test/%.java
+ $(JAVAC) -g -d tests $<
diff --git a/org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20020812.bb b/org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20020812.bb
new file mode 100644
index 0000000..92c48c7
--- /dev/null
+++ b/org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20020812.bb
@@ -0,0 +1,55 @@
+# cp-tools OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+DESCRIPTION = "GNU Classpath tools (javah, javap, etc.)"
+HOMEPAGE = "http://www.gnu.org/software/classpath/cp-tools/"
+LICENSE = "GPLv2"
+PRIORITY = "optional"
+MAINTAINER = "Rene Wagner <rw@handhelds.org>"
+SECTION = "utils"
+
+inherit java
+
+FIXEDCVSDATE = "${@bb.data.getVar('PV', d, 1).split('cvs')[-1]}"
+SRC_URI = "cvs://anoncvs@savannah.gnu.org/cvsroot/classpath;module=cp-tools;method=ext;date=${FIXEDCVSDATE}"
+S = "${WORKDIR}/cp-tools"
+
+# bypassing the original build system. only compiling pure java code.
+do_configure () {
+ true
+}
+
+do_compile () {
+ echo $JAVAC `find . -name '*.java' | grep -v tools/rmi`
+ $JAVAC -cp . `find . -name '*.java'`
+ echo $JAR cfm ../cp-tools.jar `find . -name '*.class'`
+ $JAR cfm ../cp-tools.jar `find . -name '*.class'`
+}
+
+do_install () {
+ install -d ${D}${datadir}
+ install -d ${D}${datadir}/java
+
+ install -m 0644 cp-tools.jar ${D}${datadir}/java/cp-tools-${PV}.jar
+ (cd ${D}${datadir}/java && ln -sf cp-tools-${PV}.jar cp-tools.jar)
+
+ install -d ${D}${bindir}
+ for i in javah javap serialver; do
+ sed -e 's:java:java -cp ${datadir}/java/cp-tools.jar:' bin/$i > bin/$i-cp
+ install -m 0755 bin/$i-cp ${D}${bindir}/$i-cp
+ done
+}
+
+pkg_portinst () {
+ for i in javah javap serialver; do
+ update-alternatives --install ${bindir}/$i $i ${bindir}/$i-cp 350
+ done
+}
+
+pkg_postrm_append () {
+ for i in javah javap serialver; do
+ update-alternatives --remove $i ${bindir}/$i-cp
+ done
+}
+
diff --git a/org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20050701.bb b/org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20050701.bb
new file mode 100644
index 0000000..4af1145
--- /dev/null
+++ b/org.handhelds.familiar/packages/classpath/cp-tools_0.00-cvs20050701.bb
@@ -0,0 +1,74 @@
+# cp-tools OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+DESCRIPTION = "GNU Classpath tools (javah, javap, etc.)"
+HOMEPAGE = "http://www.gnu.org/software/classpath/cp-tools/"
+LICENSE = "GPLv2"
+PRIORITY = "optional"
+MAINTAINER = "Rene Wagner <rw@handhelds.org>"
+SECTION = "utils"
+
+inherit autotools java
+
+FIXEDCVSDATE = "${@bb.data.getVar('PV', d, 1).split('cvs')[-1]}"
+SRC_URI = "cvs://anonymous@cvs.sv.gnu.org/cvsroot/classpath;module=cp-tools;date=${FIXEDCVSDATE} \
+ file://bytecodejar-workaround.patch;patch=1 \
+ file://destdir.patch;patch=1 \
+ ${GNU_MIRROR}/kawa/kawa-1.7.tar.gz"
+S = "${WORKDIR}/cp-tools"
+
+export CLASSPATH = ".:${STAGING_DATADIR}/classpath/glibj.zip:${WORKDIR}/bytecode.jar"
+
+EXTRA_OECONF = "--disable-native --with-gnu-bytecode-jar=${WORKDIR}/bytecode.jar"
+
+FILES_${PN} += "${datadir}/java"
+
+do_configure () {
+ cd ${WORKDIR}/kawa-1.7
+ javac gnu/bytecode/*.java
+ zip bytecode.jar gnu/bytecode/*.class || die
+ mv bytecode.jar ..
+
+ cd ${S}
+ autotools_do_configure
+}
+
+binprograms="currencygen \
+ javah \
+ javap \
+ localegen \
+ native2ascii \
+ rmic \
+ rmiregistry \
+ serialver"
+
+do_install () {
+ install -d ${D}${datadir}
+ install -d ${D}${datadir}/java
+
+ install -m 0644 cptools-0.00-cvs.jar ${D}${datadir}/java/cptools-${PV}.jar
+ (cd ${D}${datadir}/java && ln -sf cptools-${PV}.jar cptools-0.00-cvs.jar)
+ (cd ${D}${datadir}/java && ln -sf cptools-${PV}.jar cptools.jar)
+
+ install -m 0644 ${WORKDIR}/bytecode.jar ${D}${datadir}/java/
+
+ install -d ${D}${bindir}
+ for i in ${binprograms}; do
+ sed -e 's,java,java -cp .:${datadir}/java/bytecode.jar:${datadir}/java/cptools.jar,' bin/$i > bin/$i-cp
+ install -m 0755 bin/$i-cp ${D}${bindir}/$i-cp
+ done
+}
+
+pkg_postinst () {
+ for i in ${binprograms}; do
+ update-alternatives --install ${bindir}/$i $i ${bindir}/$i-cp 350
+ done
+}
+
+pkg_postrm_append () {
+ for i in ${binprograms}; do
+ update-alternatives --remove $i ${bindir}/$i-cp
+ done
+}
+
diff --git a/org.handhelds.familiar/packages/classpath/files/jikes-classpath.sh b/org.handhelds.familiar/packages/classpath/files/jikes-classpath.sh
new file mode 100644
index 0000000..b27f53c
--- /dev/null
+++ b/org.handhelds.familiar/packages/classpath/files/jikes-classpath.sh
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+if [ -r DATADIR/classpath/glibj.zip ]; then
+ jikes -bootclasspath DATADIR/classpath/glibj.zip "$@"
+else
+ echo
+ echo "----------- ERROR -----------"
+ echo "Cannot find/read classpath classes. Please report."
+ echo
+ exit 1
+fi
diff --git a/org.handhelds.familiar/packages/fastjar/fastjar-native_0.92+gcc3.4.4.bb b/org.handhelds.familiar/packages/fastjar/fastjar-native_0.92+gcc3.4.4.bb
new file mode 100644
index 0000000..7f584b6
--- /dev/null
+++ b/org.handhelds.familiar/packages/fastjar/fastjar-native_0.92+gcc3.4.4.bb
@@ -0,0 +1,36 @@
+# fastjar-native OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+DESCRIPTION = "jar replacement written in C."
+HOMEPAGE = "http://sourceforge.net/projects/fastjar/"
+SECTION = "devel"
+PRIORITY = "optional"
+LICENSE = "GPL"
+MAINTAINER = "Rene Wagner <rw@handhelds.org>"
+
+DEPENDS = "zlib"
+
+GCC_VER = "${@bb.data.getVar('PV',d,1).split('gcc')[1]}"
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${GCC_VER}/gcc-${GCC_VER}.tar.bz2"
+
+S = "${WORKDIR}/gcc-${GCC_VER}"
+
+inherit autotools native
+
+EXTRA_OECONF = "--with-system-zlib --with-fastjar"
+
+do_configure () {
+ gnu-configize || die "failure running gnu-configize"
+ oe_runconf
+}
+
+do_compile() {
+ oe_runmake maybe-all-fastjar
+}
+
+do_stage() {
+ install -d ${STAGING_BINDIR}
+ install -m 755 fastjar/jar ${STAGING_BINDIR}/fastjar
+ install -m 755 fastjar/grepjar ${STAGING_BINDIR}
+}
diff --git a/org.handhelds.familiar/packages/jamvm/jamvm-native_1.3.3.bb b/org.handhelds.familiar/packages/jamvm/jamvm-native_1.3.3.bb
new file mode 100644
index 0000000..f972c9e
--- /dev/null
+++ b/org.handhelds.familiar/packages/jamvm/jamvm-native_1.3.3.bb
@@ -0,0 +1,25 @@
+# jamvm-native OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+include jamvm_${PV}.bb
+inherit native
+
+DEPENDS = "classpath-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz"
+
+prefix = "${STAGING_DIR}/${HOST_SYS}"
+EXTRA_OECONF = "--with-classpath-install-dir=${STAGING_DIR}/${HOST_SYS}"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/jamvm"
+S = "${WORKDIR}/jamvm-${PV}"
+
+do_stage() {
+ mkdir -p ${STAGING_BINDIR}
+ install -m 0755 src/jamvm ${STAGING_BINDIR}/
+
+ mkdir -p ${STAGING_DATADIR}/jamvm
+ install -m 0644 lib/inst_classes.zip ${STAGING_DATADIR}/jamvm/classes.zip
+}
+
diff --git a/org.handhelds.familiar/packages/jamvm/jamvm-native_1.4.2.bb b/org.handhelds.familiar/packages/jamvm/jamvm-native_1.4.2.bb
new file mode 100644
index 0000000..f972c9e
--- /dev/null
+++ b/org.handhelds.familiar/packages/jamvm/jamvm-native_1.4.2.bb
@@ -0,0 +1,25 @@
+# jamvm-native OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+include jamvm_${PV}.bb
+inherit native
+
+DEPENDS = "classpath-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz"
+
+prefix = "${STAGING_DIR}/${HOST_SYS}"
+EXTRA_OECONF = "--with-classpath-install-dir=${STAGING_DIR}/${HOST_SYS}"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/jamvm"
+S = "${WORKDIR}/jamvm-${PV}"
+
+do_stage() {
+ mkdir -p ${STAGING_BINDIR}
+ install -m 0755 src/jamvm ${STAGING_BINDIR}/
+
+ mkdir -p ${STAGING_DATADIR}/jamvm
+ install -m 0644 lib/inst_classes.zip ${STAGING_DATADIR}/jamvm/classes.zip
+}
+
diff --git a/org.handhelds.familiar/packages/jamvm/jamvm/debian-jni.patch b/org.handhelds.familiar/packages/jamvm/jamvm/debian-jni.patch
new file mode 100644
index 0000000..ac39cb3
--- /dev/null
+++ b/org.handhelds.familiar/packages/jamvm/jamvm/debian-jni.patch
@@ -0,0 +1,19 @@
+--- jamvm/src/dll.c.orig 2004-09-09 15:48:45.000000000 +0000
++++ jamvm/src/dll.c 2004-09-09 15:50:32.000000000 +0000
+@@ -189,6 +189,16 @@
+ #ifndef NO_JNI
+ /* Init hash table, and create lock */
+ initHashTable(hash_table, HASHTABSZE, TRUE);
++
++ /* XXX: Add Debian JNI directory and /usr/lib. */
++ char* path = getenv("LD_LIBRARY_PATH");
++
++ if (path != NULL)
++ path = strcat(path, ":/usr/lib:/usr/lib/jni");
++ else
++ path = "/usr/lib:/usr/lib/jni";
++
++ setenv("LD_LIBRARY_PATH", path, 1);
+ #endif
+ }
+
diff --git a/org.handhelds.familiar/packages/jamvm/jamvm_1.3.3.bb b/org.handhelds.familiar/packages/jamvm/jamvm_1.3.3.bb
index 2e5d4a4..cb7590a 100644
--- a/org.handhelds.familiar/packages/jamvm/jamvm_1.3.3.bb
+++ b/org.handhelds.familiar/packages/jamvm/jamvm_1.3.3.bb
@@ -1,15 +1,21 @@
+# jamvm OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
HOMEPAGE = "http://jamvm.sourceforge.net/"
LICENSE = "GPL"
PRIORITY = "optional"
MAINTAINER = "Rene Wagner <rw@handhelds.org>"
SECTION = "interpreters"
+PR = "r1"
DEPENDS = "zlib classpath"
RDEPENDS = "classpath (>= 0.18) classpath-common (>= 0.18)"
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz \
- file://jamvm-1.3.1-size-defaults.patch;patch=1"
+SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \
+ file://jamvm-1.3.1-size-defaults.patch;patch=1 \
+ file://debian-jni.patch;patch=1"
inherit autotools update-alternatives
diff --git a/org.handhelds.familiar/packages/jamvm/jamvm_1.4.2.bb b/org.handhelds.familiar/packages/jamvm/jamvm_1.4.2.bb
index d8024e8..7897af1 100644
--- a/org.handhelds.familiar/packages/jamvm/jamvm_1.4.2.bb
+++ b/org.handhelds.familiar/packages/jamvm/jamvm_1.4.2.bb
@@ -1,15 +1,21 @@
+# jamvm OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
HOMEPAGE = "http://jamvm.sourceforge.net/"
LICENSE = "GPL"
PRIORITY = "optional"
MAINTAINER = "Rene Wagner <rw@handhelds.org>"
SECTION = "interpreters"
+PR = "r1"
DEPENDS = "zlib classpath"
RDEPENDS = "classpath (>= 0.20) classpath-common (>= 0.20)"
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz \
- file://jamvm-1.3.1-size-defaults.patch;patch=1"
+SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \
+ file://jamvm-1.3.1-size-defaults.patch;patch=1 \
+ file://debian-jni.patch;patch=1"
# This uses 32 bit arm, so force the instruction set to arm, not thumb
ARM_INSTRUCTION_SET = "arm"
diff --git a/org.handhelds.familiar/packages/java-wrappers/files/jar b/org.handhelds.familiar/packages/java-wrappers/files/jar
new file mode 100644
index 0000000..f6e0966
--- /dev/null
+++ b/org.handhelds.familiar/packages/java-wrappers/files/jar
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# jar OE wrapper script
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+if [ -z ${JAR} ]; then
+ echo 'Error: $JAR not set.'
+ exit 1
+fi
+
+exec ${JAR} $@
diff --git a/org.handhelds.familiar/packages/java-wrappers/files/java b/org.handhelds.familiar/packages/java-wrappers/files/java
new file mode 100644
index 0000000..9d64b49
--- /dev/null
+++ b/org.handhelds.familiar/packages/java-wrappers/files/java
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# java OE wrapper script
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+if [ -z ${JAVA} ]; then
+ echo 'Error: $JAVA not set.'
+ exit 1
+fi
+
+exec ${JAVA} $@
diff --git a/org.handhelds.familiar/packages/java-wrappers/files/javac b/org.handhelds.familiar/packages/java-wrappers/files/javac
new file mode 100644
index 0000000..43db512
--- /dev/null
+++ b/org.handhelds.familiar/packages/java-wrappers/files/javac
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# javac OE wrapper script
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+if [ -z ${JAVAC} ]; then
+ echo 'Error: $JAVAC not set.'
+ exit 1
+fi
+
+exec ${JAVAC} $@
diff --git a/org.handhelds.familiar/packages/java-wrappers/files/javadoc b/org.handhelds.familiar/packages/java-wrappers/files/javadoc
new file mode 100644
index 0000000..7d0e20d
--- /dev/null
+++ b/org.handhelds.familiar/packages/java-wrappers/files/javadoc
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# javadoc OE wrapper script
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+if [ -z ${JAVADOC} ]; then
+ echo 'Error: $JAVADOC not set.'
+ exit 1
+fi
+
+exec ${JAVADOC} $@
diff --git a/org.handhelds.familiar/packages/java-wrappers/files/javah b/org.handhelds.familiar/packages/java-wrappers/files/javah
new file mode 100644
index 0000000..046bee8
--- /dev/null
+++ b/org.handhelds.familiar/packages/java-wrappers/files/javah
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# javah OE wrapper script
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+if [ -z ${JAVAH} ]; then
+ echo 'Error: $JAVAH not set.'
+ exit 1
+fi
+
+exec ${JAVAH} $@
diff --git a/org.handhelds.familiar/packages/java-wrappers/files/javap b/org.handhelds.familiar/packages/java-wrappers/files/javap
new file mode 100644
index 0000000..d87991e
--- /dev/null
+++ b/org.handhelds.familiar/packages/java-wrappers/files/javap
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# javap OE wrapper script
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+if [ -z ${JAVAP} ]; then
+ echo 'Error: $JAVAP not set.'
+ exit 1
+fi
+
+exec ${JAVAP} $@
diff --git a/org.handhelds.familiar/packages/java-wrappers/java-wrappers-native_0.1.bb b/org.handhelds.familiar/packages/java-wrappers/java-wrappers-native_0.1.bb
new file mode 100644
index 0000000..23f474f
--- /dev/null
+++ b/org.handhelds.familiar/packages/java-wrappers/java-wrappers-native_0.1.bb
@@ -0,0 +1,23 @@
+# java-wrappers-native OE build file
+# Copyright (C) 2006, Rene Wagner. All Rights Reserved
+# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
+
+DESCRIPTION = "Wrapper scripts to select Java related tools by environment variables"
+LICENSE = "GPL"
+MAINTAINER = "Rene Wagner <rw@handhelds.org>"
+
+inherit native
+
+SRC_URI = "file://java \
+ file://javac \
+ file://javah \
+ file://javap \
+ file://jar \
+ file://javadoc"
+
+do_stage () {
+ install -d ${STAGING_BINDIR}
+ for i in java javac javah javap jar javadoc; do
+ install -m 0755 ${WORKDIR}/$i ${STAGING_BINDIR}/
+ done
+}