On Wed, Feb 22, 2023 at 07:40:36PM +0000, Klemens Nanni wrote: > This version (maybe 0.11.1 as well, did not try) builds and starts, but > makes my system lag so much, that I have to switch to another tty to > kill the process... while waiting a good minute for everything to react. > > Old nheko configures but fails to build with newer mtxclient, so unlike > coeurl, those two need to be worked on in sync. > > I'll probably just report this upstream rather than spending more of my > time on it.
New versions fsync db files too much, there is an issue upstream. Reverting the commit to 0.10.2 (current port) behaviour fixes it. > In the process, I've also sent our local patches upstream. > 0.11.2 required more patches to build. 0.11.3 fixed some emoji stuff -- I don't use them, so I don't know. This works for me on amd64. patches/ only contains the one backout and upstreamed OpenBSD support bits. Feedback? OK? Index: devel/mtxclient/Makefile =================================================================== RCS file: /cvs/ports/devel/mtxclient/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- devel/mtxclient/Makefile 22 Feb 2023 03:01:58 -0000 1.4 +++ devel/mtxclient/Makefile 23 Feb 2023 03:59:43 -0000 @@ -1,27 +1,28 @@ COMMENT = client API for Matrix, built on libcurl CATEGORIES = devel -SHARED_LIBS += matrix_client 1.0 +SHARED_LIBS += matrix_client 2.0 GH_ACCOUNT = Nheko-Reborn GH_PROJECT = mtxclient -GH_TAGNAME = v0.8.2 +GH_TAGNAME = v0.9.2 # MIT PERMIT_PACKAGE = Yes -WANTLIB += ${COMPILER_LIBCXX} coeurl crypto m olm ssl +WANTLIB += ${COMPILER_LIBCXX} coeurl crypto m olm re2 spdlog ssl MODULES = devel/cmake BUILD_DEPENDS = devel/libevent2 \ - devel/spdlog \ textproc/nlohmann-json -LIB_DEPENDS = devel/coeurl \ - devel/olm>=3.2.7 +LIB_DEPENDS = devel/coeurl>=0.3.0 \ + devel/olm>=3.2.7 \ + devel/spdlog \ + textproc/re2 -# C++17 +# C++20 COMPILER = base-clang ports-gcc CONFIGURE_ARGS += -DBUILD_LIB_EXAMPLES=OFF Index: devel/mtxclient/distinfo =================================================================== RCS file: /cvs/ports/devel/mtxclient/distinfo,v retrieving revision 1.2 diff -u -p -r1.2 distinfo --- devel/mtxclient/distinfo 10 Sep 2022 16:24:48 -0000 1.2 +++ devel/mtxclient/distinfo 22 Feb 2023 17:57:25 -0000 @@ -1,2 +1,2 @@ -SHA256 (mtxclient-0.8.2.tar.gz) = TKoS3flUuUktHsm2yjLvD8ZHhVXyKdsHTUO8XMKanIk= -SIZE (mtxclient-0.8.2.tar.gz) = 609627 +SHA256 (mtxclient-0.9.2.tar.gz) = 9Vgn/boibG/ECc8ADHKxPMbQaewTACg6cjmqGckMX1Y= +SIZE (mtxclient-0.9.2.tar.gz) = 623481 Index: devel/mtxclient/pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/mtxclient/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- devel/mtxclient/pkg/PLIST 10 Sep 2022 16:24:48 -0000 1.2 +++ devel/mtxclient/pkg/PLIST 22 Feb 2023 17:57:26 -0000 @@ -25,6 +25,7 @@ include/mtx/events/join_rules.hpp include/mtx/events/member.hpp include/mtx/events/messages/ include/mtx/events/messages/audio.hpp +include/mtx/events/messages/confetti.hpp include/mtx/events/messages/emote.hpp include/mtx/events/messages/file.hpp include/mtx/events/messages/image.hpp @@ -74,6 +75,7 @@ include/mtx/responses/public_rooms.hpp include/mtx/responses/register.hpp include/mtx/responses/sync.hpp include/mtx/responses/turn_server.hpp +include/mtx/responses/users.hpp include/mtx/responses/version.hpp include/mtx/responses/well-known.hpp include/mtx/secret_storage.hpp Index: net/nheko/Makefile =================================================================== RCS file: /cvs/ports/net/nheko/Makefile,v retrieving revision 1.7 diff -u -p -r1.7 Makefile --- net/nheko/Makefile 22 Feb 2023 03:35:02 -0000 1.7 +++ net/nheko/Makefile 23 Feb 2023 04:57:16 -0000 @@ -1,8 +1,8 @@ -COMMENT = desktop client for Matrix using Qt and C++17 +COMMENT = desktop client for Matrix using Qt and C++20 GH_ACCOUNT = Nheko-Reborn GH_PROJECT = nheko -GH_TAGNAME = v0.10.2 +GH_TAGNAME = v0.11.3 CATEGORIES= net @@ -19,7 +19,7 @@ WANTLIB += matrix_client olm qt5keychain MODULES = devel/cmake \ x11/qt5 -# C++17 +# C++20 COMPILER = base-clang ports-gcc RUN_DEPENDS = devel/desktop-file-utils \ @@ -33,8 +33,8 @@ BUILD_DEPENDS = databases/lmdbxx \ x11/qt5/qtbase LIB_DEPENDS = databases/lmdb \ - devel/coeurl \ - devel/mtxclient \ + devel/coeurl>=0.3.0 \ + devel/mtxclient>=0.9.2 \ devel/olm \ devel/spdlog \ multimedia/gstreamer1/core \ Index: net/nheko/distinfo =================================================================== RCS file: /cvs/ports/net/nheko/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- net/nheko/distinfo 5 Oct 2022 09:07:56 -0000 1.3 +++ net/nheko/distinfo 23 Feb 2023 04:58:10 -0000 @@ -1,2 +1,2 @@ -SHA256 (nheko-0.10.2.tar.gz) = AKDanxNOBwdT7+/DvIaAK2D+OF8t6pN5ecCCRjS0wkg= -SIZE (nheko-0.10.2.tar.gz) = 1608905 +SHA256 (nheko-0.11.3.tar.gz) = 8oUVaISjoMaHDz+6icE9H9cMhye9F52DELE4GfimOjc= +SIZE (nheko-0.11.3.tar.gz) = 1780179 Index: net/nheko/patches/patch-src_Cache_cpp =================================================================== RCS file: net/nheko/patches/patch-src_Cache_cpp diff -N net/nheko/patches/patch-src_Cache_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ net/nheko/patches/patch-src_Cache_cpp 23 Feb 2023 05:12:41 -0000 @@ -0,0 +1,15 @@ +"Fruquent lag due to db sync" https://github.com/Nheko-Reborn/nheko/issues/1355 +Backout d8669ccf3d4429e44caa87e2592b3bc3afa4e41c + +Index: src/Cache.cpp +--- src/Cache.cpp.orig ++++ src/Cache.cpp +@@ -293,7 +293,7 @@ Cache::setup() + // + // 2022-10-28: Disable the nosync flags again in the hope to crack down on some database + // corruption. +- env_.open(cacheDirectory_.toStdString().c_str()); //, MDB_NOMETASYNC | MDB_NOSYNC); ++ env_.open(cacheDirectory_.toStdString().c_str(), MDB_NOMETASYNC | MDB_NOSYNC); + } catch (const lmdb::error &e) { + if (e.code() != MDB_VERSION_MISMATCH && e.code() != MDB_INVALID) { + throw std::runtime_error("LMDB initialization failed" + std::string(e.what())); Index: net/nheko/patches/patch-src_ChatPage_cpp =================================================================== RCS file: net/nheko/patches/patch-src_ChatPage_cpp diff -N net/nheko/patches/patch-src_ChatPage_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ net/nheko/patches/patch-src_ChatPage_cpp 23 Feb 2023 04:59:03 -0000 @@ -0,0 +1,12 @@ +Index: src/ChatPage.cpp +--- src/ChatPage.cpp.orig ++++ src/ChatPage.cpp +@@ -1664,7 +1664,7 @@ ChatPage::isRoomActive(const QString &room_id) + void + ChatPage::removeAllNotifications() + { +-#if defined(Q_OS_LINUX) ++#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) + notificationsManager->closeAllNotifications(); + #endif + } Index: net/nheko/patches/patch-src_LoginPage_h =================================================================== RCS file: /cvs/ports/net/nheko/patches/patch-src_LoginPage_h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-src_LoginPage_h --- net/nheko/patches/patch-src_LoginPage_h 28 Jun 2022 12:52:30 -0000 1.1.1.1 +++ net/nheko/patches/patch-src_LoginPage_h 23 Feb 2023 05:16:11 -0000 @@ -1,7 +1,7 @@ Index: src/LoginPage.h --- src/LoginPage.h.orig +++ src/LoginPage.h -@@ -99,6 +99,8 @@ class LoginPage : public QObject (public) +@@ -100,6 +100,8 @@ class LoginPage : public QObject (public) return "Nheko on Windows"; #elif defined(Q_OS_FREEBSD) return "Nheko on FreeBSD"; Index: net/nheko/patches/patch-src_main_cpp =================================================================== RCS file: /cvs/ports/net/nheko/patches/patch-src_main_cpp,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-src_main_cpp --- net/nheko/patches/patch-src_main_cpp 28 Jun 2022 12:52:30 -0000 1.1.1.1 +++ net/nheko/patches/patch-src_main_cpp 23 Feb 2023 04:59:03 -0000 @@ -1,12 +1,12 @@ Index: src/main.cpp --- src/main.cpp.orig +++ src/main.cpp -@@ -157,7 +157,7 @@ main(int argc, char *argv[]) +@@ -162,7 +162,7 @@ main(int argc, char *argv[]) // this needs to be after setting the application name. Or how would we find our settings // file then? -#if defined(Q_OS_LINUX) || defined(Q_OS_WIN) || defined(Q_OS_FREEBSD) -+#if defined(Q_OS_LINUX) || defined(Q_OS_WIN) || defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) ++#if !defined(Q_OS_MACOS) if (qgetenv("QT_SCALE_FACTOR").size() == 0) { float factor = utils::scaleFactor(); Index: net/nheko/patches/patch-src_notifications_Manager_h =================================================================== RCS file: net/nheko/patches/patch-src_notifications_Manager_h diff -N net/nheko/patches/patch-src_notifications_Manager_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ net/nheko/patches/patch-src_notifications_Manager_h 23 Feb 2023 04:59:03 -0000 @@ -0,0 +1,12 @@ +Index: src/notifications/Manager.h +--- src/notifications/Manager.h.orig ++++ src/notifications/Manager.h +@@ -55,7 +55,7 @@ public slots: + #if defined(NHEKO_DBUS_SYS) + public: + void closeNotifications(QString roomId); +-#if defined(Q_OS_LINUX) ++#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) + void closeAllNotifications(); + #endif +