From nobody Tue Jul 18 07:58:00 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R4rsj1cKGz4nqx3; Tue, 18 Jul 2023 07:58:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R4rsj0sflz4GHn; Tue, 18 Jul 2023 07:58:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689667081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jZNdVosK1dU55hJKfAhpzTXFaU7BX0GxMHiuWOyU+VM=; b=NLnNfsfkTYKQXfpJAHN0ZGzmgpXcv+zFVhwOWIOQRNtjvrnheDgfjF8Fff9I1nh0Scq15U cVuezZ/9mwHvH5rgz+wYxAts4+Ul0Nu/ZKvjzxNAH4vsQavOe8+Q2iAnEY7bKfgUc2tx/0 QZtqieA7/V2LLC0faJ3UsQepuJ610cWak661LA4IandVMcoL55awUQyY2fpTlnm20WSRVt RDVILIO/44UVZLagFxJ5jV6AKP4d12nvcVWbbA6WGx4W3j/Q3IfQIEiIrKG9jocy9PzyT6 eDUtSq1CMfIdj8ctXMtAZInz+558x9HAdF1mE4rZ2cUYrhzykyZrOU+57VuTBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689667081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jZNdVosK1dU55hJKfAhpzTXFaU7BX0GxMHiuWOyU+VM=; b=n6eYpJOcd6Cxl5NglTZXoQQAuGaLIkBtHJA8JuEcs/MdswkiVvTNjUIsmbexnm8vJEf2dc PWERplbG/mAtp9Iul8T/OqEyTK3Bz2HzU/1XMMc2c8+DY/LqpKU5vpDN2YPcB9tBvl8GJ0 g8OH83ObENR/BO+jHBJit0s6ukMj+A22dKKqJCXlEoQzEXzG3pRUC7FW80J8Qf9gUmwNQW hZhAlFbC6dCZGfcRjf4ATIx4D1SVznAmJsyEQ66Q0SEuCXdNXIL5AIQ/QDVDUYoNRRCAax SuFA8btbYRH99IzdSabUmJGs4SlW0emLwyYCStBl2uFKsyNGHb1WpZfJHzPoMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689667081; a=rsa-sha256; cv=none; b=oLbPnqps3XSW3QPssNr9v+jIy49n+f2uFZn9HdQYFd9YFPMSWrajdtt4raxI4VVOMG6K6a VRnhKWYYMdhixu0hjYFskqPWMf6sm310AxvUvAnazkUY7gg5u21yIKK9CQAMamU+WUiT0k +CBNRXBbNXJe8BIgPUVAFFLV4/Hd94XNrKr9jHwtUO5WNg4dW0hFQ4Omcm+rNpzBgbM7CA y2jUYHkkguO1+GTcKgHaO62Cc3zs26fWFZtpNm7EHMOP32r+XOxJa60THakWfjzdS6GW2n NMajQfFagP+5KACbUYuv66VoOkI7D5h3yiG7y5bSUcVmPF6VvWLoZPnI3ddinw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R4rsh6wt0zxxN; Tue, 18 Jul 2023 07:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36I7w0Q3086930; Tue, 18 Jul 2023 07:58:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36I7w0fp086929; Tue, 18 Jul 2023 07:58:00 GMT (envelope-from git) Date: Tue, 18 Jul 2023 07:58:00 GMT Message-Id: <202307180758.36I7w0fp086929@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Adriaan de Groot Subject: git: fff9c832f9ef - main - net-im/neochat: fix build against newer libquotient List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adridg X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fff9c832f9ef4e2d3c5bd54a8a2abb4e472ed193 Auto-Submitted: auto-generated The branch main has been updated by adridg: URL: https://cgit.FreeBSD.org/ports/commit/?id=fff9c832f9ef4e2d3c5bd54a8a2abb4e472ed193 commit fff9c832f9ef4e2d3c5bd54a8a2abb4e472ed193 Author: Adriaan de Groot AuthorDate: 2023-07-18 07:56:27 +0000 Commit: Adriaan de Groot CommitDate: 2023-07-18 07:57:59 +0000 net-im/neochat: fix build against newer libquotient Previous commit had rakuco@'s fixes for the build, but none of the patches needed to make it build against newer libquotient. --- net-im/neochat/Makefile | 2 +- ...-8f4e5a41c58986b68406251051c26beb059dd9ce.patch | 55 +++++++++++++ ...-805332c599308b927a1fdc676f95c96878b28d58.patch | 75 ++++++++++++++++++ ...-ae6056615db2fa943551acdcadfd54bfebe3c114.patch | 25 ++++++ ...-a94f46f90462dce1f817e9f28d24dad454e0dfb4.patch | 91 ++++++++++++++++++++++ .../files/patch-020-always-enable-e2ee.patch | 27 +++++++ net-im/neochat/files/patch-021-controller.patch | 14 ++++ 7 files changed, 288 insertions(+), 1 deletion(-) diff --git a/net-im/neochat/Makefile b/net-im/neochat/Makefile index df345178aa6b..024a578fce1c 100644 --- a/net-im/neochat/Makefile +++ b/net-im/neochat/Makefile @@ -1,6 +1,6 @@ PORTNAME= neochat DISTVERSION= ${KDE_APPLICATIONS_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-im deskutils kde kde-applications MAINTAINER= kde@FreeBSD.org diff --git a/net-im/neochat/files/patch-003-8f4e5a41c58986b68406251051c26beb059dd9ce.patch b/net-im/neochat/files/patch-003-8f4e5a41c58986b68406251051c26beb059dd9ce.patch new file mode 100644 index 000000000000..a0f02602943e --- /dev/null +++ b/net-im/neochat/files/patch-003-8f4e5a41c58986b68406251051c26beb059dd9ce.patch @@ -0,0 +1,55 @@ +From 8f4e5a41c58986b68406251051c26beb059dd9ce Mon Sep 17 00:00:00 2001 +From: Tobias Fella +Date: Sun, 28 May 2023 11:22:40 +0200 +Subject: [PATCH] Drop reset*Count invocations + +Still coming from Spectral, where they were taken from Quaternion, where they were dropped because they don't work as expected. +Also, soon to be removed from libQuotient itself. +--- + src/neochatroom.cpp | 10 ---------- + src/neochatroom.h | 1 - + 2 files changed, 11 deletions(-) + +diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp +index a98b6cdbe..101c0fc50 100644 +--- src/neochatroom.cpp ++++ src/neochatroom.cpp +@@ -66,8 +66,6 @@ NeoChatRoom::NeoChatRoom(Connection *connection, QString roomId, JoinState joinS + : Room(connection, std::move(roomId), joinState) + { + connect(connection, &Connection::accountDataChanged, this, &NeoChatRoom::updatePushNotificationState); +- connect(this, &NeoChatRoom::notificationCountChanged, this, &NeoChatRoom::countChanged); +- connect(this, &NeoChatRoom::highlightCountChanged, this, &NeoChatRoom::countChanged); + connect(this, &Room::fileTransferCompleted, this, [this] { + setFileUploadingProgress(0); + setHasFileUploading(false); +@@ -410,14 +408,6 @@ void NeoChatRoom::onRedaction(const RoomEvent &prevEvent, const RoomEvent & /*af + } + } + +-void NeoChatRoom::countChanged() +-{ +- if (displayed() && !hasUnreadMessages()) { +- resetNotificationCount(); +- resetHighlightCount(); +- } +-} +- + QDateTime NeoChatRoom::lastActiveTime() + { + if (timelineSize() == 0) { +diff --git a/src/neochatroom.h b/src/neochatroom.h +index d0795f383..6125cfa96 100644 +--- src/neochatroom.h ++++ src/neochatroom.h +@@ -866,7 +866,6 @@ private: + #endif + + private Q_SLOTS: +- void countChanged(); + void updatePushNotificationState(QString type); + + void cacheLastEvent(); +-- +GitLab + diff --git a/net-im/neochat/files/patch-008-805332c599308b927a1fdc676f95c96878b28d58.patch b/net-im/neochat/files/patch-008-805332c599308b927a1fdc676f95c96878b28d58.patch new file mode 100644 index 000000000000..ed6fc8d0518e --- /dev/null +++ b/net-im/neochat/files/patch-008-805332c599308b927a1fdc676f95c96878b28d58.patch @@ -0,0 +1,75 @@ +From 805332c599308b927a1fdc676f95c96878b28d58 Mon Sep 17 00:00:00 2001 +From: Tobias Fella +Date: Wed, 17 May 2023 23:49:56 +0200 +Subject: [PATCH] Don't use implicit lambda captures + +--- + src/controller.cpp | 6 +++--- + src/models/roomlistmodel.cpp | 2 +- + src/notificationsmanager.cpp | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/controller.cpp b/src/controller.cpp +index 1fc017a4e..3d1c3ffd4 100644 +--- src/controller.cpp ++++ src/controller.cpp +@@ -113,10 +113,10 @@ Controller::Controller(QObject *parent) + + #ifdef QUOTIENT_07 + static int oldAccountCount = 0; +- connect(&AccountRegistry::instance(), &AccountRegistry::accountCountChanged, this, [=]() { ++ connect(&AccountRegistry::instance(), &AccountRegistry::accountCountChanged, this, [this]() { + if (AccountRegistry::instance().size() > oldAccountCount) { + auto connection = AccountRegistry::instance().accounts()[AccountRegistry::instance().size() - 1]; +- connect(connection, &Connection::syncDone, this, [=]() { ++ connect(connection, &Connection::syncDone, this, [this]() { + handleNotifications(connection); + }); + } +@@ -552,7 +552,7 @@ void Controller::setActiveConnection(Connection *connection) + m_isOnline = true; + Q_EMIT isOnlineChanged(true); + }); +- connect(connection, &Connection::requestFailed, this, [=](BaseJob *job) { ++ connect(connection, &Connection::requestFailed, this, [](BaseJob *job) { + if (dynamic_cast(job) && job->jsonData()["errcode"].toString() == "M_TOO_LARGE"_ls) { + RoomManager::instance().warning(i18n("File too large to download."), i18n("Contact your matrix server administrator for support.")); + } +diff --git a/src/models/roomlistmodel.cpp b/src/models/roomlistmodel.cpp +index 3129b90de..c4c9a3d9c 100644 +--- src/models/roomlistmodel.cpp ++++ src/models/roomlistmodel.cpp +@@ -281,7 +281,7 @@ void RoomListModel::updateRoom(Room *room, Room *prev) + } + // Ok, we're through with pre-checks, now for the real thing. + auto newRoom = static_cast(room); +- const auto it = std::find_if(m_rooms.begin(), m_rooms.end(), [=](const NeoChatRoom *r) { ++ const auto it = std::find_if(m_rooms.begin(), m_rooms.end(), [prev, newRoom](const NeoChatRoom *r) { + return r == prev || r == newRoom; + }); + if (it != m_rooms.end()) { +diff --git a/src/notificationsmanager.cpp b/src/notificationsmanager.cpp +index a79296529..baf6d50a5 100644 +--- src/notificationsmanager.cpp ++++ src/notificationsmanager.cpp +@@ -78,7 +78,7 @@ void NotificationsManager::postNotification(NeoChatRoom *room, + notification->setPixmap(QPixmap::fromImage(icon)); + + notification->setDefaultAction(i18n("Open NeoChat in this room")); +- connect(notification, &KNotification::defaultActivated, this, [=]() { ++ connect(notification, &KNotification::defaultActivated, this, [notification, room]() { + WindowController::instance().showAndRaiseWindow(notification->xdgActivationToken()); + if (!room) { + return; +@@ -118,7 +118,7 @@ void NotificationsManager::postInviteNotification(NeoChatRoom *room, const QStri + notification->setPixmap(img); + notification->setFlags(KNotification::Persistent); + notification->setDefaultAction(i18n("Open this invitation in NeoChat")); +- connect(notification, &KNotification::defaultActivated, this, [=]() { ++ connect(notification, &KNotification::defaultActivated, this, [notification, room]() { + WindowController::instance().showAndRaiseWindow(notification->xdgActivationToken()); + notification->close(); + RoomManager::instance().enterRoom(room); +-- +GitLab + diff --git a/net-im/neochat/files/patch-009-ae6056615db2fa943551acdcadfd54bfebe3c114.patch b/net-im/neochat/files/patch-009-ae6056615db2fa943551acdcadfd54bfebe3c114.patch new file mode 100644 index 000000000000..65ede9c52c1b --- /dev/null +++ b/net-im/neochat/files/patch-009-ae6056615db2fa943551acdcadfd54bfebe3c114.patch @@ -0,0 +1,25 @@ +From ae6056615db2fa943551acdcadfd54bfebe3c114 Mon Sep 17 00:00:00 2001 +From: Tobias Fella +Date: Thu, 18 May 2023 00:03:07 +0200 +Subject: [PATCH] Add missing capture + +--- + src/controller.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/controller.cpp b/src/controller.cpp +index 3d1c3ffd4..dd38ede9b 100644 +--- src/controller.cpp ++++ src/controller.cpp +@@ -116,7 +116,7 @@ Controller::Controller(QObject *parent) + connect(&AccountRegistry::instance(), &AccountRegistry::accountCountChanged, this, [this]() { + if (AccountRegistry::instance().size() > oldAccountCount) { + auto connection = AccountRegistry::instance().accounts()[AccountRegistry::instance().size() - 1]; +- connect(connection, &Connection::syncDone, this, [this]() { ++ connect(connection, &Connection::syncDone, this, [this, connection]() { + handleNotifications(connection); + }); + } +-- +GitLab + diff --git a/net-im/neochat/files/patch-010-a94f46f90462dce1f817e9f28d24dad454e0dfb4.patch b/net-im/neochat/files/patch-010-a94f46f90462dce1f817e9f28d24dad454e0dfb4.patch new file mode 100644 index 000000000000..e44a17ef2cd6 --- /dev/null +++ b/net-im/neochat/files/patch-010-a94f46f90462dce1f817e9f28d24dad454e0dfb4.patch @@ -0,0 +1,91 @@ +From a94f46f90462dce1f817e9f28d24dad454e0dfb4 Mon Sep 17 00:00:00 2001 +From: Tobias Fella +Date: Fri, 26 May 2023 17:47:26 +0200 +Subject: [PATCH] Fix build against libQuotient 0.8 + +--- + src/controller.cpp | 24 ++++++++++++++++++++---- + src/login.cpp | 4 ++++ + 2 files changed, 24 insertions(+), 4 deletions(-) + +diff --git a/src/controller.cpp b/src/controller.cpp +index dd38ede9b..3835e312b 100644 +--- src/controller.cpp ++++ src/controller.cpp +@@ -109,18 +109,22 @@ Controller::Controller(QObject *parent) + } + #endif + ++#ifdef QUOTIENT_07 ++ connect(&Accounts, &AccountRegistry::accountCountChanged, this, &Controller::activeConnectionIndexChanged); ++#else + connect(&AccountRegistry::instance(), &AccountRegistry::accountCountChanged, this, &Controller::activeConnectionIndexChanged); ++#endif + + #ifdef QUOTIENT_07 + static int oldAccountCount = 0; +- connect(&AccountRegistry::instance(), &AccountRegistry::accountCountChanged, this, [this]() { +- if (AccountRegistry::instance().size() > oldAccountCount) { +- auto connection = AccountRegistry::instance().accounts()[AccountRegistry::instance().size() - 1]; ++ connect(&Accounts, &AccountRegistry::accountCountChanged, this, [this]() { ++ if (Accounts.size() > oldAccountCount) { ++ auto connection = Accounts.accounts()[Accounts.size() - 1]; + connect(connection, &Connection::syncDone, this, [this, connection]() { + handleNotifications(connection); + }); + } +- oldAccountCount = AccountRegistry::instance().size(); ++ oldAccountCount = Accounts.size(); + }); + #endif + } +@@ -228,10 +232,18 @@ void Controller::logout(Connection *conn, bool serverSideLogout) + job.start(); + loop.exec(); + ++#ifdef QUOTIENT_07 ++ if (Accounts.count() > 1) { ++#else + if (AccountRegistry::instance().count() > 1) { ++#endif + // Only set the connection if the the account being logged out is currently active + if (conn == activeConnection()) { ++#ifdef QUOTIENT_07 ++ setActiveConnection(Accounts.accounts()[0]); ++#else + setActiveConnection(AccountRegistry::instance().accounts()[0]); ++#endif + } + } else { + setActiveConnection(nullptr); +@@ -495,7 +507,11 @@ NeochatChangePasswordJob::NeochatChangePasswordJob(const QString &newPassword, b + + int Controller::accountCount() const + { ++#ifdef QUOTIENT_07 ++ return Accounts.count(); ++#else + return AccountRegistry::instance().count(); ++#endif + } + + void Controller::setQuitOnLastWindowClosed() +diff --git a/src/login.cpp b/src/login.cpp +index 1121875f9..8b937abaa 100644 +--- src/login.cpp ++++ src/login.cpp +@@ -43,7 +43,11 @@ void Login::init() + return; + } + ++#ifdef QUOTIENT_07 ++ m_isLoggedIn = Accounts.isLoggedIn(m_matrixId); ++#else + m_isLoggedIn = AccountRegistry::instance().isLoggedIn(m_matrixId); ++#endif + Q_EMIT isLoggedInChanged(); + if (m_isLoggedIn) { + return; +-- +GitLab + diff --git a/net-im/neochat/files/patch-020-always-enable-e2ee.patch b/net-im/neochat/files/patch-020-always-enable-e2ee.patch new file mode 100644 index 000000000000..44bd47c34d2f --- /dev/null +++ b/net-im/neochat/files/patch-020-always-enable-e2ee.patch @@ -0,0 +1,27 @@ +From 025b367a7e5b4927a823a754e677ba573f3cac60 Mon Sep 17 00:00:00 2001 +From: Tobias Fella +Date: Sun, 21 May 2023 22:21:32 +0200 +Subject: [PATCH 1/4] Always enable E2EE in libQuotient + +It's off-by-default in libQuotient 0.8 +--- + src/main.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/main.cpp b/src/main.cpp +index a626d9ef..634f4af2 100644 +--- src/main.cpp ++++ src/main.cpp +@@ -195,6 +195,10 @@ int main(int argc, char *argv[]) + + initLogging(); + ++#if Quotient_VERSION_MINOR == 8 ++ Connection::setEncryptionDefault(true); ++#endif ++ + #ifdef NEOCHAT_FLATPAK + // Copy over the included FontConfig configuration to the + // app's config dir: +-- +2.41.0 diff --git a/net-im/neochat/files/patch-021-controller.patch b/net-im/neochat/files/patch-021-controller.patch new file mode 100644 index 000000000000..85de3be5f2f0 --- /dev/null +++ b/net-im/neochat/files/patch-021-controller.patch @@ -0,0 +1,14 @@ +--- src/controller.cpp 2023-07-18 09:44:46.451178000 +0200 ++++ src/controller.cpp.orig 2023-07-18 09:44:18.501074000 +0200 +@@ -307,10 +307,7 @@ + { + Q_ASSERT_X(c, __FUNCTION__, "Attempt to add a null connection"); + ++ Accounts.add(c); +-#ifndef QUOTIENT_07 +- AccountRegistry::instance().add(c); +-#endif +- + c->setLazyLoading(true); + + connect(c, &Connection::syncDone, this, [this, c] {