Accepting request 482975 from home:plater

Fix gcc7 build errors

OBS-URL: https://build.opensuse.org/request/show/482975
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libdbus-c++?expand=0&rev=22
This commit is contained in:
Dave Plater 2017-03-28 07:31:22 +00:00 committed by Git OBS Bridge
parent fabc9d2280
commit e3c862afce
3 changed files with 32 additions and 5 deletions

11
libdbus-c++-gcc7.patch Normal file
View File

@ -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);
}

View File

@ -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 Sun Oct 16 18:04:30 UTC 2016 - jengelh@inai.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package libdbus-c++ # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -35,13 +35,15 @@ Patch2: libdbus-c++-nodocdatetime.patch
Patch3: libdbus-c++-gcc47.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+ # 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 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: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: dos2unix BuildRequires: dos2unix
BuildRequires: doxygen BuildRequires: doxygen
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: graphviz BuildRequires: graphviz-gnome
BuildRequires: gtkmm2-devel BuildRequires: gtkmm2-devel
BuildRequires: libexpat-devel BuildRequires: libexpat-devel
BuildRequires: libtool 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 DBus-c++ provides a C++ API for D-BUS. The library has
a glib and an ecore mainloop integration. It also offers an a glib and an ecore mainloop integration. It also offers an
optional own main loop. optional own main loop.
This subpackage contains the files needed for building against This subpackage contains the files needed for building against
libdbus-c++. libdbus-c++.
@ -97,12 +98,21 @@ libdbus-c++.
%patch2 %patch2
%patch3 %patch3
%patch4 -p1 %patch4 -p1
%patch5
%build %build
# --enable-doxygen-docs -fpermissive
#./autogen.sh #./autogen.sh
%if 1 == 0
export CC=gcc-7
export CPP=cpp-7
export CXX=g++-7
%endif
export LDFLAGS="$LDFLAGS -lexpat -lpthread" export LDFLAGS="$LDFLAGS -lexpat -lpthread"
%configure --disable-ecore --enable-doxygen-docs --enable-static=no export CXXFLAGS="%{optflags} --std=c++11 -fPIC"
make %{?_smp_flags} %configure --disable-ecore --enable-static=no \
--enable-doxygen-docs --disable-tests --disable-examples
make %{?_smp_mflags}
%install %install
%make_install %make_install
@ -141,5 +151,6 @@ rm -f %{buildroot}%{_libdir}/*.la
%{_libdir}/libdbus-c++-glib-1.so %{_libdir}/libdbus-c++-glib-1.so
%{_includedir}/dbus-c++-1 %{_includedir}/dbus-c++-1
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
# doc/html doc/img
%changelog %changelog