source: trunk/dports/java/junit/Portfile

Last change on this file was 96266, checked in by jberry@…, 5 years ago

Use the new java portgroup to set the java JAVA_HOME, as the symlink at /System/Library/Frameworks/JavaVM.framework/Home no longer exists on Mountain Lion. We discover JAVA_HOME via /usr/libexec/java_home if it exists.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 96266 2012-08-06 19:52:55Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       java 1.0
6
7name            junit
8version         4.6
9revision        2
10categories      java devel
11license         CPL-1
12platforms       darwin
13maintainers     nomaintainer
14supported_archs noarch
15
16description     Java framework for repeatable tests
17
18long_description \
19    JUnit is a simple framework to write repeatable tests. \
20    It is an instance of the xUnit architecture for unit \
21    testing frameworks.
22
23homepage        http://www.junit.org/
24master_sites    sourceforge:project/junit/junit/${version}
25distname        ${name}${version}
26use_zip         yes
27
28checksums       md5     2e59ed558001fd3b10d2146189167ff5 \
29                sha1    98c8c625e999f0c7463397a684a5c47a0ea106e3 \
30                rmd160  4f87024e91b7252af89ad925db5cda0e17128525
31
32patchfiles      patch-build.xml.diff \
33                patch-src-main-java-org-junit-matchers-package-info.java.diff \
34                patch-hamcrest-1.2-upgrade.diff
35
36post-extract {
37    file mkdir ${worksrcpath}/src/main/java
38    system "cd ${worksrcpath}/src/main/java && jar xvf ${worksrcpath}/${name}-${version}-src.jar"
39}
40
41
42depends_build   bin:ant:apache-ant
43depends_lib     port:hamcrest-core
44
45use_configure   no
46
47build.cmd       ant
48build.target    build
49build.args      -Dprefix=${prefix} \
50                -Dtestsrc=org/junit/tests \
51                -Ddist=.
52
53set docdir      ${prefix}/share/doc/${name}-${version}
54set javadir     ${prefix}/share/java
55set junitpkg    junit.jar
56
57destroot {
58    system "jar cvf ${worksrcpath}/${junitpkg} -C ${worksrcpath}/target/main ."
59    xinstall -d ${destroot}${javadir} ${destroot}${docdir}
60    xinstall -m 0644 ${worksrcpath}/${junitpkg} ${destroot}${javadir}
61    copy ${worksrcpath}/doc ${destroot}${docdir}/html
62}
63
64variant doc description {Install extra documentation} {
65    build.target-append javadoc
66   
67    post-destroot {
68        file copy ${worksrcpath}/javadoc ${destroot}${docdir}/
69    }
70}
Note: See TracBrowser for help on using the repository browser.