summaryrefslogtreecommitdiffstats
path: root/recipes-core/junit
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-05-24 13:46:43 -0700
committerHenning Heinold <heinold@inf.fu-berlin.de>2013-09-29 21:51:08 +0200
commit311b292972533ab5be8f21dcd527db44afa4954a (patch)
treeed2581b9c8797bc2c48a64e6009c9b642aaecd8b /recipes-core/junit
parent9406a34197e0d116bdfcf451f90112b67796455c (diff)
downloadmeta-java-311b292972533ab5be8f21dcd527db44afa4954a.tar.gz
junit: Fix build when rebuilding from same tree
use -o option to unzip to overwrite the classes it fails otherwise when unpack build step is reexecuted again There is no need to specify bootclasspath now Add unzip-native to dependency Fix fastjar commandline order Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-core/junit')
-rw-r--r--recipes-core/junit/junit_3.8.2.bb11
1 files changed, 6 insertions, 5 deletions
diff --git a/recipes-core/junit/junit_3.8.2.bb b/recipes-core/junit/junit_3.8.2.bb
index f92440f..bae022d 100644
--- a/recipes-core/junit/junit_3.8.2.bb
+++ b/recipes-core/junit/junit_3.8.2.bb
@@ -9,16 +9,17 @@ SRC_URI = "http://downloads.sourceforge.net/junit/junit${PV}.zip"
9 9
10S = "${WORKDIR}/junit${PV}" 10S = "${WORKDIR}/junit${PV}"
11 11
12DEPENDS += "unzip-native"
13
12inherit java-library 14inherit java-library
13 15
14do_unpackpost() { 16do_unpackpost() {
15 mkdir -p src 17 mkdir -p src
16
17 # Prevent deletion by do_removebinaries. 18 # Prevent deletion by do_removebinaries.
18 if [ -e src.jar ]; then 19 if [ -e src.jar ]; then
19 mv src.jar src.zip 20 mv src.jar src.zip
20 fi 21 fi
21 unzip src.zip -d src 22 unzip -o src.zip -d src
22} 23}
23 24
24addtask unpackpost before do_removebinaries after do_unpack 25addtask unpackpost before do_removebinaries after do_unpack
@@ -27,11 +28,11 @@ do_compile() {
27 mkdir -p build 28 mkdir -p build
28 29
29 # Workaround for jamvm. 30 # Workaround for jamvm.
30 bcp=${STAGING_DATADIR_NATIVE}/classpath/glibj.zip 31 #bcp=${STAGING_DATADIR_NATIVE}/classpath/glibj.zip
31 32
32 javac -bootclasspath $bcp -sourcepath src -d build `find src -name "*.java"` 33 javac -sourcepath src -d build `find src -name "*.java"`
33 34
34 fastjar -C build -c -f ${JARFILENAME} . 35 fastjar cf ${JARFILENAME} -C build .
35} 36}
36 37
37SRC_URI[md5sum] = "9b8963ba2147a64bd5f1574b6fd289cb" 38SRC_URI[md5sum] = "9b8963ba2147a64bd5f1574b6fd289cb"