Monday, July 08, 2024

Re: [update] nheko 0.12/mtxclient 0.10

On Mon Jul 08, 2024 at 09:05:44AM GMT, Landry Breuil wrote:
> hi,
>
> here's a wip update for nheko 0.12 which switched upstream to qt6, cf
> https://github.com/Nheko-Reborn/nheko/releases/tag/v0.12.0
> there's also an update for mtxclient 0.10.0 cf
> https://github.com/Nheko-Reborn/mtxclient/releases/tag/v0.10.0
>
> wip packages are available on https://packages.rhaalovely.net/wip/amd64/
> using the trick from
> https://github.com/Nheko-Reborn/nheko/issues/1187#issuecomment-1255831124
> i've been able to connect to a matrix account and verify this new
> device.
>
> portswise, it builds a bundled copy of
> https://github.com/KDAB/KDSingleApplication for which we could have a
> distinct port, opinion welcome on that.
>
> testing welcome!
>
> Landry

New diff with some tweaks:

- use x11/kdsingleapplication (attached)
- Regen WANTLIB again with kdsingleapplication
- Remove qt5 RUN_DEPENDS
- Remove x11/qt6/qtbase it comes with the moudle
- Tweaked COMMENT and DESCR

OK for mtxclient. Please feel free to import kdsingleapplication and
commit your diffs.

diff --git a/net/nheko/Makefile b/net/nheko/Makefile
index 0073ee47a94..fd6634d9bd8 100644
--- a/net/nheko/Makefile
+++ b/net/nheko/Makefile
@@ -1,37 +1,34 @@
-COMMENT = desktop client for Matrix using Qt and C++20
+COMMENT = desktop client for Matrix

GH_ACCOUNT = Nheko-Reborn
GH_PROJECT = nheko
-GH_TAGNAME = v0.11.3
-REVISION = 1
+GH_TAGNAME = v0.12.0

CATEGORIES= net

# GPLv3
PERMIT_PACKAGE= Yes

-WANTLIB += ${COMPILER_LIBCXX} Qt5Concurrent Qt5Core Qt5DBus Qt5Gui
-WANTLIB += Qt5Multimedia Qt5Network Qt5Qml Qt5QmlModels Qt5Quick
-WANTLIB += Qt5QuickControls2 Qt5QuickWidgets Qt5Svg Qt5Widgets
-WANTLIB += c cmark coeurl crypto fmt glib-2.0 gobject-2.0 gstbase-1.0
-WANTLIB += gstreamer-1.0 gstsdp-1.0 gstwebrtc-1.0 intl lmdb m
-WANTLIB += matrix_client olm qt5keychain spdlog ssl xcb xcb-ewmh
+WANTLIB += ${COMPILER_LIBCXX} GL Qt6Core Qt6DBus Qt6Gui Qt6Multimedia
+WANTLIB += Qt6Network Qt6OpenGL Qt6Qml Qt6QmlModels Qt6Quick Qt6QuickControls2
+WANTLIB += Qt6Svg Qt6Widgets c cmark coeurl crypto fmt glib-2.0
+WANTLIB += gobject-2.0 gstbase-1.0 gstgl-1.0 gstreamer-1.0 gstsdp-1.0
+WANTLIB += gstvideo-1.0 gstwebrtc-1.0 intl kdsingleapplication-qt6
+WANTLIB += lmdb m matrix_client olm qt6keychain spdlog ssl xkbcommon

MODULES = devel/cmake \
- x11/qt5
+ x11/qt6

# C++20
COMPILER = base-clang ports-gcc

RUN_DEPENDS = devel/desktop-file-utils \
- x11/qt5/qtgraphicaleffects \
x11/gtk+4,-guic

BUILD_DEPENDS = databases/lmdbxx \
devel/boost \
textproc/asciidoc \
- textproc/nlohmann-json \
- x11/qt5/qtbase
+ textproc/nlohmann-json

LIB_DEPENDS = databases/lmdb \
devel/coeurl>=0.3.0 \
@@ -40,11 +37,12 @@ LIB_DEPENDS = databases/lmdb \
devel/spdlog \
multimedia/gstreamer1/core \
multimedia/gstreamer1/plugins-base \
- security/qtkeychain \
+ security/qtkeychain,qt6 \
textproc/cmark \
- x11/qt5/qtmultimedia \
- x11/qt5/qtquickcontrols2 \
- x11/qt5/qtsvg
+ x11/kdsingleapplication \
+ x11/qt6/qtdeclarative \
+ x11/qt6/qtmultimedia \
+ x11/qt6/qtsvg

# -DCMAKE_DISABLE_FIND_PACKAGE_GIT=ON (or _Git or _git) do not work
CONFIGURE_ARGS += -DGIT=OFF
diff --git a/net/nheko/distinfo b/net/nheko/distinfo
index ce5e83e56b1..1973fdd0930 100644
--- a/net/nheko/distinfo
+++ b/net/nheko/distinfo
@@ -1,2 +1,2 @@
-SHA256 (nheko-0.11.3.tar.gz) = 8oUVaISjoMaHDz+6icE9H9cMhye9F52DELE4GfimOjc=
-SIZE (nheko-0.11.3.tar.gz) = 1780179
+SHA256 (nheko-0.12.0.tar.gz) = o6dXi9k4aguaQYj6Epb93bffD4RsOXKLgKmY+dBvNtE=
+SIZE (nheko-0.12.0.tar.gz) = 2094339
diff --git a/net/nheko/patches/patch-src_Cache_cpp b/net/nheko/patches/patch-src_Cache_cpp
deleted file mode 100644
index 5ab9e208fff..00000000000
--- a/net/nheko/patches/patch-src_Cache_cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-- "Fruquent lag due to db sync" https://github.com/Nheko-Reborn/nheko/issues/1355
- Backout d8669ccf3d4429e44caa87e2592b3bc3afa4e41c
-- Fix build against fmt10
- e89e65dc17020772eb057414b4f0c5d6f4ad98d0
-
-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()));
-@@ -438,7 +438,7 @@ Cache::loadSecretsFromStore(
- if (job->error() && job->error() != QKeychain::Error::EntryNotFound) {
- nhlog::db()->error("Restoring secret '{}' failed ({}): {}",
- name.toStdString(),
-- job->error(),
-+ static_cast<int>(job->error()),
- job->errorString().toStdString());
-
- fatalSecretError();
diff --git a/net/nheko/patches/patch-src_ChatPage_cpp b/net/nheko/patches/patch-src_ChatPage_cpp
deleted file mode 100644
index 18f30d2b6fd..00000000000
--- a/net/nheko/patches/patch-src_ChatPage_cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-Fix build with fmt 10.1.0
-871e403f6799df48cfbbe08eba56d473a0c34216
-
-Index: src/ChatPage.cpp
---- src/ChatPage.cpp.orig
-+++ src/ChatPage.cpp
-@@ -1248,7 +1248,7 @@ ChatPage::getBackupVersion()
- nhlog::crypto()->info("Our backup key {} does not match the one "
- "used in the online backup {}",
- pubkey,
-- auth_data["public_key"]);
-+ auth_data["public_key"].get<std::string>());
- cache::client()->deleteBackupVersion();
- return;
- }
-@@ -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();
-

No comments:

Post a Comment