From a8da29dd2629ed64d8531f665f9faf40439dd8e6 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 22 Jan 2020 15:29:11 -0700 Subject: [PATCH] Add -gc patch to fix FTBFS with OCaml 4.10. --- ocaml-base-gc.patch | 15 +++++++++++++++ ocaml-base.spec | 8 +++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ocaml-base-gc.patch diff --git a/ocaml-base-gc.patch b/ocaml-base-gc.patch new file mode 100644 index 0000000..5f42d9e --- /dev/null +++ b/ocaml-base-gc.patch @@ -0,0 +1,15 @@ +--- a/src/exn_stubs.c ++++ b/src/exn_stubs.c +@@ -1,7 +1,12 @@ + #include ++#include ++ ++#if OCAML_VERSION < 41000 + + extern int caml_backtrace_pos; + ++#endif ++ + CAMLprim value Base_clear_caml_backtrace_pos () { + caml_backtrace_pos = 0; + return Val_unit; diff --git a/ocaml-base.spec b/ocaml-base.spec index 56c4661..41dad87 100644 --- a/ocaml-base.spec +++ b/ocaml-base.spec @@ -17,6 +17,9 @@ Summary: Jane Street standard library for OCaml License: MIT URL: https://github.com/janestreet/%{srcname} Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz +# Fix failure to build with ocaml 4.10 +# https://github.com/janestreet/base/commit/dde0e6ecc22e8de29c3e2d030941b1c5edf476c6 +Patch0: %{name}-gc.patch BuildRequires: ocaml >= 4.04.2 BuildRequires: ocaml-dune-devel >= 1.5.1 @@ -43,7 +46,7 @@ The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep -%autosetup -n %{srcname}-%{version} +%autosetup -n %{srcname}-%{version} -p1 %build dune build %{?_smp_mflags} @@ -119,6 +122,9 @@ find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+ %{_libdir}/ocaml/%{srcname}/*/*.mli %changelog +* Wed Jan 22 2020 Jerry James - 0.13.0-3 +- Add -gc patch to fix FTBFS with OCaml 4.10 + * Sun Jan 19 2020 Richard W.M. Jones - 0.13.0-3 - OCaml 4.10.0+beta1 rebuild.