# $Id: Portfile,v 1.28 2006/05/08 06:28:55 pguyot Exp $

PortSystem 1.0
name 			ocaml
version			3.09.2
platforms		darwin
maintainers		pguyot@kallisys.net
categories		lang
description		Objective Caml is an implementation of the ML language
homepage		http://www.ocaml.org
master_sites	http://caml.inria.fr/pub/distrib/ocaml-3.09/
checksums		md5 63428ce7e114520e8f529c9ca809a1b0 \
				sha1 578c66707532882782735352a3628b78193da5e7 \
				rmd160 45edae84e5787775a5beed29a1ad2881f4df8505

long_description \
			Objective Caml is an implementation of the ML language, based on \
			the Caml Light dialect extended with a complete class-based object \
			system	and a powerful module system in the style of Standard ML.

use_bzip2			yes

# Configure.
configure.pre_args	-prefix ${prefix} 
configure.args		-no-tk 

# Building.
build.target		world.opt

# Install.
destroot.target		install
destroot.destdir	BINDIR=${destroot}${prefix}/bin \
					LIBDIR=${destroot}${prefix}/lib/ocaml \
					MANDIR=${destroot}${prefix}/share/man

# Change "ld.conf" to remove ${destroot} in paths.
post-destroot {
	reinplace "s:${destroot}::g" ${destroot}${prefix}/lib/ocaml/ld.conf
}

# Variants.
variant labltk {
	depends_lib		lib:tcl8.4:tcl lib:tk8.4:tk
	configure.args-delete 	-no-tk
}
