Add -gc patch to fix FTBFS with OCaml 4.10.

This commit is contained in:
Jerry James 2020-01-22 15:29:11 -07:00
parent 3328498a72
commit a8da29dd26
2 changed files with 22 additions and 1 deletions

15
ocaml-base-gc.patch Normal file
View File

@ -0,0 +1,15 @@
--- a/src/exn_stubs.c
+++ b/src/exn_stubs.c
@@ -1,7 +1,12 @@
#include <caml/mlvalues.h>
+#include <caml/version.h>
+
+#if OCAML_VERSION < 41000
extern int caml_backtrace_pos;
+#endif
+
CAMLprim value Base_clear_caml_backtrace_pos () {
caml_backtrace_pos = 0;
return Val_unit;

View File

@ -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 <loganjerry@gmail.com> - 0.13.0-3
- Add -gc patch to fix FTBFS with OCaml 4.10
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 0.13.0-3
- OCaml 4.10.0+beta1 rebuild.