# $Id: Portfile,v 1.5 2005/11/17 04:52:49 jberry Exp $

PortSystem 1.0

name				commons-el
version				1.0
revision			1

categories			java
maintainers			jberry@opendarwin.org
platforms			darwin

description			Jakarta Commons-Expression Language
long_description	Commons-EL provides an interpreter for the Expression \
					Language which is  defined by the JavaServer Pages(TM) \
					specification, version 2.0.
homepage			http://jakarta.apache.org/commons/el/
				
distname			${name}-${version}-src
master_sites		apache:jakarta/commons/el/source/
checksums			md5 25038283a0b5f638db5e891295d20020

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

use_configure		no

build.cmd			ant
build.target		jar javadoc
build.args			-Djunit.jar=${prefix}/share/java/junit.jar \
					-Dservlet-api.jar=${prefix}/share/java/servlet24-api.jar \
					-Djsp-api.jar=${prefix}/share/java/jsp2-api.jar \
					-Dservletapi.build.notrequired=true \
					-Djspapi.build.notrequired=true

post-patch {
	# Force source 1.4 so javac doesn't blow up on variables named enum
	reinplace {s|<javac |<javac source="1.4" |} ${worksrcpath}/build.xml
}

pre-build {
	system "touch ${workpath}/LICENSE"
}

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