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

View File

@ -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