diff options
author | Robert Schuster <robertschuster@fsfe.org> | 2009-09-18 13:42:32 +0200 |
---|---|---|
committer | Robert Schuster <robertschuster@fsfe.org> | 2009-09-18 13:42:32 +0200 |
commit | d9fef0c7c9c064337223f847af28b6da4a180ced (patch) | |
tree | cd496b78261c03e7ab1dbdfbe28113d38c7d088a /recipes/cup | |
parent | e815e80bdf71c0c4cf0469d0b362be6dfe37e075 (diff) |
cup 0.10k: New recipe (from Jalimo SVN).
cup-native 0.10k: Dito.
Diffstat (limited to 'recipes/cup')
-rw-r--r-- | recipes/cup/cup-native_0.10k.bb | 24 | ||||
-rw-r--r-- | recipes/cup/cup_0.10k.bb | 39 | ||||
-rwxr-xr-x | recipes/cup/files/cup | 5 |
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 0000000000..2eb325fe1a --- /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 0000000000..09d9644f74 --- /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 0000000000..34b4f05956 --- /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 "$@" |