Ticket #357: Portfile

File Portfile, 1.5 KB (added by bchesneau@…, 21 years ago)

New portfile for ant

Line 
1# $Id: Portfile,v 1.8 2003/03/03 06:18:05 mij Exp $
2
3PortSystem                              1.0
4name                                    apache-ant
5version                                 1.5.2
6revision                                0
7categories                              devel
8maintainers                             bchesneau@mac.com
9description                             Java opensource build system
10long_description                        Ant is a Java based build tool. In theory it is kind of like \
11                                        make without make's wrinkles. Ant uses XML build files that defines \
12                                        a set of targets. Each target has dependencies (other targets) and \
13                                        contains a set of tasks to perform.
14homepage                http://ant.apache.org/
15
16platforms                               darwin freebsd
17master_sites                    http://www.apache.org/dist/ant/source/
18
19distname                                ${portname}-${portversion}-src
20worksrcdir                              ${portname}-${portversion}
21checksums                               md5 88d527c83028fd46f265833fb00f4902
22set antdir              java/${name}
23set instdir                             ${prefix}/${antdir}
24set chmodarg                    -Dchmod.fail=false
25build.cmd                               ./build.sh
26build.args                              ${chmodarg} -Ddist.name=${name}
27build.target                    dist
28configure { }
29
30install {
31        set path        ${destroot}${prefix}/java/
32
33        system "install -d ${path}"
34        system "install -d ${destroot}${prefix}/bin"
35        system "cd ${worksrcpath}; cp -R ${name} ${path}"
36        system "rm ${path}${name}/bin/*.bat"
37    system "chmod -R ugo+r ${path}${name}"
38        #system "ln -fs ${path}${name}/bin/ant ${destroot}${prefix}/bin/ant"
39        system "cd ${destroot} && \
40                                ln -fs ${prefix}/java/${name}/bin/ant ${prefix}/bin/ant"
41}
42
43variant darwin {
44    build.env                           JAVA_HOME=/Library/Java/Home           
45    extract.post_args           | gnutar -x
46}