commit:     46076d609969e34e68baa0250bd67d37365809e9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 21 00:39:03 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 21 02:09:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46076d60

dev-ml/opam: port to EAPI 7

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-ml/opam/files/stublibs.patch |  6 ++----
 dev-ml/opam/opam-1.3.1-r2.ebuild | 32 +++++++++++++++++---------------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/dev-ml/opam/files/stublibs.patch b/dev-ml/opam/files/stublibs.patch
index 3cb61883233..69fb02913b5 100644
--- a/dev-ml/opam/files/stublibs.patch
+++ b/dev-ml/opam/files/stublibs.patch
@@ -1,7 +1,5 @@
-Index: opam-1.3.1/src/tools/opam_installer.ml
-===================================================================
---- opam-1.3.1.orig/src/tools/opam_installer.ml
-+++ opam-1.3.1/src/tools/opam_installer.ml
+--- a/src/tools/opam_installer.ml
++++ b/src/tools/opam_installer.ml
 @@ -312,7 +312,7 @@ let options =
      let mandir = mk_dir mandir in
      let libdir = mk_dir libdir in

diff --git a/dev-ml/opam/opam-1.3.1-r2.ebuild b/dev-ml/opam/opam-1.3.1-r2.ebuild
index 097961fdd58..e1d225ca5e6 100644
--- a/dev-ml/opam/opam-1.3.1-r2.ebuild
+++ b/dev-ml/opam/opam-1.3.1-r2.ebuild
@@ -1,12 +1,16 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-
-inherit epatch
+EAPI=7
 
 DESCRIPTION="A source-based package manager for OCaml"
 HOMEPAGE="http://opam.ocaml.org/";
+if [[ ${PV} != 9999 ]] ; then
+       SRC_URI="https://github.com/ocaml/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+else
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/ocaml/opam.git";
+fi
 
 LICENSE="LGPL-3-with-linking-exception"
 SLOT="0/${PV}"
@@ -14,13 +18,6 @@ KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 
-if [[ ${PV} != 9999 ]]; then
-       SRC_URI="https://github.com/ocaml/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-else
-       inherit git-r3
-       EGIT_REPO_URI="https://github.com/ocaml/opam.git";
-fi
-
 RDEPEND="dev-lang/ocaml:=
        || ( net-misc/wget net-misc/curl )
        dev-ml/extlib:=
@@ -37,13 +34,14 @@ DEPEND="${RDEPEND}
        test? ( dev-vcs/git )
 "
 
-src_prepare() {
-       epatch "${FILESDIR}/stublibs.patch"
-}
+PATCHES=(
+       "${FILESDIR}"/stublibs.patch
+)
 
 src_compile() {
        emake -j1
-       cd doc
+
+       cd doc || die
        emake man
 }
 
@@ -53,5 +51,9 @@ src_test() {
 
 src_install() {
        default
-       emake DESTDIR="${D}" OPAMINSTALLER_FLAGS="--prefix=\"${ED}/usr\" 
--libdir=\"${D}/$(ocamlc -where)\"" libinstall
+
+       emake \
+               DESTDIR="${D}" \
+               OPAMINSTALLER_FLAGS="--prefix=\"${ED}/usr\" 
--libdir=\"${D}/$(ocamlc -where)\"" \
+               libinstall
 }

Reply via email to