Created
October 10, 2025 17:42
-
-
Save kuon/a7201bd1e856733eb0fc03254eee063a to your computer and use it in GitHub Desktop.
chatterino2 patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/PKGBUILD b/PKGBUILD | |
index c658eb4..a27758e 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -13,7 +13,7 @@ url=https://chatterino.com | |
license=('MIT') | |
depends=('gdk-pixbuf2' 'glib2' 'hicolor-icon-theme' 'libnotify' 'openssl' 'qt6-5compat' | |
'qt6-base' 'qt6-imageformats' 'qt6-svg' 'qtkeychain-qt6') | |
-makedepends=('boost' 'cmake' 'git' 'python3' 'qt6-tools' 'rapidjson' 'websocketpp') | |
+makedepends=('boost' 'cmake' 'git' 'python3' 'qt6-tools' 'rapidjson') | |
optdepends=('streamlink: For piping streams to video players' | |
'pulseaudio: For audio output') | |
checkdepends=('httpbin' 'pifpaf') | |
@@ -24,7 +24,7 @@ source=("git+https://github.com/Chatterino/${pkgname}.git#tag=v${pkgver}" | |
"git+https://github.com/Chatterino/certify.git#commit=a448a3915ddac716ce76e4b8cbf0e7f4153ed1e2" # Has no tags | |
"git+https://github.com/Chatterino/libcommuni.git#commit=2979eb96262756047a8dca47f2e509168138c0d0" # Current chatterino-cmake commit | |
"git+https://github.com/pajlada/settings.git#commit=967e86ee79a94ee1f23796046a8eb41e90e54cf2" # Has no relevant tags | |
- "git+https://github.com/pajlada/signals.git#commit=a87534e3c54f005ae4c4335e043a90f9af583e1e" # Has no relevant tags | |
+ "git+https://github.com/pajlada/signals.git#commit=25e4ec3b8d6ea94a5e65a26e7cfcbbce3b87c5d6" # Working version before SignalHolder final | |
"git+https://github.com/pajlada/serialize.git#commit=chatterino/2.5.3" | |
"git+https://github.com/Neargye/magic_enum.git#tag=v0.9.7" | |
"git+https://github.com/mackron/miniaudio.git#tag=0.11.23" | |
@@ -34,12 +34,13 @@ source=("git+https://github.com/Chatterino/${pkgname}.git#tag=v${pkgver}" | |
"git+https://github.com/arsenm/sanitizers-cmake.git#commit=9689dd8f05e16deb3f3116916109edf2cce6f29a" # Has no tags | |
"git+https://github.com/lua/lua.git#tag=v5.4.8" | |
"git+https://github.com/HowardHinnant/date.git#tag=v3.0.4" | |
- "git+https://github.com/fmtlib/fmt.git#tag=12.0.0") | |
+ "git+https://github.com/fmtlib/fmt.git#tag=12.0.0" | |
+ "websocketpp-boost-asio.patch") | |
sha256sums=('1f71fac4eac80106cacd9ce0bd63a566c25bc9c8f707b3c15c3f0ce879589a17' | |
'b859e9727d4ecd9a2c9723c09f6b098dad7e6c8b76964ac3375d74a09aaa3004' | |
'd9c6ad75a70f1d8463e8992fbc5ef0d45c78d33c37ede4d572499a607424e764' | |
'd1583a2b9c708c205952c72dc9514a70ad379548e80b2ea76eaa3280b2999e30' | |
- '2645ca9883970c80ed5a2be917a5eed82034dcc812c9cd2f3ed5e8a9412d0bea' | |
+ 'SKIP' | |
'2720af5b86830c88c3c18f4760ec13fd3135cb57c4052075644d2423ef9a2076' | |
'35e3ccee2fe02c2a666680aa00982e1d6593de440b8be04a04d399dd97c3e78c' | |
'4492cd40ccd70eb4b5ef93ca276a09c9a8755d7e04c6184e408a68dd527ad22c' | |
@@ -49,7 +50,8 @@ sha256sums=('1f71fac4eac80106cacd9ce0bd63a566c25bc9c8f707b3c15c3f0ce879589a17' | |
'971b20795b58e27c0f9879fcc3e2a9b578f46d72b25b6f904e7a3149a61f7747' | |
'0f72c1973ef31e1af2e302b6ab1335a8a7f08be0bf5100cb06ebbeeb8d0c7439' | |
'0677c2cac20ae98936b87a7bcedf9970459c88f57196b71b7b6758361b145ce7' | |
- 'd486317c93a07987182704245621302c1a72fc7925d069c070539b7d72b4afec') | |
+ 'd486317c93a07987182704245621302c1a72fc7925d069c070539b7d72b4afec' | |
+ 'SKIP') | |
# websocketpp hack for dirty build | |
if [ -f src/chatterino2/lib/websocketpp/websocketpp/version.hpp ]; then | |
@@ -86,7 +88,6 @@ prepare() { | |
-c submodule.lib/WinToast.update=none \ | |
-c submodule.lib/rapidjson.update=none \ | |
-c submodule.lib/qtkeychain.update=none \ | |
- -c submodule.lib/websocketpp.update=none \ | |
-c submodule.tools/crash-handler.update=none \ | |
submodule update | |
@@ -96,6 +97,9 @@ prepare() { | |
git -C "${_modpath}" fetch origin | |
git -C "${_modpath}" reset --hard origin/HEAD | |
done | |
+ | |
+ # Apply websocketpp boost asio compatibility patch | |
+ patch -p1 -i "${srcdir}/websocketpp-boost-asio.patch" | |
} | |
build() { | |
@@ -103,7 +107,7 @@ build() { | |
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG" \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DUSE_SYSTEM_QTKEYCHAIN=ON \ | |
- -DBUILD_TESTS=ON \ | |
+ -DBUILD_TESTS=OFF \ | |
-DCHATTERINO_UPDATER=OFF \ | |
-DCHATTERINO_PLUGINS=ON \ | |
-DINSTALL_GTEST=OFF | |
diff --git a/websocketpp-boost-asio.patch b/websocketpp-boost-asio.patch | |
new file mode 100644 | |
index 0000000..86bb25b | |
--- /dev/null | |
+++ b/websocketpp-boost-asio.patch | |
@@ -0,0 +1,71 @@ | |
+--- a/src/providers/liveupdates/BasicPubSubManager.hpp | |
++++ b/src/providers/liveupdates/BasicPubSubManager.hpp | |
+@@ -121,7 +121,7 @@ protected: | |
+ { | |
+ this->work_ = std::make_shared<boost::asio::executor_work_guard< | |
+ boost::asio::io_context::executor_type>>( | |
+- this->websocketClient_.get_io_service().get_executor()); | |
++ this->websocketClient_.get_io_context().get_executor()); | |
+ this->mainThread_.reset(new std::thread([this] { | |
+ // make sure we set in any case, even exceptions | |
+ auto guard = qScopeGuard([&] { | |
+@@ -298,7 +298,7 @@ protected: | |
+ this->addingClient_ = false; | |
+ if (!this->pendingSubscriptions_.empty()) | |
+ { | |
+- runAfter(this->websocketClient_.get_io_service(), | |
++ runAfter(this->websocketClient_.get_io_context(), | |
+ this->connectBackoff_.next(), [this](auto /*timer*/) { | |
+ this->addClient(); | |
+ }); | |
+--- a/src/providers/seventv/eventapi/Client.cpp | |
++++ b/src/providers/seventv/eventapi/Client.cpp | |
+@@ -14,7 +14,7 @@ Client::Client(WebsocketClient &websocketClient, WebsocketHandle handle, | |
+ : websocketClient_(websocketClient) | |
+ , handle_(std::move(handle)) | |
+ , heartbeatTimer_(std::make_shared<boost::asio::steady_timer>( | |
+- this->websocketClient_.get_io_service())) | |
++ this->websocketClient_.get_io_context())) | |
+ { | |
+ assert(heartbeatInterval.count() > 0); | |
+ this->heartbeatTimer_->expires_after(heartbeatInterval); | |
+--- a/src/providers/twitch/PubSubClient.cpp | |
++++ b/src/providers/twitch/PubSubClient.cpp | |
+@@ -15,7 +15,7 @@ PubSubClient::PubSubClient(WebsocketClient &websocketClient, | |
+ : websocketClient_(websocketClient) | |
+ , handle_(handle) | |
+ , heartbeatTimer_(std::make_shared<boost::asio::steady_timer>( | |
+- this->websocketClient_.get_io_service())) | |
++ this->websocketClient_.get_io_context())) | |
+ , clientOptions_(clientOptions) | |
+ { | |
+ } | |
+@@ -41,7 +41,7 @@ void PubSubClient::close(const std::string &reason, | |
+ websocketpp::close::status::value code) | |
+ { | |
+ boost::asio::post( | |
+- this->websocketClient_.get_io_service().get_executor(), | |
++ this->websocketClient_.get_io_context().get_executor(), | |
+ [this, reason, code] { | |
+ // We need to post this request to the io service executor | |
+ // to ensure the weak pointer used in get_con_from_hdl is used in a safe way | |
+--- a/src/providers/twitch/PubSubManager.cpp | |
++++ b/src/providers/twitch/PubSubManager.cpp | |
+@@ -93,7 +93,7 @@ void PubSub::start() | |
+ { | |
+ this->work = std::make_shared<boost::asio::executor_work_guard< | |
+ boost::asio::io_context::executor_type>>( | |
+- this->websocketClient.get_io_service().get_executor()); | |
++ this->websocketClient.get_io_context().get_executor()); | |
+ this->thread = std::make_unique<std::thread>([this] { | |
+ // make sure we set in any case, even exceptions | |
+ auto guard = qScopeGuard([&] { | |
+@@ -388,7 +388,7 @@ | |
+ this->addingClient = false; | |
+ if (!this->requests.empty()) | |
+ { | |
+- runAfter(this->websocketClient.get_io_service(), | |
++ runAfter(this->websocketClient.get_io_context(), | |
+ this->connectBackoff.next(), [this](auto timer) { | |
+ this->addClient(); // | |
+ }); | |
\ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment