This commit is contained in:
commit
b69e66862b
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
baselibs.conf
Normal file
3
baselibs.conf
Normal file
@ -0,0 +1,3 @@
|
||||
libmpc0
|
||||
libmpc-devel
|
||||
requires "libmpc0-<targettype> = <version>"
|
3
mpc-0.6.tar.bz2
Normal file
3
mpc-0.6.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cd55a151a77a0ae0d76f3bd2fd8cf5af6fce3053cd6d5caf417fe70647158a75
|
||||
size 434166
|
117
mpc-r530.patch
Normal file
117
mpc-r530.patch
Normal file
@ -0,0 +1,117 @@
|
||||
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)
|
||||
|
16
mpc.changes
Normal file
16
mpc.changes
Normal file
@ -0,0 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 19 17:49:15 CEST 2009 - rguenther@suse.de
|
||||
|
||||
- Add patch to fix testsuite failures with -D_FORTIFY_SOURCE=2.
|
||||
- Fix shlib package name.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 1 22:07:42 CEST 2009 - rguenther@suse.de
|
||||
|
||||
- Update to MPC version 0.6.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 15 20:25:00 CET 2009 - rguenther@suse.de
|
||||
|
||||
- Initial packaging of MPC version 0.5.2.
|
||||
|
115
mpc.spec
Normal file
115
mpc.spec
Normal file
@ -0,0 +1,115 @@
|
||||
#
|
||||
# spec file for package mpc (Version 0.6)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
%define debug_package_requires libmpc1 = %{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: 2
|
||||
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
|
||||
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.
|
||||
|
||||
|
||||
|
||||
%package -n libmpc1
|
||||
License: LGPL v2.1 or later
|
||||
Summary: MPC multiple-precision complex shared library
|
||||
Group: Development/Libraries/C and C++
|
||||
AutoReqProv: on
|
||||
|
||||
%description -n libmpc1
|
||||
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.
|
||||
|
||||
|
||||
|
||||
%package devel
|
||||
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
|
||||
AutoReqProv: on
|
||||
PreReq: %install_info_prereq
|
||||
|
||||
%description devel
|
||||
MPC multiple-precision complex library development files.
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?jobs:-j%jobs}
|
||||
|
||||
%check
|
||||
make check %{?jobs:-j%jobs}
|
||||
|
||||
%install
|
||||
%makeinstall
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/libmpc.la
|
||||
|
||||
%post -n libmpc1 -p /sbin/ldconfig
|
||||
|
||||
%post devel
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
||||
|
||||
%postun -n libmpc1 -p /sbin/ldconfig
|
||||
|
||||
%postun devel
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -n libmpc1
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libmpc.so.1*
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS NEWS COPYING.LIB
|
||||
%doc %{_infodir}/mpc.info.gz
|
||||
%{_libdir}/libmpc.a
|
||||
%{_libdir}/libmpc.so
|
||||
/usr/include/mpc.h
|
||||
|
||||
%changelog
|
||||
* Tue May 19 2009 rguenther@suse.de
|
||||
- Add patch to fix testsuite failures with -D_FORTIFY_SOURCE=2.
|
||||
- Fix shlib package name.
|
||||
* Wed Apr 01 2009 rguenther@suse.de
|
||||
- Update to MPC version 0.6.
|
||||
* Sun Mar 15 2009 rguenther@suse.de
|
||||
- Initial packaging of MPC version 0.5.2.
|
Loading…
Reference in New Issue
Block a user