[packages/domoticz] - fix building with boost 1.70 - rel 3

baggins baggins at pld-linux.org
Mon Apr 22 14:03:17 CEST 2019


commit e7c99f81cedf7a597d094e03881aa17ace8e13a0
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 22 14:02:52 2019 +0200

    - fix building with boost 1.70
    - rel 3

 boost-1.70.patch | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 domoticz.spec    |  4 +++-
 2 files changed, 74 insertions(+), 1 deletion(-)
---
diff --git a/domoticz.spec b/domoticz.spec
index dedaa4d..f86c3f0 100644
--- a/domoticz.spec
+++ b/domoticz.spec
@@ -1,7 +1,7 @@
 Summary:	Open source Home Automation System
 Name:		domoticz
 Version:	4.9700
-Release:	2
+Release:	3
 License:	GPLv3+ and ASL 2.0 and Boost and BSD and MIT
 Group:		Base
 URL:		http://www.domoticz.com
@@ -21,6 +21,7 @@ Patch4:		%{name}-openzwave-Dev.patch
 Patch5:		%{name}-python.patch
 Patch6:		domoticz-ozw-barrier-support-0002.patch
 Patch7:		domoticz-cp-js.patch
+Patch8:		boost-1.70.patch
 BuildRequires:	boost-devel
 BuildRequires:	cmake
 BuildRequires:	curl-devel
@@ -84,6 +85,7 @@ and much more. Notifications/Alerts can be sent to any mobile device
 %patch5 -p1 -b.python
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 rm -f hardware/openzwave/*.h
 rm -rf hardware/openzwave/aes
 rm -rf hardware/openzwave/command_classes
diff --git a/boost-1.70.patch b/boost-1.70.patch
new file mode 100644
index 0000000..4d2bd8a
--- /dev/null
+++ b/boost-1.70.patch
@@ -0,0 +1,71 @@
+From 9d226dab339f5767ec01ea1bcc9043ceee185cca Mon Sep 17 00:00:00 2001
+From: Rob Peters <info at domoticz.com>
+Date: Mon, 25 Mar 2019 08:50:23 +0100
+Subject: [PATCH] Fix for boot 1.70 get_io_service, fixed #3117
+
+---
+ hardware/Pinger.cpp                   | 10 ++++++++--
+ hardware/TCPProxy/tcpproxy_server.cpp |  8 +++++++-
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/hardware/Pinger.cpp b/hardware/Pinger.cpp
+index 01a955ba4..184378738 100644
+--- a/hardware/Pinger.cpp
++++ b/hardware/Pinger.cpp
+@@ -18,6 +18,12 @@
+ 
+ #include <iostream>
+ 
++#if BOOST_VERSION >= 107000
++#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
++#else
++#define GET_IO_SERVICE(s) ((s).get_io_service())
++#endif
++
+ class pinger
+ 	: private domoticz::noncopyable
+ {
+@@ -76,7 +82,7 @@ class pinger
+ 				num_tries_++;
+ 				if (num_tries_ > 4)
+ 				{
+-					resolver_.get_io_service().stop();
++					GET_IO_SERVICE(resolver_).stop();
+ 				}
+ 				else
+ 				{
+@@ -118,7 +124,7 @@ class pinger
+ 			if (num_replies_++ == 0)
+ 				timer_.cancel();
+ 			m_PingState = true;
+-			resolver_.get_io_service().stop();
++			GET_IO_SERVICE(resolver_).stop();
+ 		}
+ 		else
+ 		{
+diff --git a/hardware/TCPProxy/tcpproxy_server.cpp b/hardware/TCPProxy/tcpproxy_server.cpp
+index fddac08de..60445d9c2 100644
+--- a/hardware/TCPProxy/tcpproxy_server.cpp
++++ b/hardware/TCPProxy/tcpproxy_server.cpp
+@@ -15,6 +15,12 @@
+ #include "stdafx.h"
+ #include "tcpproxy_server.h"
+ 
++#if BOOST_VERSION >= 107000
++#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s).get_executor().context())
++#else
++#define GET_IO_SERVICE(s) ((s).get_io_service())
++#endif
++
+ namespace tcp_proxy
+ {
+ 	bridge::bridge(boost::asio::io_service& ios)
+@@ -38,7 +44,7 @@ namespace tcp_proxy
+ 		boost::asio::ip::tcp::endpoint end;
+ 
+ 
+-		boost::asio::io_service &ios=downstream_socket_.get_io_service();
++		boost::asio::io_service &ios= GET_IO_SERVICE(downstream_socket_);
+ 		boost::asio::ip::tcp::resolver resolver(ios);
+ 		boost::asio::ip::tcp::resolver::query query(upstream_host, upstream_port, boost::asio::ip::resolver_query_base::numeric_service);
+ 		boost::asio::ip::tcp::resolver::iterator i = resolver.resolve(query);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/domoticz.git/commitdiff/e7c99f81cedf7a597d094e03881aa17ace8e13a0



More information about the pld-cvs-commit mailing list