commit:     3f421c70bf47c0daa31316723426d5571d681434
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  2 14:30:37 2016 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Wed Mar  2 19:29:06 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f421c70

dev-ml/camlpdf: fix build with ocaml 4.03

Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>

 dev-ml/camlpdf/camlpdf-2.1.1.ebuild |  6 +++++-
 dev-ml/camlpdf/files/ocaml43.patch  | 13 +++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/dev-ml/camlpdf/camlpdf-2.1.1.ebuild 
b/dev-ml/camlpdf/camlpdf-2.1.1.ebuild
index 8322666..8ba4979 100644
--- a/dev-ml/camlpdf/camlpdf-2.1.1.ebuild
+++ b/dev-ml/camlpdf/camlpdf-2.1.1.ebuild
@@ -4,7 +4,7 @@
 
 EAPI=5
 
-inherit findlib
+inherit findlib eutils
 
 DESCRIPTION="OCaml library for reading, writing, and modifying PDF files"
 HOMEPAGE="https://github.com/johnwhitington/camlpdf/";
@@ -19,6 +19,10 @@ IUSE="doc examples"
 RDEPEND="dev-lang/ocaml:="
 DEPEND="${RDEPEND}"
 
+src_prepare() {
+       epatch "${FILESDIR}/ocaml43.patch"
+}
+
 src_compile() {
        # parallel make bugs
        emake -j1

diff --git a/dev-ml/camlpdf/files/ocaml43.patch 
b/dev-ml/camlpdf/files/ocaml43.patch
new file mode 100644
index 0000000..86ffbe2
--- /dev/null
+++ b/dev-ml/camlpdf/files/ocaml43.patch
@@ -0,0 +1,13 @@
+Index: camlpdf-2.1.1/flatestubs.c
+===================================================================
+--- camlpdf-2.1.1.orig/flatestubs.c
++++ camlpdf-2.1.1/flatestubs.c
+@@ -170,7 +170,7 @@ value camlzip_inflateEnd(value vzs)
+ 
+ value camlzip_update_crc32(value crc, value buf, value pos, value len)
+ {
+-  return copy_int32(crc32((uint32) Int32_val(crc), 
++  return copy_int32(crc32((uint32_t) Int32_val(crc), 
+                           &Byte_u(buf, Long_val(pos)),
+                           Long_val(len)));
+ }

Reply via email to