dev-ml/camlzip: fix build with ocaml 4.03
authorAlexis Ballier <aballier@gentoo.org>
Tue, 1 Mar 2016 19:55:07 +0000 (20:55 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Wed, 2 Mar 2016 19:29:06 +0000 (20:29 +0100)
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
dev-ml/camlzip/camlzip-1.05.ebuild
dev-ml/camlzip/files/ocaml-4.03.patch [new file with mode: 0644]

index 73d097ab0407b4fbe009552148eee4952833a039..bbd81fc810e54e994b640413cd1ec056f6489abe 100644 (file)
@@ -20,6 +20,10 @@ RDEPEND=">=dev-lang/ocaml-3.10.2:=[ocamlopt?]
                >=sys-libs/zlib-1.1.3"
 DEPEND="${RDEPEND}"
 
+src_prepare() {
+       epatch "${FILESDIR}/ocaml-4.03.patch"
+}
+
 src_compile() {
        emake all
        if use ocamlopt; then
diff --git a/dev-ml/camlzip/files/ocaml-4.03.patch b/dev-ml/camlzip/files/ocaml-4.03.patch
new file mode 100644 (file)
index 0000000..4982242
--- /dev/null
@@ -0,0 +1,26 @@
+Index: camlzip-1.05/zip.ml
+===================================================================
+--- camlzip-1.05.orig/zip.ml
++++ camlzip-1.05/zip.ml
+@@ -73,8 +73,6 @@ type out_file =
+     mutable of_entries: entry list;
+     of_comment: string }
+-exception Error of string * string * string
+-
+ (* Return the position of the last occurrence of s1 in s2, or -1 if not
+    found. *)
+Index: camlzip-1.05/zlibstubs.c
+===================================================================
+--- camlzip-1.05.orig/zlibstubs.c
++++ camlzip-1.05/zlibstubs.c
+@@ -168,7 +168,7 @@ value camlzip_inflateEnd(value vzs)
+ value camlzip_update_crc32(value crc, value buf, value pos, value len)
+ {
+-  return caml_copy_int32(crc32((uint32) Int32_val(crc), 
++  return caml_copy_int32(crc32((uint32_t) Int32_val(crc), 
+                           &Byte_u(buf, Long_val(pos)),
+                           Long_val(len)));
+ }