1 |
commit: 08c2a7b554707f11b129914ff64c78256a782ffd |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 29 23:23:18 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 29 23:23:18 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08c2a7b5 |
7 |
|
8 |
media-sound/snapcast: fix build w/ boost-1.81 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/886585 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../files/snapcast-0.26.0-boost-1.81.patch | 51 +++++++++++++++ |
14 |
media-sound/snapcast/snapcast-0.26.0-r2.ebuild | 73 ++++++++++++++++++++++ |
15 |
2 files changed, 124 insertions(+) |
16 |
|
17 |
diff --git a/media-sound/snapcast/files/snapcast-0.26.0-boost-1.81.patch b/media-sound/snapcast/files/snapcast-0.26.0-boost-1.81.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..d9d691060b42 |
20 |
--- /dev/null |
21 |
+++ b/media-sound/snapcast/files/snapcast-0.26.0-boost-1.81.patch |
22 |
@@ -0,0 +1,51 @@ |
23 |
+https://bugs.gentoo.org/886585 |
24 |
+https://github.com/badaix/snapcast/commit/853c3f622ff2262b56681ee04dd20b4266c72493 |
25 |
+https://github.com/badaix/snapcast/issues/1082 |
26 |
+ |
27 |
+From 853c3f622ff2262b56681ee04dd20b4266c72493 Mon Sep 17 00:00:00 2001 |
28 |
+From: Rudi Heitbaum <rudi@××××××××.com> |
29 |
+Date: Wed, 21 Dec 2022 11:31:29 +0000 |
30 |
+Subject: [PATCH] server/control_session_http: update for boost 1.81.0 |
31 |
+ |
32 |
+Signed-off-by: Rudi Heitbaum <rudi@××××××××.com> |
33 |
+--- a/server/control_session_http.cpp |
34 |
++++ b/server/control_session_http.cpp |
35 |
+@@ -127,8 +127,8 @@ boost::beast::string_view mime_type(boost::beast::string_view path) |
36 |
+ std::string path_cat(boost::beast::string_view base, boost::beast::string_view path) |
37 |
+ { |
38 |
+ if (base.empty()) |
39 |
+- return path.to_string(); |
40 |
+- std::string result = base.to_string(); |
41 |
++ return static_cast<std::string>(path); |
42 |
++ std::string result = static_cast<std::string>(base); |
43 |
+ char constexpr path_separator = '/'; |
44 |
+ if (result.back() == path_separator) |
45 |
+ result.resize(result.size() - 1); |
46 |
+@@ -171,7 +171,7 @@ void ControlSessionHttp::handle_request(http::request<Body, http::basic_fields<A |
47 |
+ res.set(http::field::server, HTTP_SERVER_NAME); |
48 |
+ res.set(http::field::content_type, "text/html"); |
49 |
+ res.keep_alive(req.keep_alive()); |
50 |
+- res.body() = why.to_string(); |
51 |
++ res.body() = static_cast<std::string>(why); |
52 |
+ res.prepare_payload(); |
53 |
+ return res; |
54 |
+ }; |
55 |
+@@ -182,7 +182,7 @@ void ControlSessionHttp::handle_request(http::request<Body, http::basic_fields<A |
56 |
+ res.set(http::field::server, HTTP_SERVER_NAME); |
57 |
+ res.set(http::field::content_type, "text/html"); |
58 |
+ res.keep_alive(req.keep_alive()); |
59 |
+- res.body() = "The resource '" + target.to_string() + "' was not found."; |
60 |
++ res.body() = "The resource '" + static_cast<std::string>(target) + "' was not found."; |
61 |
+ res.prepare_payload(); |
62 |
+ return res; |
63 |
+ }; |
64 |
+@@ -204,7 +204,7 @@ void ControlSessionHttp::handle_request(http::request<Body, http::basic_fields<A |
65 |
+ res.set(http::field::server, HTTP_SERVER_NAME); |
66 |
+ res.set(http::field::content_type, "text/html"); |
67 |
+ res.keep_alive(req.keep_alive()); |
68 |
+- res.body() = "An error occurred: '" + what.to_string() + "'"; |
69 |
++ res.body() = "An error occurred: '" + static_cast<std::string>(what) + "'"; |
70 |
+ res.prepare_payload(); |
71 |
+ return res; |
72 |
+ }; |
73 |
+ |
74 |
|
75 |
diff --git a/media-sound/snapcast/snapcast-0.26.0-r2.ebuild b/media-sound/snapcast/snapcast-0.26.0-r2.ebuild |
76 |
new file mode 100644 |
77 |
index 000000000000..cd5cede0e1b4 |
78 |
--- /dev/null |
79 |
+++ b/media-sound/snapcast/snapcast-0.26.0-r2.ebuild |
80 |
@@ -0,0 +1,73 @@ |
81 |
+# Copyright 1999-2022 Gentoo Authors |
82 |
+# Distributed under the terms of the GNU General Public License v2 |
83 |
+ |
84 |
+EAPI=8 |
85 |
+ |
86 |
+inherit cmake |
87 |
+ |
88 |
+DESCRIPTION="Synchronous multi-room audio player" |
89 |
+HOMEPAGE="https://github.com/badaix/snapcast" |
90 |
+SRC_URI="https://github.com/badaix/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
91 |
+ |
92 |
+LICENSE="GPL-3+" |
93 |
+SLOT="0" |
94 |
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~x86" |
95 |
+IUSE="+client +expat +flac +opus +server tremor +vorbis +zeroconf" |
96 |
+REQUIRED_USE="|| ( server client )" |
97 |
+ |
98 |
+RDEPEND=" |
99 |
+ dev-libs/boost:= |
100 |
+ media-libs/alsa-lib |
101 |
+ client? ( acct-user/snapclient ) |
102 |
+ expat? ( dev-libs/expat ) |
103 |
+ flac? ( media-libs/flac:= ) |
104 |
+ opus? ( media-libs/opus ) |
105 |
+ server? ( |
106 |
+ acct-group/snapserver |
107 |
+ acct-user/snapserver |
108 |
+ ) |
109 |
+ tremor? ( media-libs/tremor ) |
110 |
+ vorbis? ( media-libs/libvorbis ) |
111 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
112 |
+" |
113 |
+DEPEND=" |
114 |
+ ${RDEPEND} |
115 |
+ >=dev-cpp/aixlog-1.2.1 |
116 |
+ >=dev-cpp/asio-1.12.1 |
117 |
+ >=dev-cpp/popl-1.2.0 |
118 |
+" |
119 |
+ |
120 |
+PATCHES=( |
121 |
+ "${FILESDIR}"/${P}-boost-1.81.patch |
122 |
+) |
123 |
+ |
124 |
+src_configure() { |
125 |
+ local mycmakeargs=( |
126 |
+ -DBUILD_CLIENT=$(usex client) |
127 |
+ -DBUILD_WITH_EXPAT=$(usex expat) |
128 |
+ -DBUILD_WITH_FLAC=$(usex flac) |
129 |
+ -DBUILD_WITH_OPUS=$(usex opus) |
130 |
+ -DBUILD_SERVER=$(usex server) |
131 |
+ -DBUILD_STATIC_LIBS=no |
132 |
+ -DBUILD_TESTS=no |
133 |
+ -DBUILD_WITH_TREMOR=$(usex tremor) |
134 |
+ -DBUILD_WITH_VORBIS=$(usex vorbis) |
135 |
+ -DBUILD_WITH_AVAHI=$(usex zeroconf) |
136 |
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" |
137 |
+ ) |
138 |
+ |
139 |
+ cmake_src_configure |
140 |
+} |
141 |
+ |
142 |
+src_install() { |
143 |
+ cmake_src_install |
144 |
+ |
145 |
+ for bin in server client ; do |
146 |
+ if use ${bin} ; then |
147 |
+ doman "${bin}/snap${bin}.1" |
148 |
+ |
149 |
+ newconfd "${FILESDIR}/snap${bin}.confd" "snap${bin}" |
150 |
+ newinitd "${FILESDIR}/snap${bin}.initd" "snap${bin}" |
151 |
+ fi |
152 |
+ done |
153 |
+} |