# $Id: Portfile,v 1.11 2006/05/16 06:35:07 mww Exp $
PortSystem 1.0
name		gnu-classpath
version		0.91
description	Essential libraries for Java.
long_description	GNU Classpath, Essential Libraries for Java, \
			is a GNU project to create free core class \
			libraries for use with virtual machines and \
			compilers for the java programming language.
maintainers	mww@opendarwin.org
categories	java
platforms	darwin 
homepage	http://www.gnu.org/software/classpath/classpath.html
master_sites	gnu:classpath
distname	classpath-${version}
checksums	sha1 fcbfdf64f7a990f1747621772a2e9e69d0baaab7
patchfiles	patch-native-jni-java-nio-Makefile.in
depends_lib	port:libiconv

configure.args	--mandir=${prefix}/share/man --infodir=${prefix}/share/info \
		--disable-gtk-peer --with-jikes
configure.env   CPPFLAGS="-I${prefix}/include -L${prefix}/lib" 

variant gtk {
	configure-delete --disable-gtk-peer
	depends-lib-append lib:libgtk.2:gtk2
}

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/java
	file rename ${destroot}${prefix}/share/classpath/glibj.zip \
		${destroot}${prefix}/share/java/glibj.jar
}

platform darwin 7 {
	# jikes on 10.3 is < 1.22
	depends_build	port:jikes
}

platform darwin 8 {
	configure.env-append	CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}
