From 5cc3e26d92ded8128ba2a9c545636273f9dc538e Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 4 Dec 2023 15:08:25 +0100 Subject: [PATCH] Fix deprecated warnings for rivet --- rivet-deprecated-warn.patch | 38 +++++++++++++++++++++++++++++++++++++ rivet.spec | 4 ++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 rivet-deprecated-warn.patch diff --git a/rivet-deprecated-warn.patch b/rivet-deprecated-warn.patch new file mode 100644 index 00000000000..bb7a58dc2a7 --- /dev/null +++ b/rivet-deprecated-warn.patch @@ -0,0 +1,38 @@ +diff -Naur /include/Rivet/Math/MatrixN.hh b/include/Rivet/Math/MatrixN.hh +--- a/include/Rivet/Math/MatrixN.hh 2023-12-03 01:21:00.000000000 +0100 ++++ b/include/Rivet/Math/MatrixN.hh 2023-12-04 12:13:12.539590815 +0100 +@@ -66,8 +66,6 @@ + + Matrix() : _matrix(EMatrix::Zero()) {} + +- Matrix(const Matrix& other) : _matrix(other._matrix) {} +- + Matrix& set(const size_t i, const size_t j, const double value) { + if (i < N && j < N) { + _matrix(i, j) = value; +diff -Naur a/include/Rivet/Math/VectorN.hh b/include/Rivet/Math/VectorN.hh +--- a/include/Rivet/Math/VectorN.hh 2023-12-03 01:21:00.000000000 +0100 ++++ b/include/Rivet/Math/VectorN.hh 2023-12-04 12:13:22.652275368 +0100 +@@ -27,9 +27,6 @@ + public: + Vector() : _vec(EVector::Zero()) { } + +- Vector(const Vector& other) +- : _vec(other._vec) { } +- + const double& get(const size_t index) const { + if (index >= N) { + throw std::runtime_error("Tried to access an invalid vector index."); +diff -Naur a/include/Rivet/Projection.hh b/include/Rivet/Projection.hh +--- a/include/Rivet/Projection.hh 2023-12-03 01:21:00.000000000 +0100 ++++ b/include/Rivet/Projection.hh 2023-12-04 12:03:13.447281503 +0100 +@@ -43,6 +43,9 @@ + /// The default constructor. + Projection(); + ++ /// Copy constructor ++ Projection(const Projection&) = default; ++ + /// Clone on the heap. + virtual unique_ptr clone() const = 0; + diff --git a/rivet.spec b/rivet.spec index e8c56266cde..4eba253f7d1 100644 --- a/rivet.spec +++ b/rivet.spec @@ -3,13 +3,13 @@ ## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} ## OLD GENSER Source: http://cern.ch/service-spi/external/MCGenerators/distribution/rivet/rivet-%{realversion}-src.tgz Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz - +Patch0: rivet-deprecated-warn Requires: hepmc fastjet fastjet-contrib yoda BuildRequires: python3 py3-cython autotools %prep -## OLD GENSER: %setup -n rivet/%{realversion} %setup -n %{n}-%{realversion} +%patch0 -p1 # Update config.{guess,sub} to detect aarch64 and ppc64le rm -f %{_tmppath}/config.{sub,guess}