summaryrefslogtreecommitdiff
path: root/recipes/jlex/jlex_1.2.6.bb
blob: 05401df972acb03c7baf3aaf89f5d1afd619fee7 (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
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}"