diff options
author | Khem Raj <raj.khem@gmail.com> | 2013-05-24 13:46:43 -0700 |
---|---|---|
committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2013-09-29 21:51:08 +0200 |
commit | 311b292972533ab5be8f21dcd527db44afa4954a (patch) | |
tree | ed2581b9c8797bc2c48a64e6009c9b642aaecd8b /recipes-core/junit/junit_3.8.2.bb | |
parent | 9406a34197e0d116bdfcf451f90112b67796455c (diff) | |
download | meta-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/junit_3.8.2.bb')
-rw-r--r-- | recipes-core/junit/junit_3.8.2.bb | 11 |
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 | ||
10 | S = "${WORKDIR}/junit${PV}" | 10 | S = "${WORKDIR}/junit${PV}" |
11 | 11 | ||
12 | DEPENDS += "unzip-native" | ||
13 | |||
12 | inherit java-library | 14 | inherit java-library |
13 | 15 | ||
14 | do_unpackpost() { | 16 | do_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 | ||
24 | addtask unpackpost before do_removebinaries after do_unpack | 25 | addtask 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 | ||
37 | SRC_URI[md5sum] = "9b8963ba2147a64bd5f1574b6fd289cb" | 38 | SRC_URI[md5sum] = "9b8963ba2147a64bd5f1574b6fd289cb" |