mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 12:26:52 +02:00
testing/smplxmpp: fix build against fmt 10
use fmt::underlying to convert `Enum`s
This commit is contained in:
parent
4f22c781d1
commit
646314b6fe
@ -1,7 +1,7 @@
|
||||
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
|
||||
pkgname=smplxmpp
|
||||
pkgver=0.9.3
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
pkgdesc="Simple XMPP command line client"
|
||||
url="https://codeberg.org/tropf/smplxmpp"
|
||||
arch="all"
|
||||
@ -19,6 +19,7 @@ makedepends="
|
||||
subpackages="$pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://codeberg.org/tropf/smplxmpp/archive/v$pkgver.tar.gz
|
||||
argp.patch
|
||||
fmt10.patch
|
||||
"
|
||||
builddir="$srcdir/$pkgname"
|
||||
options="!check" # checks require an xmpp server
|
||||
@ -39,4 +40,5 @@ package() {
|
||||
sha512sums="
|
||||
cafbdb164fe6ab1b75bfd2d8244a3a8785b44e7bc6b1c88d0db941d1e04a9f067bd10f0539245efec61fbf74ef057349d27c451f19acd8fbba5ad10a73aaf45d smplxmpp-0.9.3.tar.gz
|
||||
df1abad52e9845712dd4f3fbd8f333e73e46c5a3bc0721364d9672a865bf605ede946d7853c5051549f20d26611bd6383557243334cdee9c382fd0325d96102b argp.patch
|
||||
35f016dcc53dd0a6abcfaf332907b8f54b9cd21b5ecdfa4ee7740a724c9ada80a58a0fae9b342637332df2c8b2c58168d82e9ccd1d9c03e30ae8271043e75b7c fmt10.patch
|
||||
"
|
||||
|
||||
43
testing/smplxmpp/fmt10.patch
Normal file
43
testing/smplxmpp/fmt10.patch
Normal file
@ -0,0 +1,43 @@
|
||||
--- a/src/chat.cc
|
||||
+++ b/src/chat.cc
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
|
||||
void SmplXmppHandlerChat::handleMessage(const Message& msg, MessageSession* session) {
|
||||
- spdlog::trace("incoming message (type: {}) from '{}' (subject: '{}', thread: '{}'): '{}'", msg.subtype(), msg.from().full(), msg.subject(), msg.thread(), msg.body());
|
||||
+ spdlog::trace("incoming message (type: {}) from '{}' (subject: '{}', thread: '{}'): '{}'", fmt::underlying(msg.subtype()), msg.from().full(), msg.subject(), msg.thread(), msg.body());
|
||||
|
||||
if (teardownHandshakeStarted()) {
|
||||
spdlog::debug("received msg after shutdown has been initiated. ignoring.");
|
||||
@@ -116,7 +116,7 @@
|
||||
}
|
||||
|
||||
void SmplXmppHandlerChat::handleMessageEvent(const JID& from, MessageEventType event) {
|
||||
- spdlog::trace("received message event: {} from: '{}'", event, from.full());
|
||||
+ spdlog::trace("received message event: {} from: '{}'", fmt::underlying(event), from.full());
|
||||
}
|
||||
|
||||
void SmplXmppHandlerChat::handleMessageSession(MessageSession* session) {
|
||||
@@ -165,6 +165,6 @@
|
||||
|
||||
void SmplXmppHandlerChat::sendSingleMsg(const MsgPrototype& msg) {
|
||||
Message msgToSend(Message::MessageType::Chat, JID(msg.jid), msg.body);
|
||||
- spdlog::trace("sending message to '{}' (type: '{}'): '{}'", msg.jid, msgToSend.subtype(), msg.body);
|
||||
+ spdlog::trace("sending message to '{}' (type: '{}'): '{}'", msg.jid, fmt::underlying(msgToSend.subtype()), msg.body);
|
||||
j.send(msgToSend);
|
||||
}
|
||||
--- a/src/xmpp.cc
|
||||
+++ b/src/xmpp.cc
|
||||
@@ -231,9 +231,9 @@
|
||||
|
||||
void SmplXmppHandlerBase::handleLog(LogLevel level, LogArea area, const std::string& message) {
|
||||
switch (level) {
|
||||
- case LogLevel::LogLevelDebug: spdlog::trace("[area {}] {}", area, message); break;
|
||||
- case LogLevel::LogLevelWarning: spdlog::warn("[area {}] {}", area, message); break;
|
||||
- case LogLevel::LogLevelError: spdlog::error("[area {}] {}", area, message); break;
|
||||
+ case LogLevel::LogLevelDebug: spdlog::trace("[area {}] {}", fmt::underlying(area), message); break;
|
||||
+ case LogLevel::LogLevelWarning: spdlog::warn("[area {}] {}", fmt::underlying(area), message); break;
|
||||
+ case LogLevel::LogLevelError: spdlog::error("[area {}] {}", fmt::underlying(area), message); break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user