SUMMARY="Implementation of the Caml language"
DESCRIPTION="
Caml is a general-purpose programming language, designed with program safety \
and reliability in mind. It is very expressive, yet easy to learn and use. \
Caml supports functional, imperative, and object-oriented programming styles. \
It has been developed and distributed by INRIA, a French research institute in \
computer science and applied mathematics, since 1985.
The OCaml system is the main implementation of the Caml language. It features \
a powerful module system and a full-fledged object-oriented layer. It comes \
with a native-code compiler that supports numerous architectures, for high \
performance; a bytecode compiler, for increased portability; and an \
interactive loop, for experimentation and rapid development.
"
LICENSE="GNU LGPL v2"
COPYRIGHT="1996-2013 Institut National de Recherche en Informatique et en Automatique (INRIA)."
HOMEPAGE="http://caml.inria.fr/index.en.html" 
SRC_URI="http://caml.inria.fr/pub/distrib/ocaml-4.01/ocaml-4.01.0.tar.gz"
CHECKSUM_SHA256="ea1751deff454f5c738d10d8a0ad135afee0852d391cf95766b726c0faf7cfdb"
REVISION="1"
ARCHITECTURES="x86 ?x86_gcc2 x86_64"

SOURCE_DIR="ocaml-4.01.0"

PROVIDES="
	ocaml = $portVersion compat >= 4
	cmd:camlp4 = $portVersion compat >= 4
	cmd:camlp4boot = $portVersion compat >= 4
	cmd:camlp4o = $portVersion compat >= 4
	cmd:camlp4o.opt = $portVersion compat >= 4
	cmd:camlp4of = $portVersion compat >= 4
	cmd:camlp4of.opt = $portVersion compat >= 4
	cmd:camlp4oof = $portVersion compat >= 4
	cmd:camlp4oof.opt = $portVersion compat >= 4
	cmd:camlp4orf = $portVersion compat >= 4
	cmd:camlp4orf.opt = $portVersion compat >= 4
	cmd:camlp4prof = $portVersion compat >= 4
	cmd:camlp4r = $portVersion compat >= 4
	cmd:camlp4r.opt = $portVersion compat >= 4
	cmd:camlp4rf = $portVersion compat >= 4
	cmd:camlp4rf.opt = $portVersion compat >= 4
	cmd:mkcamlp4 = $portVersion compat >= 4
	cmd:ocaml = $portVersion compat >= 4
	cmd:ocamlbuild = $portVersion compat >= 4
	cmd:ocamlbuild.byte = $portVersion compat >= 4
	cmd:ocamlbuild.native = $portVersion compat >= 4
	cmd:ocamlc = $portVersion compat >= 4
	cmd:ocamlc.opt = $portVersion compat >= 4
	cmd:ocamlcp = $portVersion compat >= 4
	cmd:ocamldebug = $portVersion compat >= 4
	cmd:ocamldep = $portVersion compat >= 4
	cmd:ocamldep.opt = $portVersion compat >= 4
	cmd:ocamldoc = $portVersion compat >= 4
	cmd:ocamldoc.opt = $portVersion compat >= 4
	cmd:ocamllex = $portVersion compat >= 4
	cmd:ocamllex.opt = $portVersion compat >= 4
	cmd:ocamlmklib = $portVersion compat >= 4
	cmd:ocamlmktop = $portVersion compat >= 4
	cmd:ocamlobjinfo = $portVersion compat >= 4
	cmd:ocamlopt = $portVersion compat >= 4
	cmd:ocamlopt.opt = $portVersion compat >= 4
	cmd:ocamloptp = $portVersion compat >= 4
	cmd:ocamlprof = $portVersion compat >= 4
	cmd:ocamlrun = $portVersion compat >= 4
	cmd:ocamlyacc = $portVersion compat >= 4
	"

REQUIRES="
	haiku >= $haikuVersion
	"

BUILD_PREREQUIRES="
	haiku_devel >= $haikuVersion
	cmd:make
	cmd:gcc
	cmd:awk
	cmd:sed
	cmd:grep
	cmd:xargs
	"

PATCHES="ocaml-4.01.0.patchset"

BUILD()
{
	./configure --prefix $prefix \
		--mandir $manDir
	make world.opt 
}

INSTALL()
{
	make install
}
