diff --git a/cppunit.changes b/cppunit.changes index bd582d5..ce83709 100644 --- a/cppunit.changes +++ b/cppunit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 29 14:11:16 UTC 2019 - Martin Liška + +- Add gcc9-Wdeprecated-copy-1.patch and gcc9-Wdeprecated-copy-2.patch + in order to fix boo#1121281. + ------------------------------------------------------------------- Wed Feb 7 13:02:04 UTC 2018 - jengelh@inai.de diff --git a/cppunit.spec b/cppunit.spec index 6e4b6d1..7ec784f 100644 --- a/cppunit.spec +++ b/cppunit.spec @@ -1,7 +1,7 @@ # # spec file for package cppunit # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -21,12 +21,14 @@ Name: cppunit Version: 1.14.0 Release: 0 Summary: C++ Port of the JUnit Testing Framework -License: LGPL-2.1+ +License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ Url: http://www.freedesktop.org/wiki/Software/cppunit Source: http://dev-www.libreoffice.org/src/%{name}-%{version}.tar.gz Source1: cppunit-devel.desktop Source99: baselibs.conf +Patch0: gcc9-Wdeprecated-copy-1.patch +Patch1: gcc9-Wdeprecated-copy-2.patch BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: graphviz @@ -70,6 +72,8 @@ This package contains documentation for the cppunit API. %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build export CXXFLAGS="%{optflags}" diff --git a/gcc9-Wdeprecated-copy-1.patch b/gcc9-Wdeprecated-copy-1.patch new file mode 100644 index 0000000..01794cd --- /dev/null +++ b/gcc9-Wdeprecated-copy-1.patch @@ -0,0 +1,41 @@ +From 4f5cd3b486afb9c7be1903252b4ae3787137a454 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 7 Aug 2018 16:24:49 +0200 +Subject: [PATCH] Avoid GCC 9 -Wdeprecated-copy + +...when an implicitly-defined copy function is used that may in a future C++ +standard be defined as deleted because of the user-declared destructor. Just +declare all the four copy/move functions as defaulted for a consistent +interface. + +(Originally addressed with LibreOffice commit + "external/cppunit: silence +-Werror=deprecated-copy (GCC trunk towards GCC 9)".) + +Change-Id: Ie38ac3a613e6fbc2e4045cb5b14c3f6d167c79c5 +Reviewed-on: https://gerrit.libreoffice.org/58690 +Reviewed-by: Stephan Bergmann +Tested-by: Stephan Bergmann +--- + include/cppunit/extensions/TestSuiteBuilderContext.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/include/cppunit/extensions/TestSuiteBuilderContext.h b/include/cppunit/extensions/TestSuiteBuilderContext.h +index 72bfa70..12d157e 100644 +--- a/include/cppunit/extensions/TestSuiteBuilderContext.h ++++ b/include/cppunit/extensions/TestSuiteBuilderContext.h +@@ -40,6 +40,11 @@ public: + + virtual ~TestSuiteBuilderContextBase(); + ++ TestSuiteBuilderContextBase(TestSuiteBuilderContextBase const &) = default; ++ TestSuiteBuilderContextBase(TestSuiteBuilderContextBase &&) = default; ++ TestSuiteBuilderContextBase & operator =(TestSuiteBuilderContextBase const &) = default; ++ TestSuiteBuilderContextBase & operator =(TestSuiteBuilderContextBase &&) = default; ++ + /*! \brief Adds a test to the fixture suite. + * + * \param test Test to add to the fixture suite. Must not be \c NULL. +-- +2.21.0 + diff --git a/gcc9-Wdeprecated-copy-2.patch b/gcc9-Wdeprecated-copy-2.patch new file mode 100644 index 0000000..bb6848e --- /dev/null +++ b/gcc9-Wdeprecated-copy-2.patch @@ -0,0 +1,50 @@ +From 78e64f0edb4f3271a6ddbcdf9cba05138597bfca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Li=C5=A1ka?= +Date: Tue, 30 Apr 2019 10:44:44 +0200 +Subject: [PATCH] Fix build with gcc9.1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I8a0d7a0b51b5c537dbcfa8fdd34e816605b1f32e +Reviewed-on: https://gerrit.libreoffice.org/71573 +Reviewed-by: Tomáš Chvátal +Tested-by: Tomáš Chvátal +--- + examples/cppunittest/OrthodoxTest.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/examples/cppunittest/OrthodoxTest.h b/examples/cppunittest/OrthodoxTest.h +index 8fc2a08..a2bc678 100644 +--- a/examples/cppunittest/OrthodoxTest.h ++++ b/examples/cppunittest/OrthodoxTest.h +@@ -38,6 +38,8 @@ private: + public: + Value( int value =0 ) : m_value( value ) {} + ++ Value( const Value & ) = default; ++ + Value& operator= ( const Value& v ) + { + m_value = v.m_value; +@@ -143,6 +145,8 @@ private: + { + return ValueBadCall( -1 - m_value ); + } ++ ++ ValueBadCall &operator =( const ValueBadCall & ) = default; + }; + + +@@ -161,6 +165,8 @@ private: + ++m_value; + return *this; + } ++ ++ ValueBadAssignment( const ValueBadAssignment & ) = default; + }; + + +-- +2.21.0 +