Portfile

# $Id: Portfile 20316 2006-11-01 22:25:06Z blair@macports.org $

PortSystem 1.0

name dom4j
version 1.6.1
revision 1

categories java
maintainers jberry@macports.org
platforms darwin

description XML, XPATH, and XSLT support for Java.
long_description dom4j is an easy to use, open source library for working \
with XML, XPath and XSLT on the Java platform using the \
Java Collections Framework and with full support for DOM, \
SAX and JAXP.
homepage http://www.dom4j.org

master_sites sourceforge
checksums md5 1e7ef6d20939315714de4a8502f27b2d

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

patchfiles patch-build.xml.diff

use_configure no

build.cmd ant
build.target all
build.args -Djunit.jar=${prefix}/share/java/junit.jar

pre-patch {
# Convert build.xml to unix line feeds before we try to patch it
system "cat ${worksrcpath}/build.xml | tr -d '\r' > ${worksrcpath}/build.xml.tmp && mv ${worksrcpath}/build.xml.tmp ${worksrcpath}/build.xml"
}

destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/java \
${destroot}${prefix}/share/doc
xinstall -m 644 ${worksrcpath}/build/${name}.jar \
${destroot}${prefix}/share/java/
file copy ${worksrcpath}/build/doc ${destroot}${prefix}/share/doc/${name}
}

files