summaryrefslogtreecommitdiffstats
path: root/recipes-core/cup/cup_0.10k.bb
blob: ce814538f9045f2e99114d807d8225bffa9f03ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
SUMMARY = "Lexical analyzer generator for Java"
AUTHOR = "Elliot Berk, A. Appel, C. Scott Ananian"
LICENSE = "CUP"
LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=2c9db91c00f38e52cfc8e67bafaa7c33"


RDEPENDS:${PN} = "java2-runtime"
RDEPENDS:${PN}:class-native = ""
PACKAGE_ARCH = "${TUNE_PKGARCH}"

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 cf ${BP}.jar -C build .
}

do_install:append() {
	install -d ${D}${bindir}
	install -m 0755 ${WORKDIR}/cup ${D}${bindir}
}

PACKAGES = "${PN}"

FILES:${PN} += "${datadir_java}"

SRC_URI[md5sum] = "8b11edfec13c590ea443d0f0ae0da479"
SRC_URI[sha256sum] = "7e6dc5be74ae56c7e86e69ad0ad88dae3b2847afa9e73a76635918a6b1eb75cd"

BBCLASSEXTEND = "native"