pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/audio/snapcast
Module Name: pkgsrc
Committed By: wiz
Date: Fri Jan 31 16:20:07 UTC 2025
Modified Files:
pkgsrc/audio/snapcast: Makefile distinfo
Added Files:
pkgsrc/audio/snapcast/patches: patch-client_client__connection.cpp
patch-server_control__server.cpp patch-server_stream__server.cpp
patch-server_stream__session__ws.cpp
patch-server_streamreader_tcp__stream.cpp
Log Message:
snapcast: fix build with boost 1.87
Convert to cmake/build.mk while here.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 pkgsrc/audio/snapcast/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/audio/snapcast/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/audio/snapcast/patches/patch-client_client__connection.cpp \
pkgsrc/audio/snapcast/patches/patch-server_control__server.cpp \
pkgsrc/audio/snapcast/patches/patch-server_stream__server.cpp \
pkgsrc/audio/snapcast/patches/patch-server_stream__session__ws.cpp \
pkgsrc/audio/snapcast/patches/patch-server_streamreader_tcp__stream.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/audio/snapcast/Makefile
diff -u pkgsrc/audio/snapcast/Makefile:1.12 pkgsrc/audio/snapcast/Makefile:1.13
--- pkgsrc/audio/snapcast/Makefile:1.12 Tue Jan 21 11:00:10 2025
+++ pkgsrc/audio/snapcast/Makefile Fri Jan 31 16:20:06 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.12 2025/01/21 11:00:10 nia Exp $
+# $NetBSD: Makefile,v 1.13 2025/01/31 16:20:06 wiz Exp $
DISTNAME= snapcast-0.26.0
PKGREVISION= 6
@@ -11,7 +11,6 @@ HOMEPAGE= https://github.com/badaix/snap
COMMENT= Multiroom client-server audio player
LICENSE= gnu-gpl-v3
-USE_CMAKE= yes
USE_TOOLS+= pkg-config
USE_LANGUAGES= c c++
@@ -19,8 +18,6 @@ USE_CXX_FEATURES+= filesystem
REPLACE_PYTHON+= server/etc/plug-ins/meta_mpd.py
-PYTHON_VERSIONS_INCOMPATIBLE= 27
-
CONF_FILES+= ${PREFIX}/share/examples/snapcast/snapserver.conf \
${PKG_SYSCONFDIR}/snapserver.conf
@@ -69,6 +66,7 @@ post-install:
cd ${WRKSRC} && ${CHMOD} +r ${DESTDIR}${PREFIX}/share/snapserver/plug-ins/meta_mpd.py
.include "options.mk"
+.include "../../devel/cmake/build.mk"
.include "../../audio/flac/buildlink3.mk"
.include "../../audio/libopus/buildlink3.mk"
.include "../../audio/libsoxr/buildlink3.mk"
Index: pkgsrc/audio/snapcast/distinfo
diff -u pkgsrc/audio/snapcast/distinfo:1.3 pkgsrc/audio/snapcast/distinfo:1.4
--- pkgsrc/audio/snapcast/distinfo:1.3 Mon Jan 30 10:41:57 2023
+++ pkgsrc/audio/snapcast/distinfo Fri Jan 31 16:20:06 2025
@@ -1,19 +1,24 @@
-$NetBSD: distinfo,v 1.3 2023/01/30 10:41:57 wiz Exp $
+$NetBSD: distinfo,v 1.4 2025/01/31 16:20:06 wiz Exp $
BLAKE2s (snapcast-0.26.0.tar.gz) = e0ef56ee25d30c8536158949c5e5f85b32a8c410303da939ef844bb3dc300012
SHA512 (snapcast-0.26.0.tar.gz) = fc7885e42a11794e33314544083251ffbb91a0cf160c6d4b854c56f57ffe9f38f75c7594478c9edabfe9076959938cd8de891dd456e66202692de664a75cde71
Size (snapcast-0.26.0.tar.gz) = 1537036 bytes
SHA1 (patch-CMakeLists.txt) = c3f02503c918e6843ab18d987b3e886e22e13865
SHA1 (patch-client_CMakeLists.txt) = 48559046bd578e2d75f97b4ec422d4a56b567733
+SHA1 (patch-client_client__connection.cpp) = 73d5497336d8c27e29e0d4da47fa577a3ca9c9e1
SHA1 (patch-client_controller.cpp) = a87b5515a519ab579c36786b9727b58934128148
SHA1 (patch-client_player_sun__player.cpp) = 6e98d22c9deaccc3bf2ac14b7e275dc1c8bc771a
SHA1 (patch-client_player_sun__player.hpp) = d8eeba9f4c16e85833baba95c07f9a0600763752
SHA1 (patch-client_snapclient.cpp) = d682d4c1de438251d1510d40387e9a0b2bcf926f
SHA1 (patch-common_utils.hpp) = 8184a65459accd76b55e8e9e95d1911439fb4d8a
SHA1 (patch-server_CMakeLists.txt) = 49144e902844bd3308871a625f5da56575904855
+SHA1 (patch-server_control__server.cpp) = e0d7c5527e725ced125e92044b3fd117e17176fb
SHA1 (patch-server_control__session__http.cpp) = ed34f6922fec7787e13e538b4683082a3e08befe
SHA1 (patch-server_etc_snapserver.conf) = f274e31ab54d76ea8ce839f5d2d918c111a80604
SHA1 (patch-server_server__settings.hpp) = 50950a4855ecc336dbec146b86935fa18942dc1d
SHA1 (patch-server_snapserver.1) = 3459c6109635d1ad72c1aee92e302088a2317007
SHA1 (patch-server_snapserver.cpp) = 62d5dcbfe369f9095e9b6c695680650f7eb458b6
+SHA1 (patch-server_stream__server.cpp) = 4d9d01ee809331ce18540c59f603dfbdefbaad94
+SHA1 (patch-server_stream__session__ws.cpp) = d228ba5af0adc593b243150bef1ffdfbbf826659
SHA1 (patch-server_streamreader_pipe__stream.cpp) = aec6fd900e0aca776510c3b413e457b9082b01b5
+SHA1 (patch-server_streamreader_tcp__stream.cpp) = 335fbf8eb1de0244a228d980be4b14bedb368e1c
Added files:
Index: pkgsrc/audio/snapcast/patches/patch-client_client__connection.cpp
diff -u /dev/null pkgsrc/audio/snapcast/patches/patch-client_client__connection.cpp:1.1
--- /dev/null Fri Jan 31 16:20:07 2025
+++ pkgsrc/audio/snapcast/patches/patch-client_client__connection.cpp Fri Jan 31 16:20:06 2025
@@ -0,0 +1,52 @@
+$NetBSD: patch-client_client__connection.cpp,v 1.1 2025/01/31 16:20:06 wiz Exp $
+
+Fix build with boost 1.87.
+Using current upstream code.
+
+--- client/client_connection.cpp.orig 2025-01-31 16:06:01.103330476 +0000
++++ client/client_connection.cpp
+@@ -60,10 +60,9 @@ std::string ClientConnection::getMacAddr
+
+ void ClientConnection::connect(const ResultHandler& handler)
+ {
+- tcp::resolver::query query(server_.host, cpt::to_string(server_.port), boost::asio::ip::resolver_query_base::numeric_service);
+ boost::system::error_code ec;
+ LOG(INFO, LOG_TAG) << "Resolving host IP for: " << server_.host << "\n";
+- auto iterator = resolver_.resolve(query, ec);
++ auto iterator = resolver_.resolve(server_.host, cpt::to_string(server_.port), boost::asio::ip::resolver_query_base::numeric_service, ec);
+ if (ec)
+ {
+ LOG(ERROR, LOG_TAG) << "Failed to resolve host '" << server_.host << "', error: " << ec.message() << "\n";
+@@ -71,15 +70,25 @@ void ClientConnection::connect(const Res
+ return;
+ }
+
+- LOG(INFO, LOG_TAG) << "Connecting\n";
+- socket_.connect(*iterator, ec);
+- if (ec)
++ for (const auto& iter : iterator)
++ LOG(DEBUG, LOG_TAG) << "Resolved IP: " << iter.endpoint().address().to_string() << "\n";
++
++ for (const auto& iter : iterator)
+ {
+- LOG(ERROR, LOG_TAG) << "Failed to connect to host '" << server_.host << "', error: " << ec.message() << "\n";
+- handler(ec);
+- return;
++ LOG(INFO, LOG_TAG) << "Connecting to " << iter.endpoint() << "\n";
++ socket_.connect(iter, ec);
++ if (!ec || (ec == boost::system::errc::interrupted))
++ {
++ // We were successful or interrupted, e.g. by sig int
++ break;
++ }
+ }
+- LOG(NOTICE, LOG_TAG) << "Connected to " << socket_.remote_endpoint().address().to_string() << endl;
++
++ if (ec)
++ LOG(ERROR, LOG_TAG) << "Failed to connect to host '" << server_.host << "', error: " << ec.message() << "\n";
++ else
++ LOG(NOTICE, LOG_TAG) << "Connected to " << socket_.remote_endpoint().address().to_string() << endl;
++
+ handler(ec);
+
+ #if 0
Index: pkgsrc/audio/snapcast/patches/patch-server_control__server.cpp
diff -u /dev/null pkgsrc/audio/snapcast/patches/patch-server_control__server.cpp:1.1
--- /dev/null Fri Jan 31 16:20:07 2025
+++ pkgsrc/audio/snapcast/patches/patch-server_control__server.cpp Fri Jan 31 16:20:06 2025
@@ -0,0 +1,26 @@
+$NetBSD: patch-server_control__server.cpp,v 1.1 2025/01/31 16:20:06 wiz Exp $
+
+Fix build with boost-1.87.
+Based on
+https://github.com/badaix/snapcast/commit/6ada939adf5c4f7e43d0fbe6ea45492b9564cb8d
+
+--- server/control_server.cpp.orig 2025-01-31 15:55:59.143276181 +0000
++++ server/control_server.cpp
+@@ -156,7 +156,7 @@ void ControlServer::start()
+ {
+ LOG(INFO, LOG_TAG) << "Creating TCP acceptor for address: " << address << ", port: " << tcp_settings_.port << "\n";
+ acceptor_tcp_.emplace_back(make_unique<tcp::acceptor>(net::make_strand(io_context_.get_executor()),
+- tcp::endpoint(boost::asio::ip::address::from_string(address), tcp_settings_.port)));
++ tcp::endpoint(boost::asio::ip::make_address(address), tcp_settings_.port)));
+ }
+ catch (const boost::system::system_error& e)
+ {
+@@ -172,7 +172,7 @@ void ControlServer::start()
+ {
+ LOG(INFO, LOG_TAG) << "Creating HTTP acceptor for address: " << address << ", port: " << http_settings_.port << "\n";
+ acceptor_http_.emplace_back(make_unique<tcp::acceptor>(net::make_strand(io_context_.get_executor()),
+- tcp::endpoint(boost::asio::ip::address::from_string(address), http_settings_.port)));
++ tcp::endpoint(boost::asio::ip::make_address(address), http_settings_.port)));
+ }
+ catch (const boost::system::system_error& e)
+ {
Index: pkgsrc/audio/snapcast/patches/patch-server_stream__server.cpp
diff -u /dev/null pkgsrc/audio/snapcast/patches/patch-server_stream__server.cpp:1.1
--- /dev/null Fri Jan 31 16:20:07 2025
+++ pkgsrc/audio/snapcast/patches/patch-server_stream__server.cpp Fri Jan 31 16:20:06 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-server_stream__server.cpp,v 1.1 2025/01/31 16:20:06 wiz Exp $
+
+Fix build with boost 1.87.
+
+--- server/stream_server.cpp.orig 2025-01-31 15:59:00.212634193 +0000
++++ server/stream_server.cpp
+@@ -220,7 +220,7 @@ void StreamServer::start()
+ {
+ LOG(INFO, LOG_TAG) << "Creating stream acceptor for address: " << address << ", port: " << settings_.stream.port << "\n";
+ acceptor_.emplace_back(make_unique<tcp::acceptor>(net::make_strand(io_context_.get_executor()),
+- tcp::endpoint(boost::asio::ip::address::from_string(address), settings_.stream.port)));
++ tcp::endpoint(boost::asio::ip::make_address(address), settings_.stream.port)));
+ }
+ catch (const boost::system::system_error& e)
+ {
Index: pkgsrc/audio/snapcast/patches/patch-server_stream__session__ws.cpp
diff -u /dev/null pkgsrc/audio/snapcast/patches/patch-server_stream__session__ws.cpp:1.1
--- /dev/null Fri Jan 31 16:20:07 2025
+++ pkgsrc/audio/snapcast/patches/patch-server_stream__session__ws.cpp Fri Jan 31 16:20:06 2025
@@ -0,0 +1,16 @@
+$NetBSD: patch-server_stream__session__ws.cpp,v 1.1 2025/01/31 16:20:06 wiz Exp $
+
+Fix build with boost 1.87.
+https://github.com/badaix/snapcast/commit/6190041e863968d76b6d16140bba90be6dff848f
+
+--- server/stream_session_ws.cpp.orig 2025-01-31 16:03:19.618894855 +0000
++++ server/stream_session_ws.cpp
+@@ -107,7 +107,7 @@ void StreamSessionWebsocket::on_read_ws(
+ return;
+ }
+
+- auto* data = boost::asio::buffer_cast<char*>(buffer_.data());
++ auto* data = static_cast<char*>(buffer_.data().data());
+ baseMessage_.deserialize(data);
+ LOG(DEBUG, LOG_TAG) << "getNextMessage: " << baseMessage_.type << ", size: " << baseMessage_.size << ", id: " << baseMessage_.id
+ << ", refers: " << baseMessage_.refersTo << "\n";
Index: pkgsrc/audio/snapcast/patches/patch-server_streamreader_tcp__stream.cpp
diff -u /dev/null pkgsrc/audio/snapcast/patches/patch-server_streamreader_tcp__stream.cpp:1.1
--- /dev/null Fri Jan 31 16:20:07 2025
+++ pkgsrc/audio/snapcast/patches/patch-server_streamreader_tcp__stream.cpp Fri Jan 31 16:20:06 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-server_streamreader_tcp__stream.cpp,v 1.1 2025/01/31 16:20:06 wiz Exp $
+
+Fix build with boost 1.87.
+
+--- server/streamreader/tcp_stream.cpp.orig 2025-01-31 16:01:18.779914892 +0000
++++ server/streamreader/tcp_stream.cpp
+@@ -64,7 +64,7 @@ TcpStream::TcpStream(PcmStream::Listener
+
+ LOG(INFO, LOG_TAG) << "TcpStream host: " << host_ << ", port: " << port_ << ", is server: " << is_server_ << "\n";
+ if (is_server_)
+- acceptor_ = make_unique<tcp::acceptor>(strand_, tcp::endpoint(boost::asio::ip::address::from_string(host_), port_));
++ acceptor_ = make_unique<tcp::acceptor>(strand_, tcp::endpoint(boost::asio::ip::make_address(host_), port_));
+ }
+
+
+@@ -91,7 +91,7 @@ void TcpStream::do_connect()
+ else
+ {
+ stream_ = make_unique<tcp::socket>(strand_);
+- boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::address::from_string(host_), port_);
++ boost::asio::ip::tcp::endpoint endpoint(boost::asio::ip::make_address(host_), port_);
+ stream_->async_connect(endpoint, [this](const boost::system::error_code& ec) {
+ if (!ec)
+ {
Home |
Main Index |
Thread Index |
Old Index