# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 71875 2010-09-25 23:20:51Z ryandesign@macports.org $

PortSystem          1.0

name                batik
version             1.7
platforms           darwin
categories          java graphics
maintainers         nomaintainer
license             Apache-2.0
supported_archs     noarch

description         Java SVG Toolkit

long_description    Batik is a Java-based toolkit for applications or \
                    applets that want to use images in the Scalable \
                    Vector Graphics (SVG) format for various purposes, \
                    such as display, generation or manipulation.

homepage            http://xmlgraphics.apache.org/batik

master_sites        http://apache.phphosts.org/xmlgraphics/batik/
distname            ${name}-src-${version}
worksrcdir          ${name}-${version}
use_zip             yes

checksums           md5     c117ca2241907f62a2b3031167ebf917 \
                    sha1    806f57b0200cc755903c2f6f55463f0dd5f6f7d6 \
                    rmd160  aba34d2e0cecf56ef3c79447bbaae2575c4933a1

depends_build       bin:ant:apache-ant

use_configure       no

build.cmd           ant
build.target        jars all-jar

destroot {
    xinstall -m 755 -d \
        ${destroot}${prefix}/share/java/${name} \
        ${destroot}${prefix}/share/doc/${name}

    xinstall -m 644 \
        ${worksrcpath}/${name}-${version}/batik.jar \
        ${destroot}${prefix}/share/java/

    xinstall -m 644 -W ${worksrcpath}/${name}-${version}/lib \
        batik-all.jar \
        batik-anim.jar \
        batik-awt-util.jar \
        batik-bridge.jar \
        batik-codec.jar \
        batik-css.jar \
        batik-dom.jar \
        batik-ext.jar \
        batik-extension.jar \
        batik-gui-util.jar \
        batik-gvt.jar \
        batik-parser.jar \
        batik-script.jar \
        batik-svg-dom.jar \
        batik-svggen.jar \
        batik-swing.jar \
        batik-transcoder.jar \
        batik-util.jar \
        batik-xml.jar \
        ${destroot}${prefix}/share/java/${name}/

    xinstall -m 644 -W ${worksrcpath} \
        KEYS \
        LICENSE \
        MAINTAIN \
        NOTICE \
        README \
        ${destroot}${prefix}/share/doc/${name}
}
