From 2dca0a50aa85f54c1c5c01ac8670599105818b0669a69603cd27353ae51e37e8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 2 Nov 2024 23:31:26 +0100 Subject: [PATCH] Add 0001-incorret-types-corrected.patch --- 0001-incorret-types-corrected.patch | 60 +++++++++++++++++++++++++++++ mpfi.changes | 5 +++ mpfi.spec | 16 ++++---- 3 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 0001-incorret-types-corrected.patch diff --git a/0001-incorret-types-corrected.patch b/0001-incorret-types-corrected.patch new file mode 100644 index 0000000..474c719 --- /dev/null +++ b/0001-incorret-types-corrected.patch @@ -0,0 +1,60 @@ +From a02e3f9cc10767cc4284a2ef6554f6df85e41982 Mon Sep 17 00:00:00 2001 +From: REVOL Nathalie +Date: Sat, 19 Mar 2022 18:09:45 +0100 +Subject: [PATCH] incorret types: corrected + +--- + mpfi/src/div_ext.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/mpfi/src/div_ext.c b/mpfi/src/div_ext.c +index 30cd3db..f1e5c2d 100644 +--- a/src/div_ext.c ++++ b/src/div_ext.c +@@ -59,17 +59,17 @@ mpfi_div_ext (mpfi_ptr res1, mpfi_ptr res2, mpfi_srcptr op1, mpfi_srcptr op2) + mpfr_init2 (tmp1, mpfi_get_prec(res1)); + mpfr_init2 (tmp2, mpfi_get_prec(res2)); + if ( mpfr_number_p (&(op2->left)) ) { +- tmp = mpfr_div (&(tmp2), &(op1->right), &(op2->left), MPFI_RNDD); ++ tmp = mpfr_div (tmp2, &(op1->right), &(op2->left), MPFI_RNDD); + } + else { /* denominator has infinite left endpoint */ +- mpfr_set_zero (&(tmp2), 1); ++ mpfr_set_zero (tmp2, 1); + } + + if ( mpfr_number_p (&(op2->right)) ) { +- tmp = mpfr_div ( &(tmp1), &(op1->right), &(op2->right), MPFI_RNDU); ++ tmp = mpfr_div ( tmp1, &(op1->right), &(op2->right), MPFI_RNDU); + } + else { /* denominator has infinite right endpoint */ +- mpfr_set_zero( &(tmp1), -1); ++ mpfr_set_zero( tmp1, -1); + } + + mpfr_set_inf (&(res1->left), -1); +@@ -86,17 +86,17 @@ mpfi_div_ext (mpfi_ptr res1, mpfi_ptr res2, mpfi_srcptr op1, mpfi_srcptr op2) + mpfr_init2 (tmp1, mpfi_get_prec(res1)); + mpfr_init2 (tmp2, mpfi_get_prec(res2)); + if ( mpfr_number_p (&(op2->left)) ) { +- tmp = mpfr_div (&(tmp1), &(op1->left), &(op2->left), MPFI_RNDU); ++ tmp = mpfr_div (tmp1, &(op1->left), &(op2->left), MPFI_RNDU); + } + else { /* denominator has infinite left endpoint */ +- mpfr_set_zero (&(tmp1), -1); ++ mpfr_set_zero (tmp1, -1); + } + + if ( mpfr_number_p (&(op2->right)) ) { +- tmp = mpfr_div ( &(tmp2), &(op1->left), &(op2->right), MPFI_RNDD); ++ tmp = mpfr_div ( tmp2, &(op1->left), &(op2->right), MPFI_RNDD); + } + else { /* denominator has infinite right endpoint */ +- mpfr_set_zero( &(tmp2), 1); ++ mpfr_set_zero( tmp2, 1); + } + mpfr_set_inf (&(res1->left), -1); + mpfr_set (&(res1->right), tmp1, MPFI_RNDU); +-- +2.47.0 + diff --git a/mpfi.changes b/mpfi.changes index ff993bc..f18dbb1 100644 --- a/mpfi.changes +++ b/mpfi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Nov 2 22:31:23 UTC 2024 - Jan Engelhardt + +- Add 0001-incorret-types-corrected.patch + ------------------------------------------------------------------- Sat Aug 24 20:24:49 UTC 2019 - Jan Engelhardt diff --git a/mpfi.spec b/mpfi.spec index a285f9b..460aa8a 100644 --- a/mpfi.spec +++ b/mpfi.spec @@ -23,11 +23,11 @@ Release: 0 Summary: Multi-precision floating-point interval arithmetic computation library License: LGPL-2.1-or-later Group: Productivity/Scientific/Math -URL: http://mpfi.gforge.inria.fr/ - -#SVN-Clone: svn://scm.gforge.inria.fr/svnroot/mpfi/trunk -# Download depends on the file ID, not the filename! -Source: https://gforge.inria.fr/frs/download.php/file/38111/mpfi-1.5.4.tgz +URL: https://gitlab.inria.fr/mpfi/mpfi +# gforge is gone and replaced by gitlab; tarballs apparently not retained +#Source: https://gforge.inria.fr/frs/download.php/file/38111/mpfi-1.5.4.tgz +Source: %name-%version.tgz +Patch1: 0001-incorret-types-corrected.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gmp-devel >= 4.1.0 @@ -77,7 +77,7 @@ This subpackage provides the development headers and libraries for it. %build ./autogen.sh %configure --disable-static -make %{?_smp_mflags} +%make_build %install %make_install @@ -86,8 +86,7 @@ rm -f "%buildroot/%_libdir"/*.la %check #make check #upstream broke it in 1.5.4 -%post -n %lname -p /sbin/ldconfig -%postun -n %lname -p /sbin/ldconfig +%ldconfig_scriptlets -n %lname %post devel %install_info --info-dir="%_infodir" "%_infodir/mpfi.info.gz" @@ -102,5 +101,6 @@ rm -f "%buildroot/%_libdir"/*.la %_includedir/mpfi*.h %_libdir/libmpfi.so %_infodir/mpfi.info* +%license COPYING* %changelog