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