aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Heinold <h.heinold@tarent.de>2010-07-12 14:58:25 +0200
committerHenning Heinold <h.heinold@tarent.de>2010-07-26 15:34:20 +0200
commit43e925242a52a1b67339c4f717f4cc6b3bfdbdf0 (patch)
tree5e5f740b325e4531ff660d60bc51ee006a161ad0
parent9f3c5e8bfa78da10433c4a8ea8de899a8c5a9400 (diff)
downloadopenembedded-43e925242a52a1b67339c4f717f4cc6b3bfdbdf0.zip
openembedded-43e925242a52a1b67339c4f717f4cc6b3bfdbdf0.tar.gz
openembedded-43e925242a52a1b67339c4f717f4cc6b3bfdbdf0.tar.bz2
jlex: backport from openembedded-stable
* checksum is already in conf/checksums.ini Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
-rwxr-xr-xrecipes/jlex/files/jlex5
-rw-r--r--recipes/jlex/jlex-native_1.2.6.bb23
-rw-r--r--recipes/jlex/jlex_1.2.6.bb39
3 files changed, 67 insertions, 0 deletions
diff --git a/recipes/jlex/files/jlex b/recipes/jlex/files/jlex
new file mode 100755
index 0000000..7a9e756
--- /dev/null
+++ b/recipes/jlex/files/jlex
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cp=OE_STAGING_DATADIR_JAVA/OE_JLEX_JAR
+
+exec OE_STAGING_BINDIR/java -cp $cp JLex.Main "$@"
diff --git a/recipes/jlex/jlex-native_1.2.6.bb b/recipes/jlex/jlex-native_1.2.6.bb
new file mode 100644
index 0000000..6f8194b
--- /dev/null
+++ b/recipes/jlex/jlex-native_1.2.6.bb
@@ -0,0 +1,23 @@
+require jlex_${PV}.bb
+
+inherit java-native
+
+DEPENDS += "virtual/java-native"
+RDEPENDS = ""
+
+do_configure() {
+ sed -i \
+ -e "s|OE_STAGING_BINDIR|${STAGING_BINDIR_NATIVE}|" \
+ -e "s|OE_STAGING_DATADIR_JAVA|${STAGING_DATADIR_JAVA_NATIVE}|" \
+ -e "s|OE_JLEX_JAR|${BP}.jar|" \
+ ${WORKDIR}/jlex
+}
+
+do_install_append() {
+ :
+}
+
+do_stage_append() {
+ install -d ${STAGING_BINDIR}
+ install -m 0755 jlex ${STAGING_BINDIR}
+}
diff --git a/recipes/jlex/jlex_1.2.6.bb b/recipes/jlex/jlex_1.2.6.bb
new file mode 100644
index 0000000..05401df
--- /dev/null
+++ b/recipes/jlex/jlex_1.2.6.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Lexical analyzer generator for Java"
+AUTHOR = "Elliot Berk, A. Appel, C. Scott Ananian"
+
+DEPENDS = "fastjar-native"
+RDEPENDS = "java2-runtime"
+
+inherit java-library
+
+SRC_URI = "\
+ http://www.cs.princeton.edu/~appel/modern/java/JLex/Archive/${PV}/Main.java \
+ file://jlex \
+ "
+
+S = "${WORKDIR}"
+
+do_configure() {
+ sed -i \
+ -e "s|OE_STAGING_BINDIR|${bindir}|" \
+ -e "s|OE_STAGING_DATADIR_JAVA|${datadir_java}|" \
+ -e "s|OE_JLEX_JAR|${BP}.jar|" \
+ ${WORKDIR}/jlex
+}
+
+do_compile() {
+ mkdir -p build
+
+ javac -d build Main.java
+
+ fastjar -C build -c -f ${BP}.jar .
+}
+
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 jlex ${D}${bindir}/
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} += "${datadir_java}"