source: trunk/dports/devel/apache-ant/Portfile

Last change on this file was 148744, checked in by blair@…, 17 months ago

apache-ant: use the java portgroup to set JAVA_HOME; suggested by ryandesign.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# $Id: Portfile 148744 2016-05-16 16:20:26Z ryandesign@macports.org $
2
3PortSystem 1.0
4PortGroup               java 1.0
5
6name                    apache-ant
7version                 1.9.7
8categories              devel java
9license                 Apache-2 W3C
10maintainers             openmaintainer blair
11supported_archs         noarch
12
13description             Java opensource build system
14long_description        Ant is a Java based build tool.  In theory it is \
15                        kind of like make without make's wrinkles.  Ant \
16                        uses XML build files that define a set of targets.  \
17                        Each target has dependencies (other targets) and \
18                        contains a set of tasks to perform.
19homepage                http://ant.apache.org/
20
21platforms               darwin freebsd
22
23distname                ${name}-${version}-bin
24master_sites            apache:ant/
25master_sites.mirror_subdir        binaries
26checksums               md5    99a86981333a0ff39bb56c963d1f492b \
27                        sha1   230c6a5c59dc08364f615deb240aa50c23ccfe2a \
28                        sha512 3954a6ad3f522c135f327ba0d376eb16ae42103849c8cc5cd6c8c6e87b8c5433c95a0f2d4dfa3e6c2705ee0b8996e5b27d0b2248f64a05fc8c902116cc45a7b2
29
30worksrcdir              ${name}-${version}
31set workTarget          ""
32
33use_bzip2               yes
34use_configure           no
35
36build.cmd               true
37
38# Ant is installed from the binary (jar) distribution by default. Due to
39# bootstrapping issues, the source variant generally doesn't build a very
40# usable ant: the ant tasks (such as junit) are non-functional as their
41# dependent support isn't available when ant is built, due to circular
42# dependencies back to ant.
43variant source description "build from source; not recommended" {
44        distname                        ${name}-${version}-src
45        master_sites.mirror_subdir      source
46        checksums                       md5    6413ed1cee16372d0fa215ffacca48b7 \
47                                        sha1   5f0d4f059cf7dc2620cde59e9c209663e99cad54 \
48                                        sha512 5a557e06b71c69ca61bbb4d2709edb41405cb22258a158f5645cf43b1087a692a0cc9829e356238c660ed9cd917ce3ce6d8accb1775b1642545c932a49676459
49        set workTarget                  /${name}
50
51        build.cmd                       ./build.sh
52        build.args                      -Dchmod.fail=false -Ddist.name=${name}
53        build.target                    dist
54}
55
56pre-destroot {
57        delete \
58                ${worksrcpath}${workTarget}/bin/ant.bat \
59                ${worksrcpath}${workTarget}/bin/ant.cmd \
60                ${worksrcpath}${workTarget}/bin/antRun.bat \
61                ${worksrcpath}${workTarget}/bin/antenv.cmd \
62                ${worksrcpath}${workTarget}/bin/envset.cmd \
63                ${worksrcpath}${workTarget}/bin/lcp.bat \
64                ${worksrcpath}${workTarget}/bin/runrc.cmd
65}
66
67destroot        {
68        xinstall -m 755 -d ${destroot}${prefix}/share/java
69        file copy ${worksrcpath}${workTarget} \
70                ${destroot}${prefix}/share/java/${name}
71
72        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
73        foreach f {INSTALL
74                   KEYS
75                   LICENSE
76                   NOTICE
77                   README
78                   WHATSNEW
79                   manual} {
80            file rename ${destroot}${prefix}/share/java/${name}/${f} \
81                ${destroot}${prefix}/share/doc/${name}/${f}
82        }
83
84        ln -s ../share/java/${name}/bin/ant ${destroot}${prefix}/bin/ant
85}
86
87universal_variant       no
88
89livecheck.type          regex
90livecheck.url           http://www.apache.org/dist/ant/binaries/
91livecheck.regex         {apache-ant-(\d+(?:\.\d+)*)-bin.tar.bz2}
Note: See TracBrowser for help on using the repository browser.