[oe] [PATCH 05/21] jlex: backport from openembedded-stable

heinold at inf.fu-berlin.de heinold at inf.fu-berlin.de
Wed Jul 21 14:06:56 UTC 2010


From: Henning Heinold <h.heinold at tarent.de>

* checksum is already in conf/checksums.ini
---
 recipes/jlex/files/jlex           |    5 ++++
 recipes/jlex/jlex-native_1.2.6.bb |   23 +++++++++++++++++++++
 recipes/jlex/jlex_1.2.6.bb        |   39 +++++++++++++++++++++++++++++++++++++
 3 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100755 recipes/jlex/files/jlex
 create mode 100644 recipes/jlex/jlex-native_1.2.6.bb
 create mode 100644 recipes/jlex/jlex_1.2.6.bb

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}"
-- 
1.7.0.4





More information about the Openembedded-devel mailing list