# $Id$ PortSystem 1.0 name apache-ant version 1.9.6 categories devel java license Apache-2 W3C maintainers openmaintainer blair supported_archs noarch description Java opensource build system long_description Ant is a Java based build tool. In theory it is \ kind of like make without make's wrinkles. Ant \ uses XML build files that define a set of targets. \ Each target has dependencies (other targets) and \ contains a set of tasks to perform. homepage http://ant.apache.org/ platforms darwin freebsd distname ${name}-${version}-bin master_sites apache:ant/ master_sites.mirror_subdir binaries checksums md5 9a966bfde100aa696f8a32cba03bce21 \ sha1 567bab0b3bca428dffb88e38600b4cb1dca66cf8 \ sha512 363c7c6e0a90de95953b0b24fdae3699bf44c9e15b8f4ebbee190515b4b0611eb2d2866ec7a052b7676be34defddc3a2cf51d09f1176474b67fe8e8e5af5fb7f worksrcdir ${name}-${version} set workTarget "" use_bzip2 yes use_configure no build.cmd true platform darwin { build.env JAVA_HOME=/Library/Java/Home } # Ant is installed from the binary (jar) distribution by default. Due to # bootstrapping issues, the source variant generally doesn't build a very # usable ant: the ant tasks (such as junit) are non-functional as their # dependent support isn't available when ant is built, due to circular # dependencies back to ant. variant source description "build from source; not recommended" { distname ${name}-${version}-src master_sites.mirror_subdir source checksums md5 c474fa9d0c35a24037c23b6e476862c1 \ sha1 fe01edd5acb221485d86e74411365cc139e1c87c \ sha512 7dbbdcd31f5fd498cbbe7f125451899320e5e9c2396b80f1f90d18943f8ef066a75198edfdba0edf96b1e0b5b84cb049b5281403180a7a6924ebfb077930e307 set workTarget /${name} build.cmd ./build.sh build.args -Dchmod.fail=false -Ddist.name=${name} build.target dist } post-patch { reinplace "s|/System/Library/Frameworks/JavaVM.framework/Home|`/usr/libexec/java_home`|g" "${worksrcpath}/bin/ant" } pre-destroot { delete \ ${worksrcpath}${workTarget}/bin/ant.bat \ ${worksrcpath}${workTarget}/bin/ant.cmd \ ${worksrcpath}${workTarget}/bin/antRun.bat \ ${worksrcpath}${workTarget}/bin/antenv.cmd \ ${worksrcpath}${workTarget}/bin/envset.cmd \ ${worksrcpath}${workTarget}/bin/lcp.bat \ ${worksrcpath}${workTarget}/bin/runrc.cmd } destroot { xinstall -m 755 -d ${destroot}${prefix}/share/java file copy ${worksrcpath}${workTarget} \ ${destroot}${prefix}/share/java/${name} xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} foreach f {INSTALL KEYS LICENSE NOTICE README WHATSNEW manual} { file rename ${destroot}${prefix}/share/java/${name}/${f} \ ${destroot}${prefix}/share/doc/${name}/${f} } ln -s ../share/java/${name}/bin/ant ${destroot}${prefix}/bin/ant } universal_variant no livecheck.type regex livecheck.url http://www.apache.org/dist/ant/binaries/ livecheck.regex {apache-ant-(\d+(?:\.\d+)*)-bin.tar.bz2}