Magellan Linux

Annotation of /trunk/extras/hamcrest/hamcrest-1.3-r4.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 29442 - (hide annotations) (download)
Wed Jun 14 13:56:58 2017 UTC (7 years ago) by niro
File size: 1659 byte(s)
auto added: ver bump to 1.3-r4
1 niro 29438 # $Id$
2    
3     PNAME="hamcrest"
4     PVER="1.3"
5     PBUILD="r4"
6    
7     PCAT="dev-java"
8    
9     DESCRIPTION="Library of matchers for building test expressions."
10     HOMEPAGE="https://github.com/hamcrest/JavaHamcrest"
11    
12     DEPEND=">= virtual/java"
13    
14     SDEPEND=">= virtual/java-jdk
15     >= dev-java/apache-ant-1.9"
16    
17     SRCFILE="${PNAME}-java-${PVER}.tar.gz"
18     SRCDIR="${BUILDDIR}/JavaHamcrest-${PNAME}-java-${PVER}"
19    
20     sminclude java
21     msetfeature "!check"
22    
23     SRC_URI=(
24     https://github.com/${PNAME}/JavaHamcrest/archive/${SRCFILE}
25     https://hamcrest.googlecode.com/files/${SRCFILE}
26     mirror://${PNAME}/${SRCFILE}
27 niro 29442 mirror://${PNAME}/${PNAME}-${PVER}-random-build-failure-2.patch
28 niro 29440
29 niro 29438 )
30    
31     UP2DATE="updatecmd https://github.com/hamcrest/JavaHamcrest/releases | highesttarball gz"
32    
33     src_prepare()
34     {
35     munpack ${SRCFILE} || die
36 niro 29440 cd ${SRCDIR}
37    
38     # fix random build errors
39 niro 29442 mpatch ${PNAME}-${PVER}-random-build-failure-2.patch || die
40 niro 29438 }
41    
42     src_compile()
43     {
44     cd ${SRCDIR}
45     local myopts
46    
47     # requires 1.5 source definitions
48 niro 29439 myopts+=" -Dant.build.javac.source=1.5"
49 niro 29438
50     # suppress SNAPSHOT version suffix
51     myopts+=" -Dversion=${PVER}"
52    
53     ant ${myopts} clean core generator library bigjar || die
54     }
55    
56     src_install()
57     {
58     cd ${SRCDIR}
59    
60     local jar
61     for jar in core library generator integration all
62     do
63     # minstalljar adds pver automatically - so we rename the jars
64     cp build/hamcrest-${jar}-${PVER}.jar build/hamcrest-${jar}.jar || die
65     minstalljar build/hamcrest-${jar}.jar || die
66     # invidual install into subdir is required by some packages
67     minstalldir ${JAVA_CLASSPATH_DIR}/${PNAME} || die
68     mlink ../hamcrest-${jar}-${PVER}.jar ${JAVA_CLASSPATH_DIR}/${PNAME}/${jar}.jar || die
69     done
70    
71     minstalldocs README.txt LICENSE.txt CHANGES.txt || die
72     }