diff --git a/libdbus-c++-gcc7.patch b/libdbus-c++-gcc7.patch new file mode 100644 index 0000000..8b8190a --- /dev/null +++ b/libdbus-c++-gcc7.patch @@ -0,0 +1,11 @@ +Index: src/pipe.cpp +=================================================================== +--- src/pipe.cpp.orig 2011-11-30 00:16:31.000000000 +0200 ++++ src/pipe.cpp 2017-03-27 10:34:55.261175583 +0200 +@@ -83,5 +83,5 @@ ssize_t Pipe::read(void *buffer, unsigne + void Pipe::signal() + { + // TODO: ignoring return of read/write generates warning; maybe relevant for eventloop work... +- ::write(_fd_write, '\0', 1); ++ ::write(_fd_write, 0, 1); + } diff --git a/libdbus-c++.changes b/libdbus-c++.changes index 16f8b3e..bd6388e 100644 --- a/libdbus-c++.changes +++ b/libdbus-c++.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 27 15:23:02 UTC 2017 - davejplater@gmail.com + +- Fix gcc7 build with libdbus-c++-gcc7.patch + ------------------------------------------------------------------- Sun Oct 16 18:04:30 UTC 2016 - jengelh@inai.de diff --git a/libdbus-c++.spec b/libdbus-c++.spec index 0ebea72..574501a 100644 --- a/libdbus-c++.spec +++ b/libdbus-c++.spec @@ -1,7 +1,7 @@ # # spec file for package libdbus-c++ # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 @@ -35,13 +35,15 @@ Patch2: libdbus-c++-nodocdatetime.patch Patch3: libdbus-c++-gcc47.patch # PATCH-FIX-UPSTREAM libdbus-c++-glibmm-2.43.patch dimstar@opensuse.org -- Fix build with glibmm2 2.43.x+ Patch4: libdbus-c++-glibmm-2.43.patch +# PATCH-FIX-UPSTREAM libdbus-c++-gcc7.patch davejplater@gmail.com -- Fix gcc7 build errors +Patch5: libdbus-c++-gcc7.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: dos2unix BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: graphviz +BuildRequires: graphviz-gnome BuildRequires: gtkmm2-devel BuildRequires: libexpat-devel BuildRequires: libtool @@ -85,7 +87,6 @@ Requires: libdbus-c++-glib-1-0 = %{version} DBus-c++ provides a C++ API for D-BUS. The library has a glib and an ecore mainloop integration. It also offers an optional own main loop. - This subpackage contains the files needed for building against libdbus-c++. @@ -97,12 +98,21 @@ libdbus-c++. %patch2 %patch3 %patch4 -p1 +%patch5 %build +# --enable-doxygen-docs -fpermissive #./autogen.sh +%if 1 == 0 +export CC=gcc-7 +export CPP=cpp-7 +export CXX=g++-7 +%endif export LDFLAGS="$LDFLAGS -lexpat -lpthread" -%configure --disable-ecore --enable-doxygen-docs --enable-static=no -make %{?_smp_flags} +export CXXFLAGS="%{optflags} --std=c++11 -fPIC" +%configure --disable-ecore --enable-static=no \ + --enable-doxygen-docs --disable-tests --disable-examples +make %{?_smp_mflags} %install %make_install @@ -141,5 +151,6 @@ rm -f %{buildroot}%{_libdir}/*.la %{_libdir}/libdbus-c++-glib-1.so %{_includedir}/dbus-c++-1 %{_libdir}/pkgconfig/*.pc +# doc/html doc/img %changelog