SHA256
3
0
forked from pool/mpc

Accepting request 20998 from devel:libraries:c_c++

Copy from devel:libraries:c_c++/mpc based on submit request 20998 from user rguenther

OBS-URL: https://build.opensuse.org/request/show/20998
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mpc?expand=0&rev=4
This commit is contained in:
OBS User autobuild 2009-09-24 22:50:11 +00:00 committed by Git OBS Bridge
parent 019764360d
commit bddff8b435
6 changed files with 22 additions and 135 deletions

View File

@ -1,3 +1,3 @@
libmpc1
libmpc2
libmpc-devel
requires "libmpc1-<targettype> = <version>"
requires "libmpc2-<targettype> = <version>"

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cd55a151a77a0ae0d76f3bd2fd8cf5af6fce3053cd6d5caf417fe70647158a75
size 434166

3
mpc-0.7.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10a3eabfba548edfc43d6ad35e3e0a00bfa934ffccf62c9a8435a9a0aa01d97f
size 444045

View File

@ -1,117 +0,0 @@
Index: src/norm.c
===================================================================
--- src/norm.c (revision 529)
+++ src/norm.c (revision 530)
@@ -30,15 +30,15 @@ mpc_norm (mpfr_ptr a, mpc_srcptr b, mp_r
prec = MPFR_PREC(a);
- mpfr_init (u);
- mpfr_init (v);
-
/* handling of special values; consistent with abs in that
norm = abs^2; so norm (+-inf, nan) = norm (nan, +-inf) = +inf */
if ( (mpfr_nan_p (MPC_RE (b)) || mpfr_nan_p (MPC_IM (b)))
|| (mpfr_inf_p (MPC_RE (b)) || mpfr_inf_p (MPC_IM (b))))
return mpc_abs (a, b, rnd);
+ mpfr_init (u);
+ mpfr_init (v);
+
if (!mpfr_zero_p(MPC_RE(b)) && !mpfr_zero_p(MPC_IM(b)) &&
2 * SAFE_ABS (mp_exp_t, MPFR_EXP (MPC_RE (b)) - MPFR_EXP (MPC_IM (b)))
> (mp_exp_t)prec)
Index: src/inp_str.c
===================================================================
--- src/inp_str.c (revision 529)
+++ src/inp_str.c (revision 530)
@@ -1,6 +1,6 @@
/* mpc_inp_str -- Input a complex number from a given stream.
-Copyright (C) 2009 Andreas Enge, Philippe Th\'eveny, Paul Zimmermann.
+Copyright (C) 2009 Andreas Enge, Philippe Th\'eveny, Paul Zimmermann
This file is part of the MPC Library.
@@ -80,6 +80,7 @@ extract_string (FILE *stream)
size_t nread = 0;
size_t strsize = 100;
char *str = mpc_alloc_str (strsize);
+ size_t lenstr;
c = getc (stream);
while (c != EOF && c != '\n'
@@ -101,6 +102,8 @@ extract_string (FILE *stream)
if (nread == 0)
return str;
+ lenstr = nread;
+
if (c == '(') {
size_t n;
char *suffix;
@@ -127,7 +130,7 @@ extract_string (FILE *stream)
strsize = nread + 1;
}
- n = sprintf (str, "%s(%s", str, suffix);
+ n = lenstr + sprintf (str + lenstr, "(%s", suffix);
MPC_ASSERT (n == nread);
c = getc (stream);
@@ -151,7 +154,9 @@ extract_string (FILE *stream)
int
-mpc_inp_str (mpc_ptr rop, FILE *stream, size_t *read, int base, mpc_rnd_t rnd_mode) {
+mpc_inp_str (mpc_ptr rop, FILE *stream, size_t *read, int base,
+mpc_rnd_t rnd_mode)
+{
size_t white, nread = 0;
int inex = -1;
int c;
Index: tests/random.c
===================================================================
--- tests/random.c (revision 529)
+++ tests/random.c (revision 530)
@@ -96,6 +96,7 @@ test_end (void)
rands_initialized = 0;
gmp_randclear (rands);
}
+ mpfr_free_cache ();
}
/* wrapper for gmp_urandomb_ui, which did not exist in old versions of GMP */
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am (revision 529)
+++ tests/Makefile.am (revision 530)
@@ -3,19 +3,19 @@ AM_CFLAGS=@WARNINGCFLAGS@
AM_CPPFLAGS = -I$(top_srcdir)/src
LDADD = libmpc-tests.la $(top_builddir)/src/libmpc.la
-check_PROGRAMS = tio_str tabs tadd tadd_fr tadd_ui targ tconj tcos tcosh tdiv \
-tdiv_2exp tdiv_fr tdiv_ui texp tfr_div tfr_sub tget_version timag tlog tmul \
-tmul_2exp tmul_fr tmul_i tmul_si tmul_ui tneg tnorm tprec tproj treal tset \
-tsin tsinh tsqr tsqrt tstrtoc tsub tsub_fr tsub_ui ttan ttanh tui_div \
+check_PROGRAMS = tio_str tabs tadd tadd_fr tadd_ui targ tconj tcos tcosh tdiv \
+tdiv_2exp tdiv_fr tdiv_ui texp tfr_div tfr_sub tget_version timag tlog tmul \
+tmul_2exp tmul_fr tmul_i tmul_si tmul_ui tneg tnorm tprec tproj treal tset \
+tsin tsinh tsqr tsqrt tstrtoc tsub tsub_fr tsub_ui ttan ttanh tui_div \
tui_ui_sub treimref
check_LTLIBRARIES=libmpc-tests.la
-libmpc_tests_la_SOURCES=mpc-tests.h random.c tgeneric.c read_data.c \
+libmpc_tests_la_SOURCES=mpc-tests.h random.c tgeneric.c read_data.c \
comparisons.c
-EXTRA_DIST = abs.dat add.dat add_fr.dat arg.dat conj.dat cos.dat cosh.dat \
-div.dat div_fr.dat exp.dat fr_div.dat fr_sub.dat inp_str.dat log.dat mul.dat \
-mul_fr.dat neg.dat norm.dat proj.dat sin.dat sinh.dat sqr.dat sqrt.dat \
+EXTRA_DIST = abs.dat add.dat add_fr.dat arg.dat conj.dat cos.dat cosh.dat \
+div.dat div_fr.dat exp.dat fr_div.dat fr_sub.dat inp_str.dat log.dat mul.dat \
+mul_fr.dat neg.dat norm.dat proj.dat sin.dat sinh.dat sqr.dat sqrt.dat \
strtoc.dat sub.dat sub_fr.dat tan.dat tanh.dat
TESTS = $(check_PROGRAMS)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Sep 11 12:18:44 CEST 2009 - rguenther@suse.de
- Update to version 0.7.
* Bumps SONAME to libmpc.so.2.
-------------------------------------------------------------------
Mon Jul 13 11:27:10 CEST 2009 - rguenther@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package mpc (Version 0.6)
# spec file for package mpc (Version 0.7)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -17,19 +17,18 @@
# norootforbuild
%define debug_package_requires libmpc1 = %{version}-%{release}
%define debug_package_requires libmpc2 = %{version}-%{release}
Name: mpc
BuildRequires: gmp-devel mpfr-devel
License: LGPL v2.1 or later
Group: Development/Libraries/C and C++
AutoReqProv: on
Version: 0.6
Release: 4
Version: 0.7
Release: 1
Summary: MPC multiple-precision complex shared library
Url: http://www.multiprecision.org/mpc/
Source: mpc-%{version}.tar.bz2
Patch: mpc-r530.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -39,13 +38,13 @@ built upon and follows the same principles as MPFR.
%package -n libmpc1
%package -n libmpc2
License: LGPL v2.1 or later
Summary: MPC multiple-precision complex shared library
Group: Development/Libraries/C and C++
AutoReqProv: on
%description -n libmpc1
%description -n libmpc2
MPC is a C library for the arithmetic of complex numbers with
arbitrarily high precision and correct rounding of the result. It is
built upon and follows the same principles as MPFR.
@ -56,7 +55,7 @@ built upon and follows the same principles as MPFR.
License: LGPL v2.1 or later
Summary: MPC multiple-precision complex library development files
Group: Development/Libraries/C and C++
Requires: libmpc1 = %{version} mpfr-devel
Requires: libmpc2 = %{version} mpfr-devel
AutoReqProv: on
PreReq: %install_info_prereq
@ -67,7 +66,6 @@ MPC multiple-precision complex library development files.
%prep
%setup -q
%patch
%build
%configure
@ -80,12 +78,12 @@ make check %{?jobs:-j%jobs}
%makeinstall
rm $RPM_BUILD_ROOT%{_libdir}/libmpc.la
%post -n libmpc1 -p /sbin/ldconfig
%post -n libmpc2 -p /sbin/ldconfig
%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun -n libmpc1 -p /sbin/ldconfig
%postun -n libmpc2 -p /sbin/ldconfig
%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
@ -93,9 +91,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/libmpc.la
%clean
rm -rf $RPM_BUILD_ROOT
%files -n libmpc1
%files -n libmpc2
%defattr(-,root,root)
%{_libdir}/libmpc.so.1*
%{_libdir}/libmpc.so.2*
%files devel
%defattr(-,root,root)