Gentoo Archives: gentoo-commits

From: Jonathan-Christofer Demay <jcdemay@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-ml/zarith/
Date: Sun, 22 Jun 2014 18:52:56
Message-Id: 1403462967.901dfcb7c29bb1b78e4667c7832411d8b12d0df5.jcdemay@gentoo
1 commit: 901dfcb7c29bb1b78e4667c7832411d8b12d0df5
2 Author: Jonathan-Christofer Demay <jcdemay <AT> gmail <DOT> com>
3 AuthorDate: Sun Jun 22 18:49:27 2014 +0000
4 Commit: Jonathan-Christofer Demay <jcdemay <AT> gmail <DOT> com>
5 CommitDate: Sun Jun 22 18:49:27 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=901dfcb7
7
8 zarith no longer asks ocamlc for libdir
9
10 ---
11 dev-ml/zarith/zarith-1.2.1.ebuild | 23 ++++++++++++++---------
12 1 file changed, 14 insertions(+), 9 deletions(-)
13
14 diff --git a/dev-ml/zarith/zarith-1.2.1.ebuild b/dev-ml/zarith/zarith-1.2.1.ebuild
15 index 2822592..90b5183 100644
16 --- a/dev-ml/zarith/zarith-1.2.1.ebuild
17 +++ b/dev-ml/zarith/zarith-1.2.1.ebuild
18 @@ -2,7 +2,9 @@
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: $
21
22 -EAPI=4
23 +EAPI=5
24 +
25 +inherit eutils findlib multilib
26
27 DESCRIPTION="The Zarith library implements arithmetic and logical operations over arbitrary-precision integers"
28 HOMEPAGE="http://forge.ocamlcore.org/projects/zarith"
29 @@ -11,12 +13,11 @@ SRC_URI="http://forge.ocamlcore.org/frs/download.php/1199/${P}.tgz"
30 LICENSE="GPL-2"
31 SLOT="0"
32 KEYWORDS="~amd64 ~x86"
33 -IUSE="+ocamlopt"
34 -
35 -OCAMLDIR=`ocamlc -where`
36 +IUSE="+ocamlopt doc mpir"
37
38 DEPEND=">=dev-lang/ocaml-3.12.1[ocamlopt?]
39 - dev-libs/gmp"
40 + !mpir? ( dev-libs/gmp )
41 + mpir? ( sci-libs/mpir )"
42 RDEPEND="${DEPEND}"
43
44 src_prepare(){
45 @@ -24,17 +25,21 @@ src_prepare(){
46 }
47
48 src_configure(){
49 - ./configure -installdir "${D}${OCAMLDIR}" || die "configure failed"
50 + MY_OPTS="-ocamllibdir /usr/$(get_libdir) -installdir ${D}/usr/$(get_libdir)/ocaml"
51 + use mpir && MY_OPTS="${MY_OPTS} -mpir"
52 + ./configure ${MY_OPTS}|| die || die "configure failed"
53 }
54
55 src_compile(){
56 emake || die "emake failed"
57 + use doc && emake doc || die "emake doc failed"
58 }
59
60 src_install(){
61 - mkdir -p "${D}${OCAMLDIR}"
62 - cp "${OCAMLDIR}/ld.conf" "${D}${OCAMLDIR}/ld.conf"
63 + findlib_src_preinst
64 + cp /usr/$(get_libdir)/ocaml/ld.conf ${D}/usr/$(get_libdir)/ocaml/ld.conf
65 emake install || die "emake install failed"
66 - rm "${D}${OCAMLDIR}/ld.conf"
67 + rm -f ${D}/usr/$(get_libdir)/ocaml/ld.conf
68 dodoc Changes README
69 + use doc && dodoc -r html/
70 }