Contents of /branches/R11-stable/extras/junit/junit-4.11-r1.smage2
Parent Directory | Revision Log
Revision 17959 -
(show annotations)
(download)
Thu Jun 27 06:36:06 2013 UTC (11 years, 3 months ago) by niro
File size: 1456 byte(s)
Thu Jun 27 06:36:06 2013 UTC (11 years, 3 months ago) by niro
File size: 1456 byte(s)
-release branches/R11-stable
1 | # $Id$ |
2 | |
3 | PNAME="junit" |
4 | PVER="4.11" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="dev-java" |
8 | |
9 | DESCRIPTION="JUnit is a simple framework to write repeatable tests." |
10 | HOMEPAGE="http://junit.org/" |
11 | |
12 | DEPEND=">= virtual/java |
13 | >= dev-java/hamcrest-1.3" |
14 | |
15 | SDEPEND=">= virtual/java-jdk |
16 | >= dev-java/apache-ant-1.8.2 |
17 | >= app-arch/unzip-5" |
18 | |
19 | # commit id |
20 | COID="c62e2df" |
21 | # unusual but it is so |
22 | SRCFILE="r${PVER}" |
23 | SRCDIR="${BUILDDIR}/junit-team-${PNAME}-${COID}" |
24 | |
25 | sminclude java |
26 | |
27 | SRC_URI=( |
28 | http://github.com/junit-team/junit/tarball/r${PVER} |
29 | mirror://${PNAME}/${SRCFILE} |
30 | ) |
31 | |
32 | UP2DATE="updatecmd_sourceforge ${PNAME}" |
33 | |
34 | src_prepare() |
35 | { |
36 | # munpack needs a suffix |
37 | tar xvf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${BUILDDIR} || die |
38 | } |
39 | |
40 | src_compile() |
41 | { |
42 | cd ${SRCDIR} |
43 | local myopts |
44 | |
45 | # requires 1.5 source definitions |
46 | myopts+=" -Dant.build.javac.source=1.5" |
47 | |
48 | ant ${myopts} jars || die |
49 | |
50 | # fix missing Manifest |
51 | echo 'Class-Path: hamcrest-core.jar' > ${SRCDIR}/Manifest.txt || die |
52 | jar ufm junit${PVER}-SNAPSHOT/junit-dep-${PVER}-SNAPSHOT.jar ${SRCDIR}/Manifest.txt || die |
53 | } |
54 | |
55 | src_check() |
56 | { |
57 | cd ${SRCDIR} |
58 | ant test || die |
59 | } |
60 | |
61 | src_install() |
62 | { |
63 | cd ${SRCDIR} |
64 | |
65 | # minstalljar adds pver automatically - so we rename the jars |
66 | cp junit${PVER}-SNAPSHOT/junit-${PVER}-SNAPSHOT.jar junit.jar || die |
67 | cp junit${PVER}-SNAPSHOT/junit-dep-${PVER}-SNAPSHOT.jar junit-dep.jar || die |
68 | |
69 | minstalljar junit.jar || die |
70 | minstalljar junit-dep.jar || die |
71 | minstalldocs README.html cpl-v10.html doc/ReleaseNotes${PVER}.txt *.txt || die |
72 | } |
73 |