From c5c0a9d02537885cea9ad806d66483e3d3e62b98 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Feb 15 2016 13:21:08 +0000 Subject: Add patch for GCC 6 build break; Use -std=gnu++98 in CXXFLAGS --- diff --git a/syncevolution-1.5.1-gcc6.patch b/syncevolution-1.5.1-gcc6.patch new file mode 100644 index 0000000..e854370 --- /dev/null +++ b/syncevolution-1.5.1-gcc6.patch @@ -0,0 +1,45 @@ +diff -up syncevolution-1.5.1/src/syncevo/Logging.h.gcc6 syncevolution-1.5.1/src/syncevo/Logging.h +--- syncevolution-1.5.1/src/syncevo/Logging.h.gcc6 2014-04-25 09:55:47.000000000 +0200 ++++ syncevolution-1.5.1/src/syncevo/Logging.h 2016-02-08 16:23:54.988845287 +0100 +@@ -255,7 +255,7 @@ class Logger + Handle &operator = (const Handle &other) throw (); + ~Handle() throw (); + +- operator bool () const { return m_logger; } ++ operator bool () const { return m_logger.get() != 0; } + bool operator == (Logger *logger) const { return m_logger.get() == logger; } + Logger *get() const { return m_logger.get(); } + +@@ -398,7 +398,7 @@ template class PushLogger : boo + } + } + +- operator bool () const { return m_logger; } ++ operator bool () const { return m_logger.get() != 0; } + + void reset(const Logger::Handle &logger) + { +diff -up syncevolution-1.5.1/src/syncevo/StringDataBlob.h.gcc6 syncevolution-1.5.1/src/syncevo/StringDataBlob.h +--- syncevolution-1.5.1/src/syncevo/StringDataBlob.h.gcc6 2014-04-25 09:55:47.000000000 +0200 ++++ syncevolution-1.5.1/src/syncevo/StringDataBlob.h 2016-02-08 16:23:54.988845287 +0100 +@@ -53,7 +53,7 @@ class StringDataBlob : public DataBlob + + virtual boost::shared_ptr getData() { return m_data; } + virtual std::string getName() const { return m_name; } +- virtual bool exists() const { return m_data; } ++ virtual bool exists() const { return m_data.get() != 0; } + virtual bool isReadonly() const { return m_readonly; } + }; + +diff -up syncevolution-1.5.1/src/synthesis/src/sysync/itemfield.cpp.gcc6 syncevolution-1.5.1/src/synthesis/src/sysync/itemfield.cpp +--- syncevolution-1.5.1/src/synthesis/src/sysync/itemfield.cpp.gcc6 2015-03-03 09:06:40.000000000 +0100 ++++ syncevolution-1.5.1/src/synthesis/src/sysync/itemfield.cpp 2016-02-08 16:23:54.989845287 +0100 +@@ -1488,7 +1488,7 @@ void TTimestampField::getAsRFC822date(st + " %c%02hd%02hd", + moffs>=0 ? '+' : '-', + (uInt16)(abs(moffs) / MinsPerHour), +- (uInt16)(abs(moffs) % MinsPerHour) ++ (uInt16)(((uInt16)abs(moffs)) % MinsPerHour) + ); + } + } // TTimestampField::getAsRFC822date diff --git a/syncevolution.spec b/syncevolution.spec index 6820f4e..5700ebc 100644 --- a/syncevolution.spec +++ b/syncevolution.spec @@ -10,6 +10,7 @@ Source: http://downloads.syncevolution.org/%{name}/sources/%{name}-%{vers Patch0: syncevolution-1.4.1-akonadi.patch Patch1: syncevolution-1.5.1-libical2.patch +Patch2: syncevolution-1.5.1-gcc6.patch BuildRequires: pkgconfig(akonadi) BuildRequires: bluez-libs-devel @@ -89,6 +90,7 @@ Akonadi backend for %{name}. %setup -q %patch0 -p1 -b .akonadi %patch1 -p1 -b .libical2 +%patch2 -p1 -b .gcc6 # use the ac macros in Makefile.am sed -i '/^ACLOCAL_AMFLAGS/{ /m4-repo/!s/$/ -I m4-repo/ }' Makefile*.am @@ -98,6 +100,8 @@ intltoolize --automake --copy --force autoreconf -fiv (cd src/synthesis && autoreconf -fi && ./autogen.sh) +export CXXFLAGS="$CXXFLAGS -std=gnu++98" + %configure --enable-libsoup --enable-dbus-service --enable-shared \ --disable-static --enable-gtk=3 --enable-gui --with-gio-gdbus \ --enable-dav --disable-static --enable-gtk=3 --enable-gui \ @@ -199,6 +203,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/syncevolution/xml/*.pl %changelog +* Mon Feb 15 2016 Milan Crha - 1:1.5.1-9 +- Add patch for GCC 6 build break +- Use -std=gnu++98 in CXXFLAGS + * Sun Feb 14 2016 David Tardon - 1:1.5.1-9 - rebuild for cppunit 1.13.2