aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Heinold <h.heinold@tarent.de>2010-07-12 15:08:47 +0200
committerHenning Heinold <h.heinold@tarent.de>2010-07-26 15:34:20 +0200
commitc74403b2bf14e3573840805139fb1b6b4071a6ae (patch)
treec1eb0c6fee8acd1b0ff9c9bdd8f7a41ea5b467e4
parent43e925242a52a1b67339c4f717f4cc6b3bfdbdf0 (diff)
downloadopenembedded-c74403b2bf14e3573840805139fb1b6b4071a6ae.zip
openembedded-c74403b2bf14e3573840805139fb1b6b4071a6ae.tar.gz
openembedded-c74403b2bf14e3573840805139fb1b6b4071a6ae.tar.bz2
cup: backport from openembedded-dev
* checksum is already in conf/checksums.ini Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
-rw-r--r--recipes/cup/cup-native_0.10k.bb24
-rw-r--r--recipes/cup/cup_0.10k.bb39
-rwxr-xr-xrecipes/cup/files/cup5
3 files changed, 68 insertions, 0 deletions
diff --git a/recipes/cup/cup-native_0.10k.bb b/recipes/cup/cup-native_0.10k.bb
new file mode 100644
index 0000000..2eb325f
--- /dev/null
+++ b/recipes/cup/cup-native_0.10k.bb
@@ -0,0 +1,24 @@
+require cup_${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_CUP_JAR|${BP}.jar|" \
+ ${WORKDIR}/cup
+}
+
+do_install_append() {
+ :
+}
+
+do_stage_append() {
+ install -d ${STAGING_BINDIR}
+ install -m 0755 ${WORKDIR}/cup ${STAGING_BINDIR}
+}
+
diff --git a/recipes/cup/cup_0.10k.bb b/recipes/cup/cup_0.10k.bb
new file mode 100644
index 0000000..09d9644
--- /dev/null
+++ b/recipes/cup/cup_0.10k.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Lexical analyzer generator for Java"
+AUTHOR = "Elliot Berk, A. Appel, C. Scott Ananian"
+
+DEPENDS = "virtual/javac-native fastjar-native"
+RDEPENDS = "java2-runtime"
+
+inherit java-library
+
+SRC_URI = "\
+ http://www.cs.princeton.edu/~appel/modern/java/CUP/java_${BPN}_v10k.tar.gz \
+ file://cup \
+ "
+
+S = "${WORKDIR}/java_cup"
+
+do_configure() {
+ sed -i \
+ -e "s|OE_STAGING_BINDIR|${bindir}|" \
+ -e "s|OE_STAGING_DATADIR_JAVA|${data_java}|" \
+ -e "s|OE_CUP_JAR|${BP}.jar|" \
+ ${WORKDIR}/cup
+}
+
+do_compile() {
+ mkdir -p build
+
+ javac -d build `find . -name "*.java"`
+
+ fastjar -C build -c -f ${BP}.jar .
+}
+
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/cup ${D}${bindir}
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} += "${datadir_java}"
diff --git a/recipes/cup/files/cup b/recipes/cup/files/cup
new file mode 100755
index 0000000..34b4f05
--- /dev/null
+++ b/recipes/cup/files/cup
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cp=OE_STAGING_DATADIR_JAVA/OE_CUP_JAR
+
+exec OE_STAGING_BINDIR/java -cp $cp java_cup.Main "$@"