commit b0a81aa073869c7a1280789b6a4a5a6ad86b0af40bb491514f573980368bb184 Author: Dirk Stoecker Date: Sun Aug 22 19:35:59 2021 +0000 Accepting request 912459 from home:stefankrah This request supersedes: https://build.opensuse.org/request/show/911436 Tracked here: https://bugzilla.opensuse.org/show_bug.cgi?id=1189356 OBS-URL: https://build.opensuse.org/request/show/912459 OBS-URL: https://build.opensuse.org/package/show/science/mpdecimal?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/dectest.zip b/dectest.zip new file mode 100644 index 0000000..c32d2ae --- /dev/null +++ b/dectest.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b70a224cd52e82b7a8150aedac5efa2d0cb3941696fd829bdbe674f9f65c3926 +size 791733 diff --git a/mpdecimal-2.5.1.tar.gz b/mpdecimal-2.5.1.tar.gz new file mode 100644 index 0000000..8f5f7a1 --- /dev/null +++ b/mpdecimal-2.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f9cd4c041f99b5c49ffb7b59d9f12d95b683d88585608aa56a6307667b2b21f +size 2584021 diff --git a/mpdecimal.changes b/mpdecimal.changes new file mode 100644 index 0000000..67656ad --- /dev/null +++ b/mpdecimal.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Tue Aug 10 00:04:52 UTC 2021 - Stefan Krah + +- Initial package diff --git a/mpdecimal.spec b/mpdecimal.spec new file mode 100644 index 0000000..187ea4f --- /dev/null +++ b/mpdecimal.spec @@ -0,0 +1,122 @@ +# +# spec file for package mpdecimal +# +# Copyright (c) 2021 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/ +# + + +Name: mpdecimal +Version: 2.5.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 +BuildRequires: fdupes +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: unzip + +%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 libmpdec3 +Summary: C library for arbitrary precision decimal floating point arithmetic +License: BSD-2-Clause +Group: System/Libraries + +%description -n libmpdec3 +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++3 +Summary: C++ library for arbitrary precision decimal floating point arithmetic +License: BSD-2-Clause +Group: System/Libraries +Requires: libmpdec3 >= %{version} + +%description -n libmpdec++3 +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++3 = %{version}-%{release} +Requires: libmpdec3 = %{version}-%{release} + +%description devel +The package contains documentation and development headers for +libmpdec and libmpdec++. + +%prep +%autosetup +unzip -d tests/testdata %{SOURCE1} + +%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 --docdir="%{_defaultdocdir}/%{name}" +%make_build + +%check +%make_build check + +%install +%make_install +rm -f "%{buildroot}/%{_libdir}"/*.a +%fdupes -s %{buildroot}/%{_docdir}/%{name} + +%post -n libmpdec3 -p /sbin/ldconfig +%post -n libmpdec++3 -p /sbin/ldconfig +%postun -n libmpdec3 -p /sbin/ldconfig +%postun -n libmpdec++3 -p /sbin/ldconfig + +%files -n libmpdec3 +%license LICENSE.txt +%{_libdir}/libmpdec.so.3 +%{_libdir}/libmpdec.so.%{version} + +%files -n libmpdec++3 +%{_libdir}/libmpdec++.so.3 +%{_libdir}/libmpdec++.so.%{version} + +%files devel +%license doc/LICENSE.txt +%doc %{_docdir}/%{name} +%{_libdir}/libmpdec.so +%{_libdir}/libmpdec++.so +%{_includedir}/mpdecimal.h +%{_includedir}/decimal.hh + +%changelog