- Fix LDXXFLAGS (thank you Stefan Krah for providing the patch)
OBS-URL: https://build.opensuse.org/package/show/science/mpdecimal?expand=0&rev=7
This commit is contained in:
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
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
3
baselibs.conf
Normal file
3
baselibs.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
libmpdec++4
|
||||
libmpdec4
|
||||
mpdecimal-devel
|
BIN
dectest.zip
(Stored with Git LFS)
Normal file
BIN
dectest.zip
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
mpdecimal-2.5.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
mpdecimal-2.5.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
mpdecimal-4.0.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
mpdecimal-4.0.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
95
mpdecimal.changes
Normal file
95
mpdecimal.changes
Normal file
@@ -0,0 +1,95 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 13 20:38:48 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Fix LDXXFLAGS (thank you Stefan Krah for providing the patch)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 7 12:09:23 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Update to 4.0.1 (bsc#1242704):
|
||||
- Add Cygwin support.
|
||||
- Update config.guess and config.sub to the latest versions.
|
||||
- Fix pkg-config files for custom paths.
|
||||
- Set LD/LDXX unconditionally to CC/CXX, since LDFLAGS/LDXXFLAGS from ./configure rely on it.
|
||||
- Update to 4.0.0:
|
||||
- sync soversion and major_version
|
||||
- The added number formatting feature requires an ABI change,
|
||||
hence the increase to SOVERSION=4.
|
||||
- Packagers outside of the Linux distributions sometimes use
|
||||
the major version number as the equivalent of SOVERSION on
|
||||
their platforms and have an incorrect SOVERSION for 2.5.1,
|
||||
which requires SOVERSION=3.
|
||||
- While SOVERSION is not required to match the major
|
||||
version number (example: glibc), mpdecimal will from
|
||||
now on take the path of least resistance and always use
|
||||
SOVERSION=MPD_MAJOR_VERSION.
|
||||
- The jump to 4.0.0 should also remind users that a C++ library
|
||||
is available.
|
||||
- Support for out-of-tree build.
|
||||
- Support for pkg-config.
|
||||
- Unix: support for Loongson.
|
||||
- Unix: support for CheriBSD.
|
||||
- Compilers: support for icx, icpx, ibm-clang_r, ibm-clang++_r,
|
||||
CompCert, clang-cl and emscripten.
|
||||
- Windows: support for MSYS2/MinGW.
|
||||
- MSVC: the build now uses /O2 /DNDEBUG.
|
||||
- MSVC: new arm64/arm32 cross build scripts.
|
||||
- AIX: the shared libraries are now installed as versioned
|
||||
objects, e.g., shr4.o, shr4_64.o.
|
||||
- New ./configure switches:
|
||||
- --enable-static: enable/disable the build of the static
|
||||
libraries (default: enabled).
|
||||
- --enable-pc: enable/disable the install of the pkgconfig
|
||||
files (default: enabled).
|
||||
- --enable-doc: enable/disable the install of the documentation
|
||||
(default: enabled).
|
||||
- New man pages direct users to the mpdecimal-doc package or
|
||||
the online HTML documentation.
|
||||
- The prebuilt HTML documentation is now in the separate
|
||||
mpdecimal-doc package, which gives distributions that reject
|
||||
prebuilt documentation the option to disregard it and use the
|
||||
new man pages.
|
||||
- libmpdec:
|
||||
- Add the “z” format specifier (coerce negative zeros to
|
||||
positive).
|
||||
- In extremely rare cases the transcendental functions (exp,
|
||||
ln, log10) did not set the Subnormal/Underflow flags. The
|
||||
reason is that in the case of an exponent boundary the Ziv
|
||||
correction loop for correct rounding requires very few
|
||||
iterations to arrive at the correctly rounded result, but
|
||||
may need many more iterations to arrive at the correct
|
||||
flags.
|
||||
- In these cases, Subnormal/Underflow is not very
|
||||
informative, so the status quo was to skip the extra
|
||||
iterations.
|
||||
- Version 4.0.0 now specializes exponent boundary cases
|
||||
and uses up to five additional iterations to set
|
||||
Subnormal/Underflow. The refactored code has no speed
|
||||
penalty on average; in fact, in the deccheck tests (random
|
||||
tests with a bias towards corner cases) it is slightly
|
||||
faster.
|
||||
- No cases have been found where more than two additional
|
||||
iterations are required, but they may exist.
|
||||
-eability fixes
|
||||
- mpd_qset_string_exact(), mpd_qset_i64_exact() and
|
||||
mpd_qset_u64_exact() can now be called with a nonzero
|
||||
status. Previously, the functions could return
|
||||
NaN/Invalid_operation in that case.
|
||||
- This is listed under “reliability fixes” since there is
|
||||
no possible scenario under which these functions would
|
||||
legitimately be called with a nonzero status.
|
||||
- libmpdec++
|
||||
- Add input validation for Decimal.shiftl(), Decimal.shiftr()
|
||||
and Decimal::ln10().
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 2 13:07:52 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Switch on _multibuild with the separate test step (to minimize
|
||||
dependencies).
|
||||
- Add a basic baselibs.conf.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 10 00:04:52 UTC 2021 - Stefan Krah <skrah@bytereef.org>
|
||||
|
||||
- Initial package
|
144
mpdecimal.spec
Normal file
144
mpdecimal.spec
Normal file
@@ -0,0 +1,144 @@
|
||||
#
|
||||
# spec file for package mpdecimal
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# 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 https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: mpdecimal%{psuffix}
|
||||
Version: 4.0.1
|
||||
Release: 0
|
||||
Summary: C/C++ libraries for arbitrary precision decimal floating point arithmetic
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: https://www.bytereef.org/mpdecimal/index.html
|
||||
Source0: https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-%{version}.tar.gz
|
||||
Source1: http://speleotrove.com/decimal/dectest.zip
|
||||
Source99: baselibs.conf
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: make
|
||||
%if %{with test}
|
||||
BuildRequires: unzip
|
||||
%endif
|
||||
|
||||
%description
|
||||
libmpdec is a C implementation of the General Decimal Arithmetic
|
||||
Specification. The specification defines a general purpose arbitrary
|
||||
precision data type together with rigorously specified functions and
|
||||
rounding behavior. libmpdec conforms - with minor restrictions -
|
||||
to the IEEE 754-2008 Standard for Floating-Point Arithmetic,
|
||||
provided that the appropriate context parameters are set. libmpdec++
|
||||
has a thread local context for inline operators and other functions
|
||||
that use the implicit context.
|
||||
|
||||
%package -n libmpdec4
|
||||
Summary: C library for arbitrary precision decimal floating point arithmetic
|
||||
License: BSD-2-Clause
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libmpdec4
|
||||
libmpdec is a C implementation of the General Decimal Arithmetic
|
||||
Specification. The specification defines a general purpose arbitrary
|
||||
precision data type together with rigorously specified functions and
|
||||
rounding behavior. libmpdec conforms - with minor restrictions - to
|
||||
the IEEE 754-2008 Standard for Floating-Point Arithmetic.
|
||||
|
||||
%package -n libmpdec++4
|
||||
Summary: C++ library for arbitrary precision decimal floating point arithmetic
|
||||
License: BSD-2-Clause
|
||||
Group: System/Libraries
|
||||
Requires: libmpdec4 >= %{version}
|
||||
|
||||
%description -n libmpdec++4
|
||||
libmpdec++ is a C++ implementation of the General Decimal Arithmetic
|
||||
Specification. The specification defines a general purpose arbitrary
|
||||
precision data type together with rigorously specified functions and
|
||||
rounding behavior. libmpdec conforms - with minor restrictions - to
|
||||
the IEEE 754-2008 Standard for Floating-Point Arithmetic.
|
||||
|
||||
%package devel
|
||||
Summary: Development headers and documentation for mpdecimal
|
||||
License: BSD-2-Clause
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libmpdec++4 = %{version}-%{release}
|
||||
Requires: libmpdec4 = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The package contains documentation and development headers for
|
||||
libmpdec and libmpdec++.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n mpdecimal-%{version}
|
||||
|
||||
%if %{with test}
|
||||
unzip -d tests/testdata %{SOURCE1}
|
||||
%endif
|
||||
|
||||
%build
|
||||
# NOTE: without -ffat-lto-objects the inline assembly tests in ./configure
|
||||
# have false positives on a variety of architectures.
|
||||
export CFLAGS="%optflags -ffat-lto-objects"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
%configure LDXXFLAGS="%{build_ldflags}" --docdir="%{_defaultdocdir}/%{name}"
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%make_install
|
||||
rm -f "%{buildroot}/%{_libdir}"/*.a
|
||||
%fdupes -s %{buildroot}/%{_docdir}/%{name}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%make_build check
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%post -n libmpdec4 -p /sbin/ldconfig
|
||||
%post -n libmpdec++4 -p /sbin/ldconfig
|
||||
%postun -n libmpdec4 -p /sbin/ldconfig
|
||||
%postun -n libmpdec++4 -p /sbin/ldconfig
|
||||
|
||||
%files -n libmpdec4
|
||||
%license COPYRIGHT.txt
|
||||
%{_libdir}/libmpdec.so.4
|
||||
%{_libdir}/libmpdec.so.%{version}
|
||||
|
||||
%files -n libmpdec++4
|
||||
%{_libdir}/libmpdec++.so.4
|
||||
%{_libdir}/libmpdec++.so.%{version}
|
||||
|
||||
%files devel
|
||||
%license doc/COPYRIGHT.txt
|
||||
%doc %{_docdir}/%{name}
|
||||
%{_libdir}/libmpdec.so
|
||||
%{_libdir}/libmpdec++.so
|
||||
%{_includedir}/mpdecimal.h
|
||||
%{_includedir}/decimal.hh
|
||||
%{_libdir}/pkgconfig/libmpdec*.pc
|
||||
%{_mandir}/man3/*mpdec*.3%{?ext_man}
|
||||
%endif
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user