[ocaml-mlgmpidl] - Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12). - Remove GMP_RND_MAX an
Richard W.M. Jones
rjones at fedoraproject.org
Mon Jan 10 14:24:30 UTC 2011
commit 5ecb4a454b3777abba937e37648e3071309c15fc
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Jan 10 14:23:45 2011 +0000
- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12).
- Remove GMP_RND_MAX and mpfr_random, both no longer in GMP/MPFR.
mlgmpidl-1.1-remove-random.patch | 69 ++++++++++++++++++++++++++++++++++++++
ocaml-mlgmpidl.spec | 17 +++++++--
2 files changed, 82 insertions(+), 4 deletions(-)
---
diff --git a/mlgmpidl-1.1-remove-random.patch b/mlgmpidl-1.1-remove-random.patch
new file mode 100644
index 0000000..d2bbb9e
--- /dev/null
+++ b/mlgmpidl-1.1-remove-random.patch
@@ -0,0 +1,69 @@
+diff -ur mlgmpidl.old/gmp_caml.h mlgmpidl.fix/gmp_caml.h
+--- mlgmpidl.old/gmp_caml.h 2007-07-11 14:29:31.000000000 +0100
++++ mlgmpidl.fix/gmp_caml.h 2011-01-10 14:14:56.749668553 +0000
+@@ -46,10 +46,18 @@
+ void camlidl_mpfr_ml2c(value val, __mpfr_struct* mpf);
+ static inline
+ value camlidl_mpfr_rnd_t_c2ml(mpfr_rnd_t* rnd)
+-{ assert(*rnd>=0 && *rnd<GMP_RND_MAX); return Val_int(*rnd); }
++{ assert(*rnd>=0
++#ifdef GMP_RND_MAX
++&& *rnd<GMP_RND_MAX
++#endif
++); return Val_int(*rnd); }
+ static inline
+ void camlidl_mpfr_rnd_t_ml2c(value val, mpfr_rnd_t* rnd)
+-{ *rnd = Int_val(val); assert(*rnd>=0 && *rnd<GMP_RND_MAX); }
++{ *rnd = Int_val(val); assert(*rnd>=0
++#ifdef GMP_RND_MAX
++&& *rnd<GMP_RND_MAX
++#endif
++); }
+ #endif
+ #endif
+
+diff -ur mlgmpidl.old/gmp_random_caml.c mlgmpidl.fix/gmp_random_caml.c
+--- mlgmpidl.old/gmp_random_caml.c 2009-04-02 15:25:47.000000000 +0100
++++ mlgmpidl.fix/gmp_random_caml.c 2011-01-10 14:18:18.629822324 +0000
+@@ -235,6 +235,7 @@
+ return Val_unit;
+ }
+
++#if 0
+ value camlidl_gmp_random_mpfr_random(
+ value _v_ROP)
+ {
+@@ -246,4 +247,4 @@
+ camlidl_free(_ctx);
+ return Val_unit;
+ }
+-
++#endif
+diff -ur mlgmpidl.old/gmp_random.ml mlgmpidl.fix/gmp_random.ml
+--- mlgmpidl.old/gmp_random.ml 2009-04-02 15:25:47.000000000 +0100
++++ mlgmpidl.fix/gmp_random.ml 2011-01-10 14:18:41.993576806 +0000
+@@ -62,8 +62,10 @@
+ external urandomb : Mpfr.t -> state -> unit
+ = "camlidl_gmp_random_mpfr_urandomb"
+
++(*
+ external random : Mpfr.t -> unit
+ = "camlidl_gmp_random_mpfr_random"
++*)
+
+ end
+
+diff -ur mlgmpidl.old/gmp_random.mli mlgmpidl.fix/gmp_random.mli
+--- mlgmpidl.old/gmp_random.mli 2009-04-02 15:25:47.000000000 +0100
++++ mlgmpidl.fix/gmp_random.mli 2011-01-10 14:18:50.577221427 +0000
+@@ -62,8 +62,10 @@
+ external urandomb : Mpfr.t -> state -> unit
+ = "camlidl_gmp_random_mpfr_urandomb"
+
++(*
+ external random : Mpfr.t -> unit
+ = "camlidl_gmp_random_mpfr_random"
++*)
+
+ end
+
diff --git a/ocaml-mlgmpidl.spec b/ocaml-mlgmpidl.spec
index d62af53..de051c8 100644
--- a/ocaml-mlgmpidl.spec
+++ b/ocaml-mlgmpidl.spec
@@ -11,18 +11,24 @@
Name: ocaml-mlgmpidl
Version: 1.1
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: OCaml interface to GMP and MPFR libraries
Group: Development/Libraries
License: LGPLv2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+ExcludeArch: sparc64 s390 s390x
+
URL: http://www.inrialpes.fr/pop-art/people/bjeannet/mlxxxidl-forge/mlgmpidl/index.html
Source0: http://gforge.inria.fr/frs/download.php/20228/mlgmpidl-%{version}.tgz
Source1: mlgmpidl_test.ml
Source2: mlgmpidl_test_result
Source3: mlgmpidl-META
+
Patch0: mlgmpidl-1.1-Makefile.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-ExcludeArch: sparc64 s390 s390x
+
+# Remove GMP_RND_MAX and mpfr_random, both no longer in GMP/MPFR.
+Patch1: mlgmpidl-1.1-remove-random.patch
+
BuildRequires: ocaml >= 3.07, ocaml-ocamldoc, ocaml-camlidl-devel, gmp-devel, mpfr-devel, prelink
# BuildRequires for documentation build
BuildRequires: texlive-latex, texlive-texmf, ghostscript
@@ -60,6 +66,8 @@ cp %{SOURCE3} ./META
# Patch makefile to take custom locations for libraries and installing
%patch0
+%patch1 -p1
+
%build
mv Makefile.config.model Makefile.config
@@ -142,8 +150,9 @@ rm -rf %{buildroot}
%{_docdir}/%{name}
%changelog
-* Mon Jan 10 2011 Richard W.M. Jones <rjones at redhat.com> - 1.1-5
+* Mon Jan 10 2011 Richard W.M. Jones <rjones at redhat.com> - 1.1-6
- Rebuild for OCaml 3.12 (http://fedoraproject.org/wiki/Features/OCaml3.12).
+- Remove GMP_RND_MAX and mpfr_random, both no longer in GMP/MPFR.
* Wed Dec 30 2009 Richard W.M. Jones <rjones at redhat.com> - 1.1-4
- Rebuild for OCaml 3.11.2.
More information about the scm-commits
mailing list