From bdf55be01c00cbd4b0ece5b29176a0f8d1dbcc84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 19 Jan 2023 15:38:47 +0100 Subject: [PATCH] Split libmpdec++ into a mpdecimal++ subpackage The C++ library is quite small (~40K), but it brings in libstdc++ (~2.7M). The split prevents packages only using the C library (such as Python) from transitively depending on libstdc++. --- mpdecimal.spec | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/mpdecimal.spec b/mpdecimal.spec index 4dfd751..f5e9789 100644 --- a/mpdecimal.spec +++ b/mpdecimal.spec @@ -3,7 +3,7 @@ Name: mpdecimal Version: 2.5.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Library for general decimal arithmetic License: BSD-2-Clause @@ -17,13 +17,24 @@ BuildRequires: gcc-c++ BuildRequires: unzip %description -The package contains a library limpdec implementing General Decimal Arithmetic -Specification. The specification, written by Mike Cowlishaw from IBM, defines -a general purpose arbitrary precision data type together with rigorously -specified functions and rounding behavior. +The package contains a library libmpdec implementing General Decimal +Arithmetic Specification. The specification, written by Mike Cowlishaw from +IBM, defines a general purpose arbitrary precision data type together with +rigorously specified functions and rounding behavior. + +%package -n %{name}++ +Requires: %{name}%{?_isa} = %{version}-%{release} +Summary: Library for general decimal arithmetic (C++) + +%description -n %{name}++ +The package contains a library libmpdec++ implementing General Decimal +Arithmetic Specification. The specification, written by Mike Cowlishaw from +IBM, defines a general purpose arbitrary precision data type together with +rigorously specified functions and rounding behavior. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}++%{?_isa} = %{version}-%{release} Summary: Development headers for mpdecimal library %description devel @@ -76,6 +87,8 @@ fi %license LICENSE.txt %{_libdir}/libmpdec.so.%{version} %{_libdir}/libmpdec.so.3 + +%files -n %{name}++ %{_libdir}/libmpdec++.so.%{version} %{_libdir}/libmpdec++.so.3 @@ -92,6 +105,10 @@ fi %ldconfig_scriptlets %changelog +* Thu Jan 19 2023 Miro HronĨok - 2.5.1-6 +- Split libmpdec++ into a mpdecimal++ subpackage +- This prevents packages only using the libmpdec library from transitively depending on libstdc++ + * Thu Jan 19 2023 Fedora Release Engineering - 2.5.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild