[packages/OpenSceneGraph] - added asio patch to fix build with currnet asio

qboosh qboosh at pld-linux.org
Wed Mar 29 22:10:01 CEST 2023


commit 41ae154e7dbcc54ea0f582060ebeb95ffbb06e2c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Mar 29 22:12:28 2023 +0200

    - added asio patch to fix build with currnet asio

 OpenSceneGraph-asio.patch | 11 +++++++++++
 OpenSceneGraph.spec       |  5 +++++
 2 files changed, 16 insertions(+)
---
diff --git a/OpenSceneGraph.spec b/OpenSceneGraph.spec
index a8fc020..e647a1a 100644
--- a/OpenSceneGraph.spec
+++ b/OpenSceneGraph.spec
@@ -10,9 +10,12 @@ Source0:	http://trac.openscenegraph.org/downloads/developer_releases/%{name}-%{v
 #Source1:	osg-doxygen-0.9.1.tar.gz
 ## Source1-md5:	7e6d785d1b763aaeae03c2dc4c148805
 Patch0:		ffmpeg3.patch
+Patch1:		%{name}-asio.patch
 URL:		http://www.openscenegraph.org/projects/osg/
 BuildRequires:	QtCore-devel
 BuildRequires:	QtOpenGL-devel
+BuildRequires:	asio-devel >= 1.11
+BuildRequires:	boost-devel >= 1.37
 BuildRequires:	cairo-devel
 BuildRequires:	cmake
 BuildRequires:	freetype-devel
@@ -82,10 +85,12 @@ Wtyczki dla biblioteki Open Scene Graph.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
 cd build
+CXXFLAGS="%{rpmcxxflags} -DASIO_ENABLE_BOOST=1"
 %cmake \
 	-DDESIRED_QT_VERSION=4 \
 %ifarch x32
diff --git a/OpenSceneGraph-asio.patch b/OpenSceneGraph-asio.patch
new file mode 100644
index 0000000..998563d
--- /dev/null
+++ b/OpenSceneGraph-asio.patch
@@ -0,0 +1,11 @@
+--- OpenSceneGraph-3.5.1/src/osgPlugins/RestHttpDevice/server.cpp.orig	2013-06-19 19:25:55.000000000 +0200
++++ OpenSceneGraph-3.5.1/src/osgPlugins/RestHttpDevice/server.cpp	2023-03-29 21:53:19.150878828 +0200
+@@ -23,7 +23,7 @@ server::server(const std::string& addres
+     request_handler_(doc_root)
+ {
+   // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
+-  asio::ip::tcp::resolver resolver(acceptor_.get_io_service());
++  asio::ip::tcp::resolver resolver((asio::io_context&)acceptor_.get_executor().context());
+   asio::ip::tcp::resolver::query query(address, port);
+   asio::ip::tcp::endpoint endpoint = *resolver.resolve(query);
+   acceptor_.open(endpoint.protocol());
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/OpenSceneGraph.git/commitdiff/41ae154e7dbcc54ea0f582060ebeb95ffbb06e2c



More information about the pld-cvs-commit mailing list