commit:     0bbc4e6a7a140940603c94759da42b785832bdd4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 21 00:04:32 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 21 02:09:21 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bbc4e6a

dev-ml/camlidl: port to EAPI 7

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

 dev-ml/camlidl/camlidl-1.05-r1.ebuild | 19 ++++++++++---------
 dev-ml/camlidl/files/includes.patch   |  6 ++----
 dev-ml/camlidl/files/nowarn.patch     |  6 ++----
 dev-ml/camlidl/files/tests.patch      |  6 ++----
 4 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/dev-ml/camlidl/camlidl-1.05-r1.ebuild 
b/dev-ml/camlidl/camlidl-1.05-r1.ebuild
index 667d456641f..06fafb20cc4 100644
--- a/dev-ml/camlidl/camlidl-1.05-r1.ebuild
+++ b/dev-ml/camlidl/camlidl-1.05-r1.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-inherit epatch toolchain-funcs
+inherit toolchain-funcs
 
 DESCRIPTION="CamlIDL is a stub code generator for using C/C++ libraries from 
O'Caml"
 HOMEPAGE="http://caml.inria.fr/camlidl/";
@@ -16,15 +16,15 @@ KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux"
 DEPEND=">=dev-lang/ocaml-3.10.2:=[ocamlopt]"
 RDEPEND="${DEPEND}"
 
-src_prepare() {
-       epatch "${FILESDIR}/tests.patch"
-       epatch "${FILESDIR}/includes.patch"
-       epatch "${FILESDIR}/nowarn.patch"
-}
+PATCHES=(
+       "${FILESDIR}/tests.patch"
+       "${FILESDIR}/includes.patch"
+       "${FILESDIR}/nowarn.patch"
+)
 
 src_compile() {
        # Use the UNIX makefile
-       libdir=$(ocamlc -where)
+       libdir=$(ocamlc -where || die)
 
        sed -i -e "s|OCAMLLIB=.*|OCAMLLIB=${libdir}|" config/Makefile.unix || 
die
        sed -i -e "s|BINDIR=.*|BINDIR=${EPREFIX}/usr/bin|" config/Makefile.unix 
|| die
@@ -41,8 +41,9 @@ src_test() {
 }
 
 src_install() {
-       libdir=$(ocamlc -where)
+       libdir=$(ocamlc -where || die)
        dodir ${libdir#${EPREFIX}}/caml
+
        dodir /usr/bin
        # Install
        emake BINDIR="${ED}/usr/bin" OCAMLLIB="${D}${libdir}" install

diff --git a/dev-ml/camlidl/files/includes.patch 
b/dev-ml/camlidl/files/includes.patch
index 060aceefd0a..077ba21d93d 100644
--- a/dev-ml/camlidl/files/includes.patch
+++ b/dev-ml/camlidl/files/includes.patch
@@ -1,7 +1,5 @@
-Index: camlidl-1.05/runtime/comerror.c
-===================================================================
---- camlidl-1.05.orig/runtime/comerror.c
-+++ camlidl-1.05/runtime/comerror.c
+--- a/runtime/comerror.c
++++ b/runtime/comerror.c
 @@ -22,6 +22,7 @@
  #include <caml/callback.h>
  #include <caml/fail.h>

diff --git a/dev-ml/camlidl/files/nowarn.patch 
b/dev-ml/camlidl/files/nowarn.patch
index 8b457cf7ed1..3d9a5bbbf8a 100644
--- a/dev-ml/camlidl/files/nowarn.patch
+++ b/dev-ml/camlidl/files/nowarn.patch
@@ -1,7 +1,5 @@
-Index: camlidl-1.05/compiler/Makefile
-===================================================================
---- camlidl-1.05.orig/compiler/Makefile
-+++ camlidl-1.05/compiler/Makefile
+--- a/compiler/Makefile
++++ b/compiler/Makefile
 @@ -29,7 +29,7 @@ PROG=camlidl$(EXE)
  all: $(PROG)
  

diff --git a/dev-ml/camlidl/files/tests.patch b/dev-ml/camlidl/files/tests.patch
index f7272424be8..f8c4595f9fb 100644
--- a/dev-ml/camlidl/files/tests.patch
+++ b/dev-ml/camlidl/files/tests.patch
@@ -1,7 +1,5 @@
-Index: camlidl-1.05/tests/unix.idl
-===================================================================
---- camlidl-1.05.orig/tests/unix.idl
-+++ camlidl-1.05/tests/unix.idl
+--- a/tests/unix.idl
++++ b/tests/unix.idl
 @@ -15,16 +15,16 @@ quote (C, "
  
    union process_status { int code; };

Reply via email to