# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	Portfile
#	files/checkstyle
#
echo x - Portfile
sed 's/^X//' >Portfile << 'END-of-Portfile'
X# $Id$
X
XPortSystem 1.0
X
Xname			checkstyle
Xversion			3.5
Xcategories		java lang
Xplatforms		darwin
Xmaintainers		dglo@icecube.wisc.edu
Xdescription		CheckStyle is a Java source code analyzer
Xlong_description	Checkstyle is a Java source code analyzer. \
X			It automates the process of checking Java code, \
X			and can be made to support almost any coding \
X			standard.  It can also find class design problems, \
X			duplicate code, or bug patterns like \
X			double checked locking.
X
Xhomepage		http://checkstyle.sourceforge.net/
Xmaster_sites	sourceforge
Xdistname		${name}-src-${version}
Xchecksums		md5 1b4403f6c03b21c841431678dad92a85
Xuse_zip			yes
X
Xdepends_build	bin:ant:apache-ant
Xdepends_lib		bin:java:kaffe
Xdepends_run		lib:XXX:junit
X
Xworksrcdir		${name}-src-${version}
X
Xuse_configure	no
X
Xbuild.cmd		ant
Xbuild.target	build.bindist
Xbuild.dir		${worksrcpath}
Xbuild.env		CLASSPATH=${prefix}/share/java/junit.jar
X
Xdestroot	{
X	xinstall -m 755 ${filespath}/${name} ${destroot}${prefix}/bin
X	reinplace "s|_PREFIX_|${prefix}|g" ${destroot}${prefix}/bin/${name}
X	xinstall -m 755 -d ${destroot}${prefix}/share/java \
X		${destroot}${prefix}/share/doc
X	xinstall -m 644 ${worksrcpath}/target/dist/${name}-${version}/${name}-all-${version}.jar \
X		${destroot}${prefix}/share/java/${name}.jar
X	xinstall -m 644 ${worksrcpath}/target/dist/${name}-${version}/${name}-optional-${version}.jar \
X		${destroot}${prefix}/share/java/${name}-optional.jar
X	file copy ${worksrcpath}/target/docs \
X		${destroot}${prefix}/share/doc/${name}
X	file mkdir ${destroot}${prefix}/share/${name}/
X	foreach xsl [glob -nocomplain ${worksrcpath}/contrib/*.xsl] {
X	  file copy ${xsl} ${destroot}${prefix}/share/${name}/
X	}
X}
END-of-Portfile
echo x - files/checkstyle
sed 's/^X//' >files/checkstyle << 'END-of-files/checkstyle'
X#!/bin/sh
XPREFIX=_PREFIX_
X                                                                                java -classpath ${PREFIX}/share/java/checkstyle.jar:${PREFIX}/share/java/checkstyle-optional.jar com.puppycrawl.tools/checkstyle.Main "$@"
Xfi
X
END-of-files/checkstyle
exit

