[ocaml-gettext] Rebuild for OCaml 4.02.0.

Richard W.M. Jones rjones at fedoraproject.org
Tue Jul 15 16:05:38 UTC 2014


commit 5eb7ac5fcf216d5164fd29a42edaad83722aceac
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Jul 15 17:01:19 2014 +0100

    Rebuild for OCaml 4.02.0.

 ...at-Use-Pervasives.format_of_string-instea.patch |   26 ++++++++++++++++++++
 ocaml-gettext.spec                                 |    9 ++++++-
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/0001-gettextCompat-Use-Pervasives.format_of_string-instea.patch b/0001-gettextCompat-Use-Pervasives.format_of_string-instea.patch
new file mode 100644
index 0000000..d7e5bbe
--- /dev/null
+++ b/0001-gettextCompat-Use-Pervasives.format_of_string-instea.patch
@@ -0,0 +1,26 @@
+From 9cc38ee61f2ae03e79a2ee7f72719783c29c6eac Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones at redhat.com>
+Date: Tue, 15 Jul 2014 15:58:49 +0000
+Subject: [PATCH] gettextCompat: Use Pervasives.format_of_string instead of
+ Obj.magic.
+
+---
+ libgettext-ocaml/gettextCompat.ml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libgettext-ocaml/gettextCompat.ml b/libgettext-ocaml/gettextCompat.ml
+index 1a8ac44..08f00d5 100644
+--- a/libgettext-ocaml/gettextCompat.ml
++++ b/libgettext-ocaml/gettextCompat.ml
+@@ -25,7 +25,7 @@ open GettextCategory;;
+ open GettextModules;;
+ 
+ let unsafe_format_of_string fmt str = 
+-  if true then
++  if false then
+     Obj.magic str
+   else
+     format_of_string fmt
+-- 
+2.0.1
+
diff --git a/ocaml-gettext.spec b/ocaml-gettext.spec
index 5d02628..f736f7b 100644
--- a/ocaml-gettext.spec
+++ b/ocaml-gettext.spec
@@ -2,7 +2,7 @@
 
 Name:           ocaml-gettext
 Version:        0.3.4
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        OCaml library for i18n
 
 License:        LGPLv2+ with exceptions
@@ -12,6 +12,9 @@ ExcludeArch:    sparc64 s390 s390x
 Source0:        http://forge.ocamlcore.org/frs/download.php/676/ocaml-gettext-%{version}.tar.gz
 
 Patch1:         ocaml-gettext-0.3.4-use-ocamlopt-g.patch
+# Fix for segfault which only happens with OCaml >= 4.02.0.
+# The bug was found on aarch64, but affects _all_ architectures.
+Patch2:         0001-gettextCompat-Use-Pervasives.format_of_string-instea.patch
 
 BuildRequires:  ocaml >= 4.00.1
 BuildRequires:  ocaml-findlib-devel >= 1.3.3-3
@@ -90,6 +93,7 @@ signature files for developing applications that use
 %setup -q
 
 %patch1 -p1
+%patch2 -p1
 
 
 %build
@@ -198,6 +202,9 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
 
 
 %changelog
+* Tue Jul 15 2014 Richard W.M. Jones <rjones at redhat.com> - 0.3.4-13
+- Rebuild for OCaml 4.02.0.
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.4-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list