aboutsummaryrefslogtreecommitdiff
blob: dc8c685cb46241be353086ed9c9845bb0d5249a5 (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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

DESCRIPTION="The Zarith library implements arithmetic and logical operations over arbitrary-precision integers"
HOMEPAGE="http://forge.ocamlcore.org/projects/zarith"
SRC_URI="http://forge.ocamlcore.org/frs/download.php/835/${P}.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="+ocamlopt"

DEPEND="
	>=dev-lang/ocaml-3.10.2[ocamlopt?]
	dev-libs/gmp"
RDEPEND="${DEPEND}"

pkg_setup() {
	OCAMLDIR=$(ocamlc -where)
}

src_prepare(){
	sed \
		-e "s:(OCAMLFIND) install:(OCAMLFIND) install -ldconf \$(INSTALLDIR)/ld.conf:g" \
		-i "${S}"/project.mak || die
}

src_configure(){
	./configure -installdir "${D}${OCAMLDIR}" || die
}

src_install(){
	dodir "${OCAMLDIR}"
	cp "${OCAMLDIR}/ld.conf" "${D}${OCAMLDIR}/ld.conf" || die
	emake install
	rm "${D}${OCAMLDIR}/ld.conf" || die
	dodoc Changes README
}