From 2011417b828b8879cd703e75714cb32fc765661b Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Nov 17 2017 17:31:27 +0000 Subject: Use -unsafe-string. When we finally move to the latest sexplib we can drop this. --- diff --git a/ocaml-sexplib.spec b/ocaml-sexplib.spec index 2c47df3..50ec514 100644 --- a/ocaml-sexplib.spec +++ b/ocaml-sexplib.spec @@ -15,6 +15,9 @@ Source0: http://forge.ocamlcore.org/frs/download.php/%{dlnode}/sexplib-%{ # Fix ocamlbuild for ocaml 4.00.0. Patch1: sexplib-7.0.5-patch-ocamlbuild-ocaml4.patch +# Use -unsafe-string for OCaml 4.06. +Patch2: sexplib-7.0.5-unsafe-string.patch + BuildRequires: ocaml >= 3.12.0 BuildRequires: ocaml-ocamlbuild BuildRequires: ocaml-findlib-devel @@ -62,6 +65,7 @@ ocaml setup.ml -configure --prefix %{_prefix} \ --destdir $RPM_BUILD_ROOT %patch1 -p1 +%patch2 -p1 %build diff --git a/sexplib-7.0.5-unsafe-string.patch b/sexplib-7.0.5-unsafe-string.patch new file mode 100644 index 0000000..322688b --- /dev/null +++ b/sexplib-7.0.5-unsafe-string.patch @@ -0,0 +1,13 @@ +--- sexplib-7.0.5.old/myocamlbuild.ml 2017-11-17 17:21:13.878934029 +0000 ++++ sexplib-7.0.5/myocamlbuild.ml 2017-11-17 17:30:04.133960027 +0000 +@@ -269,8 +269,8 @@ + (* by using Before_options one let command line options have an higher priority *) + (* on the contrary using After_options will guarantee to have the higher priority *) + (* override default commands by ocamlfind ones *) +- Options.ocamlc := ocamlfind & A"ocamlc"; +- Options.ocamlopt := ocamlfind & A"ocamlopt"; ++ Options.ocamlc := ocamlfind & S[A"ocamlc"; A"-unsafe-string"]; ++ Options.ocamlopt := ocamlfind & S[A"ocamlopt"; A"-unsafe-string"]; + Options.ocamldep := ocamlfind & A"ocamldep"; + Options.ocamldoc := ocamlfind & A"ocamldoc"; + Options.ocamlmktop := ocamlfind & A"ocamlmktop"