[packages/socket.io-client-cpp] - added asio patch, ensure modules are not downloaded; release 3

qboosh qboosh at pld-linux.org
Sun Mar 3 10:57:59 CET 2024


commit 3ef4334d482c056e45af8ec1c762eb211c4e0726
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Mar 3 09:51:40 2024 +0100

    - added asio patch, ensure modules are not downloaded; release 3

 socket.io-client-cpp-asio.patch | 24 ++++++++++++++++++++++++
 socket.io-client-cpp.spec       |  8 ++++++--
 2 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/socket.io-client-cpp.spec b/socket.io-client-cpp.spec
index efb5cdf..986df7c 100644
--- a/socket.io-client-cpp.spec
+++ b/socket.io-client-cpp.spec
@@ -2,13 +2,14 @@ Summary:	Socket.IO C++ Client library
 Summary(pl.UTF-8):	Biblioteka kliencka Socket.IO dla C++
 Name:		socket.io-client-cpp
 Version:	3.1.0
-Release:	2
+Release:	3
 License:	MIT
 Group:		Libraries
 #Source0Download: https://github.com/socketio/socket.io-client-cpp/releases
 Source0:	https://github.com/socketio/socket.io-client-cpp/archive/%{version}/socket.io-client-cpp-%{version}.tar.gz
 # Source0-md5:	942f8b519ec411cde08772f3cf83dd1e
 Patch0:		socket.io-client-cpp-git.patch
+Patch1:		socket.io-client-cpp-asio.patch
 URL:		https://github.com/socketio/socket.io-client-cpp
 BuildRequires:	asio-devel
 BuildRequires:	cmake >= 2.8
@@ -53,11 +54,14 @@ Pliki nagłówkowe biblioteki klienta Socket.IO dla C++.
 %prep
 %setup -q -n socket.io-client-cpp-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
 cd build
-%cmake ..
+%cmake .. \
+	-DBUILD_TESTING=OFF \
+	-DUSE_SUBMODULES=OFF
 
 %{__make}
 
diff --git a/socket.io-client-cpp-asio.patch b/socket.io-client-cpp-asio.patch
new file mode 100644
index 0000000..a1016fb
--- /dev/null
+++ b/socket.io-client-cpp-asio.patch
@@ -0,0 +1,24 @@
+Asio doesn't provide cmake config files nor Findasio.cmake file.
+rapidjson cmake config doesn't provide rapidjson target stub.
+--- socket.io-client-cpp-3.1.0/CMakeLists.txt.orig	2024-03-03 09:36:11.233930073 +0100
++++ socket.io-client-cpp-3.1.0/CMakeLists.txt	2024-03-03 09:42:55.898404484 +0100
+@@ -60,9 +60,8 @@ if(USE_SUBMODULES)
+     )
+ else()
+     find_package(websocketpp CONFIG REQUIRED)
+-    find_package(asio CONFIG REQUIRED)
+     find_package(RapidJSON CONFIG REQUIRED)
+-    target_link_libraries(sioclient PRIVATE websocketpp::websocketpp asio asio::asio rapidjson)
++    target_link_libraries(sioclient PRIVATE websocketpp::websocketpp)
+ endif()
+ 
+ target_include_directories(sioclient 
+@@ -103,7 +102,7 @@ if(OPENSSL_FOUND)
+ 
+     target_link_libraries(sioclient_tls PRIVATE OpenSSL::SSL OpenSSL::Crypto)
+     if (NOT USE_SUBMODULES) 
+-        target_link_libraries(sioclient_tls PRIVATE websocketpp::websocketpp asio asio::asio rapidjson)
++        target_link_libraries(sioclient_tls PRIVATE websocketpp::websocketpp)
+     endif()
+ 
+     target_compile_definitions(sioclient_tls PRIVATE -DSIO_TLS)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/socket.io-client-cpp.git/commitdiff/3ef4334d482c056e45af8ec1c762eb211c4e0726



More information about the pld-cvs-commit mailing list