# $Id: Portfile 38136 2008-07-08 05:24:22Z ryandesign@macports.org $

PortSystem              1.0

name                    eclipse-ecj32
version                 3.2.2-200702121330
revision                4
categories              java
maintainers             gmail.com:mvfranz openmaintainer
platforms               darwin
distname                ecjsrc
use_zip                 yes
extract.mkdir           yes
worksrcdir              eclipse-ecj
use_configure           no
universal_variant       no

description             Eclipse java bytecode compiler
long_description        Eclipse java bytecode compiler

homepage                http://www.eclipse.org/
master_sites            http://download.eclipse.org/eclipse/downloads/drops/R-${version} \
                        http://archive.eclipse.org/eclipse/downloads/drops/R-${version}

checksums               md5 f9d7b548658c84231b00fada8d4b4f1b \
                        sha1 50f6b20a1542176e46d48fa522b9f24b2399878b \
                        rmd160 f49f0b5a24a509e46ecd44da82d79f98f4391c34

depends_build           port:apache-ant
depends_lib             bin:java:kaffe

post-patch {
    copy ${filespath}/build.xml ${worksrcpath}
    copy ${filespath}/ecj.in ${worksrcpath}/ecj
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/ecj
    file mkdir ${worksrcpath}/META-INF
    copy ${filespath}/MANIFEST.MF ${worksrcpath}/META-INF
}

build.cmd               ${prefix}/bin/ant
build.target            build

destroot {
    xinstall -d ${destroot}${prefix}/share/java
    xinstall -W ${worksrcpath} eclipse-ecj.jar ${destroot}${prefix}/share/java
    xinstall -W ${worksrcpath} ecj ${destroot}${prefix}/bin
}
