summaryrefslogtreecommitdiff
blob: 7dede9f282df140b23f360555c8d6d8b3b832b88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-ml/core/core-0.6.0.ebuild,v 1.1 2009/10/27 12:36:35 aballier Exp $

EAPI="2"
inherit findlib

DESCRIPTION="Jane Street's alternative to the standard library"
HOMEPAGE="http://www.janestreet.com/ocaml"
SRC_URI="http://www.janestreet.com/ocaml/${P}.tgz"

LICENSE="LGPL-2.1-linking-exception"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"

RDEPEND=">=dev-lang/ocaml-3.11[ocamlopt]
	dev-ml/res
	dev-ml/sexplib
	dev-ml/bin-prot
	dev-ml/fieldslib
	dev-ml/pcre-ocaml"
DEPEND="${RDEPEND}
	test? (
		dev-ml/ounit
		dev-ml/type-conv
	)"

src_compile() {
	emake -j1 || die
}

src_test() {
	cd "${S}/extended_test"
	ocamlfind ocamlc -package bigarray,oUnit,type-conv,sexplib,bin_prot,res,fieldslib,pcre,threads -thread -dtypes -I ../extended -I ../lib yes.ml -o yes.exe || die
	for i in lib extended ; do
		cd "${S}/${i}_test"
		emake || die
		./test_runner.exe || die
	done
}

src_install() {
	findlib_src_preinst
	emake install || die "make install failed"
	dodoc README
}