Add -32bit patch to fix build on 32-bit platforms.
This commit is contained in:
parent
03d2e8821a
commit
60bdd770d3
11
ocaml-mlmpfr-32bit.patch
Normal file
11
ocaml-mlmpfr-32bit.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/mlmpfr_stubs.c.orig 2019-11-03 01:49:34.000000000 -0700
|
||||
+++ src/mlmpfr_stubs.c 2020-03-25 10:57:18.279258620 -0600
|
||||
@@ -39,7 +39,7 @@ precision_in_range (value prec)
|
||||
int p = Int_val (prec);
|
||||
|
||||
if (p <= Int_val (caml_mpfr_prec_min ())
|
||||
- || p >= Int_val (caml_mpfr_prec_max ()))
|
||||
+ || p >= Unsigned_int_val (caml_mpfr_prec_max ()))
|
||||
caml_raise_with_arg (*caml_named_value ("precision range exception"),
|
||||
Val_int (p));
|
||||
}
|
@ -8,6 +8,8 @@ Summary: OCaml bindings for MPFR
|
||||
License: LGPLv3
|
||||
URL: https://github.com/thvnx/%{srcname}
|
||||
Source0: %{url}/archive/%{srcname}.%{version}-dune.tar.gz
|
||||
# Fix integer overflow on 32-bit architectures
|
||||
Patch0: %{name}-32bit.patch
|
||||
|
||||
BuildRequires: ocaml >= 4.04
|
||||
BuildRequires: ocaml-dune >= 1.11.0
|
||||
@ -34,7 +36,7 @@ BuildArch: noarch
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{srcname}.%{version}-dune
|
||||
%autosetup -n %{srcname}-%{srcname}.%{version}-dune -p0
|
||||
|
||||
%build
|
||||
dune build %{?_smp_mflags}
|
||||
|
Loading…
Reference in New Issue
Block a user