source: trunk/dports/java/commons-daemon/Portfile @ 78784

Last change on this file since 78784 was 78784, checked in by ryandesign@…, 9 years ago

Check that jni.h is actually a file; some users report it being a directory; see #20849 and #29115

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1# $Id: Portfile 78784 2011-05-22 00:10:41Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                            commons-daemon
6version                         1.0.2
7license             Apache-2.0
8
9categories                      java
10maintainers                     nomaintainer
11platforms                       darwin
12
13description                     Jakarta Commons-Daemon
14long_description        An alternative invocation mechanism for unix-daemon-like \
15                                        java code.
16homepage                        http://commons.apache.org/daemon/
17
18distname                        ${name}-${version}-src
19master_sites            apache:commons/daemon/source/
20
21checksums           md5     a6c68eed204bc9f1ef3b77488edfcfeb \
22                    sha1    a4e7e267c6accfeae5226f3a64ad2d7bd19993d1 \
23                    rmd160  afad8e7608f342ea576efde374511e50d269ae84
24
25patchfiles                      patch-native-dso-dyld.c
26
27depends_build           bin:ant:apache-ant
28depends_lib                     bin:java:kaffe \
29                                        port:junit
30
31configure.dir       ${worksrcpath}/src/native/unix
32
33platform macosx {
34    pre-configure {
35        if {![file isfile "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h"]} {
36            ui_error "${name} requires the Java for Mac OS X development headers."
37            if {${os.major} == 10} {
38                ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719>"
39            } elseif {${os.major} == 9} {
40                ui_error "Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20720>"
41            } else {
42                ui_error "Make sure your Xcode installation is complete."
43            }
44            return -code error "missing Java headers"
45        }
46    }
47}
48
49build.dir           ${configure.dir}
50build.target        clean all
51
52use_parallel_build  no
53
54pre-build {
55    system "cd ${worksrcpath} && \
56        ant dist -Djunit.jar=${prefix}/share/java/junit.jar"
57}
58
59destroot {
60    xinstall -d ${destroot}${prefix}/share/java \
61        ${destroot}${prefix}/share/doc
62    xinstall -m 644 ${worksrcpath}/dist/commons-daemon-${version}.jar \
63        ${destroot}${prefix}/share/java/commons-daemon.jar
64    xinstall ${worksrcpath}/src/native/unix/jsvc \
65        ${destroot}${prefix}/bin
66    set docdir ${prefix}/share/doc/${name}
67    file copy ${worksrcpath}/dist/docs ${destroot}${docdir}
68    xinstall -m 644 -W ${worksrcpath} LICENSE.txt NOTICE.txt PROPOSAL.html \
69        RELEASE-NOTES.txt ${destroot}${docdir}
70}
71
72livecheck.type  regex
73livecheck.url   http://commons.apache.org/downloads/download_daemon.cgi
74livecheck.regex {>(\d+(?:\.\d+)*)\.tar}
Note: See TracBrowser for help on using the repository browser.