summaryrefslogtreecommitdiff
path: root/recipes/junit/junit_3.8.2.bb
blob: 2ba54b63a7f4ff6b4ee790a554a854ef9f5415c9 (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
DESCRIPTION = "JUnit is a testing framework for Java"
LICENSES = "CPL"
AUTHOR = "junit.org"
HOMEPAGE = "http://www.junit.org"

SRC_URI = "http://downloads.sourceforge.net/junit/junit${PV}.zip"

S = "${WORKDIR}/junit${PV}"

inherit java-library

DEPENDS = "fastjar-native"

do_unpackpost() {
	mkdir -p src

	# Prevent deletion by do_removebinaries.
	mv src.jar src.zip

	unzip src.zip -d src
}

addtask unpackpost before do_removebinaries after do_unpack

do_compile() {
  mkdir -p build

	# Workaround for jamvm.
	bcp=${STAGING_DATADIR_NATIVE}/classpath/glibj.zip

  javac -bootclasspath $bcp -sourcepath src -d build `find src -name "*.java"`

  fastjar -C build -c -f ${JARFILENAME} .
}