Magellan Linux

Contents of /trunk/extras/junit/junit-4.12-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 28378 - (show annotations) (download)
Wed Aug 24 08:12:51 2016 UTC (7 years, 9 months ago) by niro
File size: 1554 byte(s)
-revert commit r28377
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 SDEPEND=">= virtual/java-jdk
17 >= dev-java/apache-ant-1.9
18 >= app-arch/unzip-5"
19
20 # commit id
21 COID="e87c6fc"
22 # unusual but it is so
23 SRCFILE="r${PVER}"
24 SRCDIR="${BUILDDIR}/junit-team-${PNAME}-${COID}"
25
26 sminclude java
27
28 SRC_URI=(
29 http://github.com/junit-team/junit/tarball/r${PVER}
30 mirror://${PNAME}/${SRCFILE}
31 )
32
33 UP2EXCLUDE="beta"
34 UP2SEPERATOR="r"
35 UP2DATE="updatecmd https://github.com/junit-team/${PNAME}/releases | highesttarball zip"
36
37 src_prepare()
38 {
39 # munpack needs a suffix
40 tar xvf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${BUILDDIR} || die
41 }
42
43 src_compile()
44 {
45 cd ${SRCDIR}
46 local myopts
47
48 # requires 1.5 source definitions
49 myopts+=" -Dant.build.javac.source=1.5"
50
51 ant ${myopts} jars || die
52
53 # fix missing Manifest
54 echo 'Class-Path: hamcrest-core.jar' > ${SRCDIR}/Manifest.txt || die
55 jar ufm junit${PVER}-SNAPSHOT/junit-dep-${PVER}-SNAPSHOT.jar ${SRCDIR}/Manifest.txt || die
56 }
57
58 src_check()
59 {
60 cd ${SRCDIR}
61 ant test || die
62 }
63
64 src_install()
65 {
66 cd ${SRCDIR}
67
68 # minstalljar adds pver automatically - so we rename the jars
69 cp junit${PVER}-SNAPSHOT/junit-${PVER}-SNAPSHOT.jar junit.jar || die
70 cp junit${PVER}-SNAPSHOT/junit-dep-${PVER}-SNAPSHOT.jar junit-dep.jar || die
71
72 minstalljar junit.jar || die
73 minstalljar junit-dep.jar || die
74 minstalldocs README.html cpl-v10.html doc/ReleaseNotes${PVER}.txt *.txt || die
75 }
76