From 6e8cb67ebdafac9c72eee9983cbd4a88b2cbf266 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Tue, 1 Mar 2016 20:55:07 +0100 Subject: [PATCH] dev-ml/camlzip: fix build with ocaml 4.03 Package-Manager: portage-2.2.27 Signed-off-by: Alexis Ballier --- dev-ml/camlzip/camlzip-1.05.ebuild | 4 ++++ dev-ml/camlzip/files/ocaml-4.03.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 dev-ml/camlzip/files/ocaml-4.03.patch diff --git a/dev-ml/camlzip/camlzip-1.05.ebuild b/dev-ml/camlzip/camlzip-1.05.ebuild index 73d097ab0407..bbd81fc810e5 100644 --- a/dev-ml/camlzip/camlzip-1.05.ebuild +++ b/dev-ml/camlzip/camlzip-1.05.ebuild @@ -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 index 000000000000..49822426d8a3 --- /dev/null +++ b/dev-ml/camlzip/files/ocaml-4.03.patch @@ -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))); + } -- 2.26.2