From 074257ccad509109a151bc3dbce5eb62892bac7d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 12 Sep 2023 10:38:15 +0800 Subject: [PATCH] use autosetup for applying patches it's error-prune to apply the patches using '%patch' or '%patch' macros. let's use %autosetup to do this job. as %autosetup defaults to quiet operation, "-q" option is dropped. also, in 28be73603a, we added this patch in hope to address a warning from compiler. but in rawhide we use %autosetup macro to apply the patches automatically, while in f38, we still use %patch to apply the patches one by one, so we failed to apply it when cherry-picking the change from rawhide. in this change, let's switch to autosetup for applying the patches. this should apply patch7 to address the Boost.Accumulators bug filed against boost package, see https://bugzilla.redhat.com/show_bug.cgi?id=2236519 this also silences the warning like ``` RPM build warnings: %patchN is deprecated (14 usages found), use %patch N (or %patch -P N) ``` see 6b80e21fd9ba8eef0adbda3d1b0af1625e5884bc for the change on rawhide Signed-off-by: Kefu Chai --- boost-1.58.0-pool.patch | 4 ++-- ....0-fix-narrowing-conversions-for-ppc.patch | 4 ++-- ...fix_multiprecision_issue_419-ppc64le.patch | 6 +++--- boost.spec | 21 ++++++------------- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/boost-1.58.0-pool.patch b/boost-1.58.0-pool.patch index ed8449e..9c559ab 100644 --- a/boost-1.58.0-pool.patch +++ b/boost-1.58.0-pool.patch @@ -1,7 +1,7 @@ Index: boost/pool/pool.hpp =================================================================== ---- boost/pool/pool.hpp (revision 78317) -+++ boost/pool/pool.hpp (revision 78326) +--- /boost/pool/pool.hpp (revision 78317) ++++ /boost/pool/pool.hpp (revision 78326) @@ -27,4 +27,6 @@ #include diff --git a/boost-1.76.0-fix-narrowing-conversions-for-ppc.patch b/boost-1.76.0-fix-narrowing-conversions-for-ppc.patch index 42662dd..096f1df 100644 --- a/boost-1.76.0-fix-narrowing-conversions-for-ppc.patch +++ b/boost-1.76.0-fix-narrowing-conversions-for-ppc.patch @@ -13,8 +13,8 @@ Fixes #29 diff --git a/include/boost/numeric/interval/detail/ppc_rounding_control.hpp b/include/boost/numeric/interval/detail/ppc_rounding_control.hpp index 87fe8ee..99f9986 100644 ---- a/include/boost/numeric/interval/detail/ppc_rounding_control.hpp -+++ b/include/boost/numeric/interval/detail/ppc_rounding_control.hpp +--- include/boost/numeric/interval/detail/ppc_rounding_control.hpp ++++ include/boost/numeric/interval/detail/ppc_rounding_control.hpp @@ -28,10 +28,10 @@ typedef union { double dmode; } rounding_mode_struct; diff --git a/boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch b/boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch index 5cd6d40..ec1964e 100644 --- a/boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch +++ b/boost-1.76.0-fix_multiprecision_issue_419-ppc64le.patch @@ -8,10 +8,10 @@ Subject: [PATCH] Update gcc Intel intrinsic usage config. Fixes include/boost/multiprecision/cpp_int/intel_intrinsics.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -diff --git a/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp b/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp +diff --git a/boost/multiprecision/cpp_int/intel_intrinsics.hpp b/boost/multiprecision/cpp_int/intel_intrinsics.hpp index eb4624bb4..37717cd51 100644 ---- a/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp -+++ b/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp +--- include/boost/multiprecision/cpp_int/intel_intrinsics.hpp ++++ include/boost/multiprecision/cpp_int/intel_intrinsics.hpp @@ -19,7 +19,11 @@ // If this is GCC/clang, then check that the actual intrinsic exists: // diff --git a/boost.spec b/boost.spec index 3287fe7..6b09661 100644 --- a/boost.spec +++ b/boost.spec @@ -675,23 +675,9 @@ Historically, B2 was based on on FTJam and on Perforce Jam but has grown a number of significant features and is now developed independently. %prep -%setup -q -n %{toplev_dirname} +%autosetup -n %{toplev_dirname} -p1 find ./boost -name '*.hpp' -perm /111 | xargs --no-run-if-empty chmod a-x -%patch15 -p0 -%patch51 -p1 -%patch105 -p1 -%patch106 -p1 -%patch107 -p1 -%patch88 -p1 -%patch94 -p1 -%patch102 -p1 -%patch103 -p2 -%patch104 -p2 -%patch108 -p1 -%patch109 -p1 -%patch110 -p1 - %build %set_build_flags # Dump the versions being used into the build logs. @@ -1296,6 +1282,11 @@ fi %{_mandir}/man1/b2.1* %changelog +* Tue Sep 12 2023 Kefu Chai - 1.78.0-14 +- Apply patch for Boost.Accumulators bug + See https://github.com/boostorg/accumulators/pull/54 +- Change spec file to use autospec for applying patches + * Fri Sep 01 2023 Jonathan Wakely - 1.78.0-13 - Fix outdated CI configuration