Download raw body.
[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();
- #endif
- }
diff --git a/net/nheko/patches/patch-src_LoginPage_h b/net/nheko/patches/patch-src_LoginPage_h
deleted file mode 100644
index 826666f3154..00000000000
--- a/net/nheko/patches/patch-src_LoginPage_h
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: src/LoginPage.h
---- src/LoginPage.h.orig
-+++ src/LoginPage.h
-@@ -100,6 +100,8 @@ class LoginPage : public QObject (public)
- return "Nheko on Windows";
- #elif defined(Q_OS_FREEBSD)
- return "Nheko on FreeBSD";
-+#elif defined(Q_OS_OPENBSD)
-+ return "Nheko on OpenBSD";
- #else
- return "Nheko";
- #endif
diff --git a/net/nheko/patches/patch-src_encryption_DeviceVerificationFlow_cpp b/net/nheko/patches/patch-src_encryption_DeviceVerificationFlow_cpp
deleted file mode 100644
index aa7aef3d0e2..00000000000
--- a/net/nheko/patches/patch-src_encryption_DeviceVerificationFlow_cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-Fix build against fmt10
-e89e65dc17020772eb057414b4f0c5d6f4ad98d0
-
-Index: src/encryption/DeviceVerificationFlow.cpp
---- src/encryption/DeviceVerificationFlow.cpp.orig
-+++ src/encryption/DeviceVerificationFlow.cpp
-@@ -39,7 +39,7 @@ DeviceVerificationFlow::DeviceVerificationFlow(QObject
- , deviceIds(std::move(deviceIds_))
- , model_(model)
- {
-- nhlog::crypto()->debug("CREATING NEW FLOW, {}, {}", flow_type, (void *)this);
-+ nhlog::crypto()->debug("CREATING NEW FLOW, {}, {}", static_cast<int>(flow_type), (void *)this);
- if (deviceIds.size() == 1)
- deviceId = deviceIds.front();
-
diff --git a/net/nheko/patches/patch-src_main_cpp b/net/nheko/patches/patch-src_main_cpp
deleted file mode 100644
index 100c02cd684..00000000000
--- a/net/nheko/patches/patch-src_main_cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: src/main.cpp
---- src/main.cpp.orig
-+++ src/main.cpp
-@@ -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_MACOS)
- if (qgetenv("QT_SCALE_FACTOR").size() == 0) {
- float factor = utils::scaleFactor();
-
diff --git a/net/nheko/patches/patch-src_notifications_Manager_h b/net/nheko/patches/patch-src_notifications_Manager_h
deleted file mode 100644
index 2c4f2d79426..00000000000
--- a/net/nheko/patches/patch-src_notifications_Manager_h
+++ /dev/null
@@ -1,12 +0,0 @@
-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
-
diff --git a/net/nheko/patches/patch-src_timeline_InputBar_cpp b/net/nheko/patches/patch-src_timeline_InputBar_cpp
deleted file mode 100644
index 5a232aecfaf..00000000000
--- a/net/nheko/patches/patch-src_timeline_InputBar_cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-Fix build against fmt10
-e89e65dc17020772eb057414b4f0c5d6f4ad98d0
-
-Index: src/timeline/InputBar.cpp
---- src/timeline/InputBar.cpp.orig
-+++ src/timeline/InputBar.cpp
-@@ -948,14 +948,15 @@ MediaUpload::MediaUpload(std::unique_ptr<QIODevice> so
- this,
- [mediaPlayer](QMediaPlayer::Error error) {
- nhlog::ui()->debug("Media player error {} and errorStr {}",
-- error,
-+ static_cast<int>(error),
- mediaPlayer->errorString().toStdString());
- });
- connect(mediaPlayer,
- &QMediaPlayer::mediaStatusChanged,
- [mediaPlayer](QMediaPlayer::MediaStatus status) {
-- nhlog::ui()->debug(
-- "Media player status {} and error {}", status, mediaPlayer->error());
-+ nhlog::ui()->debug("Media player status {} and error {}",
-+ static_cast<int>(status),
-+ static_cast<int>(mediaPlayer->error()));
- });
- connect(mediaPlayer,
- qOverload<const QString &, const QVariant &>(&QMediaPlayer::metaDataChanged),
diff --git a/net/nheko/patches/patch-src_ui_MxcMediaProxy_cpp b/net/nheko/patches/patch-src_ui_MxcMediaProxy_cpp
deleted file mode 100644
index e2d349b6e46..00000000000
--- a/net/nheko/patches/patch-src_ui_MxcMediaProxy_cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-Fix build against fmt10
-e89e65dc17020772eb057414b4f0c5d6f4ad98d0
-
-Index: src/ui/MxcMediaProxy.cpp
---- src/ui/MxcMediaProxy.cpp.orig
-+++ src/ui/MxcMediaProxy.cpp
-@@ -37,11 +37,13 @@ MxcMediaProxy::MxcMediaProxy(QObject *parent)
- qOverload<QMediaPlayer::Error>(&MxcMediaProxy::error),
- [this](QMediaPlayer::Error error) {
- nhlog::ui()->info("Media player error {} and errorStr {}",
-- error,
-+ static_cast<int>(error),
- this->errorString().toStdString());
- });
- connect(this, &MxcMediaProxy::mediaStatusChanged, [this](QMediaPlayer::MediaStatus status) {
-- nhlog::ui()->info("Media player status {} and error {}", status, this->error());
-+ nhlog::ui()->info("Media player status {} and error {}",
-+ static_cast<int>(status),
-+ static_cast<int>(this->error()));
- });
- connect(this,
- qOverload<const QString &, const QVariant &>(&MxcMediaProxy::metaDataChanged),
diff --git a/net/nheko/pkg/DESCR b/net/nheko/pkg/DESCR
index 3d008163194..405c495cacb 100644
--- a/net/nheko/pkg/DESCR
+++ b/net/nheko/pkg/DESCR
@@ -1 +1 @@
-Native desktop application for Matrix.
+Desktop client for Matrix using Qt and C++20.
[update] nheko 0.12/mtxclient 0.10