# $Id: Portfile 85001 2011-10-07 01:21:44Z jmr@macports.org $

PortSystem      1.0

name            gnu-classpath
set my_name     classpath
version         0.98
revision        1
maintainers     nomaintainer
categories      java
# has a runtime exception similar to gcc's
license         {GPL-2+ Permissive}
platforms       darwin 
description     Essential libraries for Java.

long_description \
    GNU Classpath, Essential Libraries for Java, \
    is a GNU project to create free core class \
    libraries for use with virtual machines and \
    compilers for the java programming language.

homepage        http://www.gnu.org/software/classpath/classpath.html
master_sites    gnu:${my_name}
distname        ${my_name}-${version}

checksums           md5     90c6571b8b0309e372faa0f9f6255ea9 \
                    sha1    1d6e8d1b3542a35bbd1013c61fab3cfae083decb \
                    rmd160  9a20f4ca9379d90cbca644c0e9410df1c57575a5

patchfiles      patch-native-jni-java-nio-Makefile.in

depends_build   port:antlr
depends_lib     port:libiconv

configure.args  --mandir=${prefix}/share/man \
                --infodir=${prefix}/share/info \
                --disable-gtk-peer \
                --disable-gconf-peer \
                --disable-plugin \
                --with-antlr-jar=${prefix}/lib/antlr.jar

variant gtk {
    depends_lib-append      port:gtk2 \
                            port:gconf

    configure.args-delete   --disable-gtk-peer \
                            --disable-gconf-peer
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/java
    move ${destroot}${prefix}/share/classpath/glibj.zip \
        ${destroot}${prefix}/share/java/glibj.jar
    ln ${destroot}${prefix}/share/java/glibj.jar ${destroot}${prefix}/share/classpath/glibj.zip
}

livecheck.name  ${my_name}
