# $Id: Portfile 86531 2011-10-27 16:57:09Z blair@macports.org $

PortSystem 1.0

name                    google-guava
version                 10.0.1
categories              java
platforms               darwin
maintainers             blair
description             Google's core libraries for Java 1.5
long_description        Google Guava replaces and includes Google Collections \
                        plus many other important core libraries.  It is a \
                        strict, backward-compatible superset of the Google \
                        Collections Library.  It also includes six months \
                        worth of bug fixes, documetnation fixes, and \
                        performance fixes, so it is strongly encouraged to \
                        instead of Google Collections.

homepage                http://code.google.com/p/guava-libraries/

depends_lib             bin:java:kaffe

master_sites            "http://search.maven.org/remotecontent?filepath=com/google/guava/guava/${version}"
distfiles               guava-${version}.jar \
                        guava-${version}-javadoc.jar
extract.cmd             unzip
extract.pre_args        -q
extract.post_args       "-d ${workpath}/api"
extract.only            guava-${version}-javadoc.jar

checksums               guava-${version}.jar \
                        md5 d05cd8b0a7ee4466994d64779eb28190 \
                        sha1 292c96f9cb18231528cac4b0bf17d28149d14809 \
                        rmd160 1b0916d7c04ed8e20fd3c6b2430d6efdae6060f1 \
                        guava-${version}-javadoc.jar \
                        md5 161d4b4ce51bdc8bfb7eb4d490dd04e6 \
                        sha1 45a2eedf88e80ef8036d3054920515d2793dbfd0 \
                        rmd160 c2a9f61c801a2811b219c06bce3e8017de1b3850

use_configure           no

build { }

destroot {
        set javadir ${destroot}${prefix}/share/java
        set docdir ${destroot}${prefix}/share/doc/${name}

        xinstall -d ${docdir} ${javadir}

        file copy ${distpath}/guava-${version}.jar \
                ${javadir}/google-guava.jar
        file copy ${workpath}/api ${docdir}
}
