# $Id: Portfile 66462 2010-04-14 00:28:55Z singingwolfboy@macports.org $

PortSystem 1.0

name			    apache-ivy
version			    2.1.0
categories		    devel java
maintainers		    singingwolfboy openmaintainer
description		    Dependency manager for Apache Ant
long_description	\
    Apache Ivy is a transitive dependency manager that is designed to \
    integrate with Apache Ant. An external XML file defines project \
    dependencies and lists the resources necessary to build a project. \
    Ivy then resolves and downloads resources from an artifact repository: \
    either a private repository or one publicly available on the Internet.
    
homepage		    http://ant.apache.org/ivy/

platforms		    darwin freebsd

distname		    ${name}-${version}-src
master_sites        apache:ant/ivy/
master_sites.mirror_subdir	${version}
worksrcdir          ${name}-${version}

depends_build       port:apache-ant

checksums           md5     49130a0c8beb74d77653e5443dacecd5 \
                    sha1    7abde4171630d1853ed8df2c04cfaf74e18fcb65 \
                    rmd160  0c9e2438d85d67048cc6f08fc9bb6b18fbf7ac1e

use_configure       no                    
build.cmd           ant
build.target        jar

destroot {
    set javadir ${destroot}${prefix}/share/java/
    set docdir ${destroot}${prefix}/share/doc/
    xinstall -d $javadir ${docdir}
    
    xinstall ${worksrcpath}/build/artifact/jars/ivy.jar ${javadir}
    file delete -force ${worksrcpath}/build/artifact
    move ${worksrcpath}/doc ${docdir}/${name}
    move ${worksrcpath} ${javadir}/${name}
}

platform darwin {
    extract.post_args	| gnutar -x
    build.env		JAVA_HOME=/Library/Java/Home
}

