# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 inherit eutils DESCRIPTION="A source-based package manager for OCaml" HOMEPAGE="http://opam.ocaml.org/" LICENSE="LGPL-3-with-linking-exception" SLOT="0/${PV}" KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" IUSE="test" if [[ ${PV} != 9999 ]]; then SRC_URI="https://github.com/ocaml/${PN}/releases/download/${PV}/${PN}-full-${PV}.tar.gz" else inherit git-r3 EGIT_REPO_URI="https://github.com/ocaml/opam.git" fi S="${WORKDIR}/${PN}-full-${PV}" RDEPEND=">=dev-lang/ocaml-4.02.3" DEPEND="${RDEPEND}" src_configure() { econf --prefix="/usr" --with-mccs make lib-ext } src_compile() { #passing -jX to the dune build leads to errors make } src_install() { emake DESTDIR="${D}" install #remove spurious opam-installer files #see: https://github.com/ocaml/opam/issues/3711 rm -r "${D}usr/doc/opam-installer" "${D}usr/lib/opam-installer" rmdir "${D}usr/doc" "${D}usr/lib" dodoc README.md CHANGES AUTHORS CONTRIBUTING.md }