Ticket #24795: Portfile

File Portfile, 2.6 KB (added by franck@…, 15 years ago)

ports/java/rhino/Portfile

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$
3
4PortSystem          1.0
5name                rhino
6version             1.7R2
7license             MPL 1.1/GPL 2.0
8categories          java
9categories-append   devel lang
10platforms           darwin freebsd openbsd
11homepage            http://www.mozilla.org/rhino
12maintainers         ouarz.net:franck.cassedanne
13description         Mozilla JavaScript engine for Java
14
15long_description    ${name} is an open-source implementation of JavaScript \
16                    written entirely in Java. It is typically embedded into \
17                    Java applications to provide scripting to end users.
18
19master_sites        http://ftp.mozilla.org/pub/mozilla.org/js/ \
20                    ftp://ftp.mozilla.org/pub/mozilla.org/js/ \
21                    http://ftp.mozilla.org/pub/mozilla.org/js/older-packages/ \
22                    ftp://ftp.mozilla.org/pub/mozilla.org/js/older-packages/
23
24distname            ${name}[string map {. _} $version]
25use_zip             yes
26
27depends_lib         bin:java:kaffe
28
29use_configure       no
30
31build               {}
32
33checksums           md5     40d0a9abec8169e42920214b37fa8e0e \
34                    sha1    3bb380cfb7f6febb87a64b2dee7fa308042f37e4 \
35                    rmd160  58ae321829ac701e442bfbfed3d6f87b2bb6ba4c
36
37livecheck.type      regex
38livecheck.url       http://www.mozilla.org/rhino/download.html
39livecheck.regex     {(\d+\.\d+(:?\D+\d))}
40
41destroot {
42    set javadir ${destroot}${prefix}/share/java
43    set docdir ${destroot}${prefix}/share/doc/${distname}
44    set examplesdir ${destroot}${prefix}/share/examples/${distname}
45
46    xinstall -m 755 -d ${javadir}/${name}/bin
47    xinstall -m 755 -d ${docdir}
48    xinstall -m 755 -d ${examplesdir}
49    file copy ${worksrcpath}/js.jar ${javadir}/${name}/js.jar
50    file copy ${worksrcpath}/js-14.jar ${javadir}/${name}/js-14.jar
51
52    system "cd ${javadir}/${name}/bin \
53        && echo \"java -jar ${prefix}/share/java/${name}/js.jar\" > ${destroot}${prefix}/bin/rhino \
54        && chmod +x ${destroot}${prefix}/bin/rhino"
55
56    file copy ${worksrcpath}/javadoc/ ${docdir}
57    file copy ${worksrcpath}/examples/ ${examplesdir}
58}
59
60post-install {
61    ui_msg "-------------------------------------------------------------------"
62    ui_msg "${name} has been installed in:"
63    ui_msg "\t- Command-line access: ${prefix}/bin/${name}"
64    ui_msg "\t- JAR files: ${prefix}/share/java/${name}/"
65    ui_msg "\t- Javadoc: ${prefix}/share/doc"
66    ui_msg "\t- Examples: ${prefix}/share/examples"
67    ui_msg "-------------------------------------------------------------------"
68}