dev-ml/ocamlpam: fix build with ocaml 4.04
authorAlexis Ballier <aballier@gentoo.org>
Tue, 29 Nov 2016 12:54:45 +0000 (13:54 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 29 Nov 2016 15:05:22 +0000 (16:05 +0100)
Package-Manager: portage-2.3.2

dev-ml/ocamlpam/files/ocaml404.patch [new file with mode: 0644]
dev-ml/ocamlpam/ocamlpam-1.1.ebuild

diff --git a/dev-ml/ocamlpam/files/ocaml404.patch b/dev-ml/ocamlpam/files/ocaml404.patch
new file mode 100644 (file)
index 0000000..4964edf
--- /dev/null
@@ -0,0 +1,12 @@
+Index: ocamlpam-1.1/pam_stubs.c
+===================================================================
+--- ocamlpam-1.1.orig/pam_stubs.c
++++ ocamlpam-1.1/pam_stubs.c
+@@ -57,6 +57,7 @@ static int converse(int nMsg, const stru
+       struct pam_response * local_responses;
+       caml_pam_handle * h;
++      CAMLparam0 ();
+       CAMLlocal1(ret);
+       h = (caml_pam_handle *)data;
index b2b67cd9ac26d9da21892eedc4f49c98d2e90950..79a0e96e92306095a422148b2804e835d8293918 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -21,6 +21,7 @@ RDEPEND="${DEPEND}"
 
 src_prepare() {
        epatch "${FILESDIR}/${P}-makefile.patch"
+       has_version '>=dev-lang/ocaml-4.04_beta' && epatch "${FILESDIR}/ocaml404.patch"
 }
 
 src_compile() {