Ticket #19534: Portfile-2

File Portfile-2, 1.7 KB (added by hibou@…, 15 years ago)
Line 
1# $Id$
2
3PortSystem 1.0
4
5name                            gant
6version                         1.6.1
7categories                      java devel groovy
8maintainers                     rene@breskeby.com
9description                     Gant is a tool for scripting Ant tasks using Groovy instead of XML \
10                                        to specify the logic. A Gant specification is a Groovy script and so \
11                                        can bring all the power of Groovy to bear directly, something not \
12                                        possible with Ant scripts. Whilst it might be seen as a competitor \
13                                        to Ant, Gant uses Ant tasks for many of the actions, so Gant is really \
14                                        an alternative way of doing things using Ant, but using a \
15                                        programming language rather than XML to specify the rules.
16                                       
17homepage                        http://gant.codehaus.org/
18platforms                       darwin
19distname                        ${name}-${version}_groovy-1.6.0
20extract.suffix          .tgz
21master_sites            http://dist.codehaus.org/gant/distributions
22checksums                       md5     486c8d96f6a41eb7e00b177ef92e7917 \
23                                        sha1 468111aa3e86a506f8c3820c1ea195b0c0ac910b \
24                                        rmd160 c9d909b5c63dd89cf6776e391187cb37c5a80041
25                                               
26worksrcdir                      ${name}-${version}
27set workTarget          ""
28
29use_configure           no
30
31patchfiles                      GANT-79.patch
32
33build.cmd                       true
34
35depends_run                     port:groovy
36
37platform darwin {
38    extract.post_args   | gnutar -x
39}
40
41pre-destroot {
42        # Remove extraneous bat files
43        foreach f [glob -directory ${worksrcpath}${workTarget}/bin *.bat] {
44                file delete $f
45        }
46}
47
48destroot        {
49        # Create the target java directory
50        xinstall -m 755 -d ${destroot}${prefix}/share/java/${name}
51
52        # Copy over the needed elements of our directory tree
53        file copy ${worksrcpath}/bin                                                    \
54                          ${worksrcpath}/lib                                                    \
55                          ${worksrcpath}/conf                                                   \
56                          ${destroot}${prefix}/share/java/${name}
57
58        # Symlink gant into the bin directory
59        system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/gant"
60}