commit: 901dfcb7c29bb1b78e4667c7832411d8b12d0df5 Author: Jonathan-Christofer Demay <jcdemay <AT> gmail <DOT> com> AuthorDate: Sun Jun 22 18:49:27 2014 +0000 Commit: Jonathan-Christofer Demay <jcdemay <AT> gmail <DOT> com> CommitDate: Sun Jun 22 18:49:27 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=901dfcb7
zarith no longer asks ocamlc for libdir --- dev-ml/zarith/zarith-1.2.1.ebuild | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/dev-ml/zarith/zarith-1.2.1.ebuild b/dev-ml/zarith/zarith-1.2.1.ebuild index 2822592..90b5183 100644 --- a/dev-ml/zarith/zarith-1.2.1.ebuild +++ b/dev-ml/zarith/zarith-1.2.1.ebuild @@ -2,7 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI=4 +EAPI=5 + +inherit eutils findlib multilib DESCRIPTION="The Zarith library implements arithmetic and logical operations over arbitrary-precision integers" HOMEPAGE="http://forge.ocamlcore.org/projects/zarith" @@ -11,12 +13,11 @@ SRC_URI="http://forge.ocamlcore.org/frs/download.php/1199/${P}.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="+ocamlopt" - -OCAMLDIR=`ocamlc -where` +IUSE="+ocamlopt doc mpir" DEPEND=">=dev-lang/ocaml-3.12.1[ocamlopt?] - dev-libs/gmp" + !mpir? ( dev-libs/gmp ) + mpir? ( sci-libs/mpir )" RDEPEND="${DEPEND}" src_prepare(){ @@ -24,17 +25,21 @@ src_prepare(){ } src_configure(){ - ./configure -installdir "${D}${OCAMLDIR}" || die "configure failed" + MY_OPTS="-ocamllibdir /usr/$(get_libdir) -installdir ${D}/usr/$(get_libdir)/ocaml" + use mpir && MY_OPTS="${MY_OPTS} -mpir" + ./configure ${MY_OPTS}|| die || die "configure failed" } src_compile(){ emake || die "emake failed" + use doc && emake doc || die "emake doc failed" } src_install(){ - mkdir -p "${D}${OCAMLDIR}" - cp "${OCAMLDIR}/ld.conf" "${D}${OCAMLDIR}/ld.conf" + findlib_src_preinst + cp /usr/$(get_libdir)/ocaml/ld.conf ${D}/usr/$(get_libdir)/ocaml/ld.conf emake install || die "emake install failed" - rm "${D}${OCAMLDIR}/ld.conf" + rm -f ${D}/usr/$(get_libdir)/ocaml/ld.conf dodoc Changes README + use doc && dodoc -r html/ }