diff --git a/net-im/nheko/nheko-0.11.3.recipe b/net-im/nheko/nheko-0.12.0.recipe similarity index 74% rename from net-im/nheko/nheko-0.11.3.recipe rename to net-im/nheko/nheko-0.12.0.recipe index ea889a80b..26ba30799 100644 --- a/net-im/nheko/nheko-0.11.3.recipe +++ b/net-im/nheko/nheko-0.12.0.recipe @@ -1,14 +1,14 @@ SUMMARY="An IM client for Matrix" DESCRIPTION="The motivation behind the nheko is to provide a native desktop \ app for Matrix that feels more like a mainstream chat app (Element, Telegram \ -etc.) and less like an IRC client. It was developed using the Qt5 framework." +etc.) and less like an IRC client. It was developed using the Qt6 framework." HOMEPAGE="https://nheko.im/nheko-reborn/nheko" -COPYRIGHT="2017-2023 Nheko Authors" +COPYRIGHT="2017-2024 Nheko Authors" LICENSE="GNU GPL v3" -REVISION="4" +REVISION="1" SOURCE_URI="https://github.com/Nheko-Reborn/nheko/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="f285156884a3a0c6870f3fba89c13d1fd70c8727bd179d8310b13819f8a63a37" -SOURCE_FILENAME="nheko-$portVersion.tar.gz" +CHECKSUM_SHA256="a3a7578bd9386a0b9a4188fa1296fdddb7df0f846c39728b80a998f9d06f36d1" +SOURCE_FILENAME="nheko-v$portVersion.tar.gz" PATCHES="nheko-$portVersion.patchset" ADDITIONAL_FILES="nheko.rdef.in" @@ -33,19 +33,19 @@ REQUIRES=" lib:liblmdb$secondaryArchSuffix # lib:libmatrix_client$secondaryArchSuffix lib:libolm$secondaryArchSuffix - lib:libQt5Concurrent$secondaryArchSuffix - lib:libQt5Core$secondaryArchSuffix - lib:libQt5DBus$secondaryArchSuffix - lib:libQT5Gui$secondaryArchSuffix - lib:libqt5keychain$secondaryArchSuffix - lib:libQt5Multimedia$secondaryArchSuffix - lib:libQt5Network$secondaryArchSuffix - lib:libQt5Qml$secondaryArchSuffix - lib:libQt5Quick$secondaryArchSuffix - lib:libQt5QuickControls2$secondaryArchSuffix - lib:libQt5QuickWidgets$secondaryArchSuffix - lib:libQt5Svg$secondaryArchSuffix - lib:libQt5Widgets$secondaryArchSuffix + lib:libQt6Concurrent$secondaryArchSuffix + lib:libQt6Core$secondaryArchSuffix + lib:libQt6DBus$secondaryArchSuffix + lib:libQt6Gui$secondaryArchSuffix + lib:libQt6keychain$secondaryArchSuffix + lib:libQt6Multimedia$secondaryArchSuffix + lib:libQt6Network$secondaryArchSuffix + lib:libQt6Qml$secondaryArchSuffix + lib:libQt6Quick$secondaryArchSuffix + lib:libQt6QuickControls2$secondaryArchSuffix + lib:libQt6QuickWidgets$secondaryArchSuffix + lib:libQt6Svg$secondaryArchSuffix + lib:libQt6Widgets$secondaryArchSuffix lib:libre2$secondaryArchSuffix lib:libspdlog$secondaryArchSuffix lib:libz$secondaryArchSuffix @@ -66,8 +66,12 @@ BUILD_REQUIRES=" # devel:libmatrix_client$secondaryArchSuffix >= 0.5.1 devel:libolm$secondaryArchSuffix devel:liborc_0.4$secondaryArchSuffix - devel:libQt5Core$secondaryArchSuffix - devel:libqt5keychain$secondaryArchSuffix + devel:libQt6Core$secondaryArchSuffix + devel:libqt6uitools$secondaryArchSuffix + devel:libQt6keychain$secondaryArchSuffix + devel:libQt6Multimedia$secondaryArchSuffix + devel:libqt6Qml$secondaryArchSuffix + devel:libqt6Svg$secondaryArchSuffix devel:libre2$secondaryArchSuffix devel:libspdlog$secondaryArchSuffix devel:libssl$secondaryArchSuffix @@ -79,7 +83,6 @@ BUILD_PREREQUIRES=" cmd:cmake cmd:g++$secondaryArchSuffix cmd:git - cmd:linguist$secondaryArchSuffix >= 5 cmd:make cmd:pkg_config$secondaryArchSuffix " @@ -92,7 +95,8 @@ BUILD() -DSCREENSHARE_X11=OFF \ -DUSE_BUNDLED_MTXCLIENT=ON \ -DBUILD_SHARED_LIBS=OFF \ - -DCMAKE_EXE_LINKER_FLAGS="-lnetwork -lz" \ + -DUSE_BUNDLED_KDSINGLEAPPLICATION=ON \ + -DKDSingleApplication_STATIC=ON \ -Wno-dev make -C build $jobArgs } @@ -101,6 +105,9 @@ INSTALL() { make -C build install + mv $appsDir/nheko $appsDir/Nheko + rm -rf $dataDir $developDir $libDir + local APP_SIGNATURE="application/x-vnd.nheko" local MAJOR="`echo "$portVersion" | cut -d. -f1`" local MIDDLE="`echo "$portVersion" | cut -d. -f2`" @@ -113,9 +120,6 @@ INSTALL() -e "s|@LONG_INFO@|$SUMMARY|" \ $portDir/additional-files/nheko.rdef.in > nheko.rdef - mv $appsDir/nheko $appsDir/Nheko - rm -rf $dataDir $developDir $libDir - addResourcesToBinaries nheko.rdef $appsDir/Nheko addAppDeskbarSymlink $appsDir/Nheko } diff --git a/net-im/nheko/nheko-0.8.2.recipe b/net-im/nheko/nheko-0.8.2.recipe deleted file mode 100644 index 9267921dc..000000000 --- a/net-im/nheko/nheko-0.8.2.recipe +++ /dev/null @@ -1,120 +0,0 @@ -SUMMARY="An IM client for Matrix" -DESCRIPTION="The motivation behind the nheko is to provide a native desktop \ -app for Matrix that feels more like a mainstream chat app (Element, Telegram \ -etc.) and less like an IRC client. It was developed using the Qt5 framework." -HOMEPAGE="https://nheko.im/nheko-reborn/nheko" -COPYRIGHT="2017-2021 Nheko Authors" -LICENSE="GNU GPL v3" -REVISION="5" -SOURCE_URI="https://github.com/Nheko-Reborn/nheko/archive/v${portVersion}.tar.gz" -CHECKSUM_SHA256="df4575c47daab47d418637a4637b599e3848dd749132ca1e92f981d9212eabb2" -SOURCE_FILENAME="nheko-${portVersion}.tar.gz" -SOURCE_DIR="nheko-${portVersion}" -PATCHES="nheko-${portVersion}.patchset" -ADDITIONAL_FILES="nheko.rdef.in" - -boostMinimumVersion="1.70.0" - -ARCHITECTURES="?all !x86_gcc2" -SECONDARY_ARCHITECTURES="?x86" - -PROVIDES=" - nheko$secondaryArchSuffix = $portVersion - app:Nheko$secondaryArchSuffix = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libcmark$secondaryArchSuffix - lib:libcrypto$secondaryArchSuffix - lib:libfmt$secondaryArchSuffix - lib:liblmdb$secondaryArchSuffix - lib:libmatrix_client$secondaryArchSuffix - lib:libolm$secondaryArchSuffix - lib:libQt5Concurrent$secondaryArchSuffix - lib:libQt5Core$secondaryArchSuffix - lib:libQt5DBus$secondaryArchSuffix - lib:libQT5Gui$secondaryArchSuffix - lib:libqt5keychain$secondaryArchSuffix - lib:libQt5Multimedia$secondaryArchSuffix - lib:libQt5Qml$secondaryArchSuffix - lib:libQt5Quick$secondaryArchSuffix - lib:libQt5QuickControls2$secondaryArchSuffix - lib:libQt5QuickWidgets$secondaryArchSuffix - lib:libQt5Svg$secondaryArchSuffix - lib:libQt5Widgets$secondaryArchSuffix - lib:libspdlog$secondaryArchSuffix - lib:libssl$secondaryArchSuffix - lib:libz$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_devel - lmdbxx - devel:libboost_iostreams$secondaryArchSuffix >= $boostMinimumVersion - devel:libboost_system$secondaryArchSuffix >= $boostMinimumVersion - devel:libboost_thread$secondaryArchSuffix >= $boostMinimumVersion - devel:libcmark$secondaryArchSuffix - devel:libfmt$secondaryArchSuffix - devel:liblmdb$secondaryArchSuffix - devel:libmatrix_client$secondaryArchSuffix >= 0.5.1 - devel:libolm$secondaryArchSuffix - devel:libQt5Concurrent$secondaryArchSuffix - devel:libQt5Core$secondaryArchSuffix - devel:libQt5Dbus$secondaryArchSuffix - devel:libQt5Gui$secondaryArchSuffix - devel:libqt5keychain$secondaryArchSuffix - devel:libQt5Multimedia$secondaryArchSuffix - devel:libQt5Network$secondaryArchSuffix - devel:libQt5Qml$secondaryArchSuffix - devel:libQt5Quick$secondaryArchSuffix - devel:libQt5QuickControls2$secondaryArchSuffix - devel:libQt5QuickWidgets$secondaryArchSuffix - devel:libQt5Svg$secondaryArchSuffix - devel:libQt5Widgets$secondaryArchSuffix - devel:libspdlog$secondaryArchSuffix - devel:libssl$secondaryArchSuffix - devel:libz$secondaryArchSuffix - devel:nlohmann_json - devel:tweeny - " -BUILD_PREREQUIRES=" - cmd:g++$secondaryArchSuffix - cmd:cmake - cmd:linguist$secondaryArchSuffix >= 5 - cmd:make - cmd:pkg_config$secondaryArchSuffix - " - -BUILD() -{ - unset -f cmake - cmake -S. -Bbuild $cmakeDirArgs \ - -DCMAKE_INSTALL_BINDIR=$appsDir \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_EXE_LINKER_FLAGS="-lnetwork -lz" \ - -Wno-dev - make -C build $jobArgs -} - -INSTALL() -{ - make -C build install - - local APP_SIGNATURE="application/x-vnd.nheko" - local MAJOR="`echo "$portVersion" | cut -d. -f1`" - local MIDDLE="`echo "$portVersion" | cut -d. -f2`" - local MINOR="`echo "$portVersion" | cut -d. -f3`" - sed \ - -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ - -e "s|@MAJOR@|$MAJOR|" \ - -e "s|@MIDDLE@|$MIDDLE|" \ - -e "s|@MINOR@|$MINOR|" \ - -e "s|@LONG_INFO@|$SUMMARY|" \ - $portDir/additional-files/nheko.rdef.in > nheko.rdef - - mv $appsDir/nheko $appsDir/Nheko - rm -rf $dataDir - - addResourcesToBinaries nheko.rdef $appsDir/Nheko - addAppDeskbarSymlink $appsDir/Nheko -} diff --git a/net-im/nheko/patches/nheko-0.11.3.patchset b/net-im/nheko/patches/nheko-0.11.3.patchset deleted file mode 100644 index d9bf8510f..000000000 --- a/net-im/nheko/patches/nheko-0.11.3.patchset +++ /dev/null @@ -1,114 +0,0 @@ -From 321c8fcf1563f305c91b0ebd2863b92c999c4d41 Mon Sep 17 00:00:00 2001 -From: Nicolas Werner -Date: Fri, 24 Mar 2023 19:48:47 +0100 -Subject: [PATCH 1/4] Fix explicit optional construction on gcc13 - ---- - src/timeline/EventStore.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/timeline/EventStore.cpp b/src/timeline/EventStore.cpp -index d035d840..2a4d96d0 100644 ---- a/src/timeline/EventStore.cpp -+++ b/src/timeline/EventStore.cpp -@@ -654,7 +654,7 @@ EventStore::get(int idx, bool decrypt) - if (edits_.empty()) - event = cache::client()->getEvent(room_id_, *event_id); - else -- event = {edits_.back()}; -+ event = mtx::events::collections::TimelineEvent{edits_.back()}; - - if (!event) - return nullptr; --- -2.37.3 - - -From 4fe18ea455bc3299b5ae0ed97b4395f1661afe15 Mon Sep 17 00:00:00 2001 -From: Daniel Weber -Date: Tue, 12 Sep 2023 17:32:18 +0000 -Subject: [PATCH 2/4] Add Haiku as target - ---- - src/notifications/Manager.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/notifications/Manager.h b/src/notifications/Manager.h -index 70a03345..e908575e 100644 ---- a/src/notifications/Manager.h -+++ b/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_HAIKU) || defined(Q_OS_LINUX) - void closeAllNotifications(); - #endif - --- -2.37.3 - - -From f7f5dd6b8b0854a38a92aba5b9f681a9931fc7f6 Mon Sep 17 00:00:00 2001 -From: Daniel Weber -Date: Tue, 12 Sep 2023 18:01:12 +0000 -Subject: [PATCH 3/4] Set software mode - ---- - src/main.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/main.cpp b/src/main.cpp -index 1ecb014d..21bf0001 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -171,6 +171,10 @@ main(int argc, char *argv[]) - } - #endif - -+#if defined(Q_OS_HAIKU) -+ qputenv("QT_QUICK_BACKEND", "software"); -+#endif -+ - // This is some hacky programming, but it's necessary (AFAIK?) to get the unique config name - // parsed before the SingleApplication userdata is set. - QString userdata{QLatin1String("")}; --- -2.37.3 - - -From 9cda2f89ad6b8639e1782566fb4e5f84cd8087c0 Mon Sep 17 00:00:00 2001 -From: Daniel Weber -Date: Tue, 12 Sep 2023 20:46:18 +0000 -Subject: [PATCH 4/4] Workaround Emoji Font selection - ---- - src/UserSettingsPage.cpp | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp -index f1a3858f..e4cbbf58 100644 ---- a/src/UserSettingsPage.cpp -+++ b/src/UserSettingsPage.cpp -@@ -1551,7 +1551,7 @@ UserSettingsModel::data(const QModelIndex &index, int role) const - case Font: - return fontDb.families(); - case EmojiFont: -- return fontDb.families(QFontDatabase::WritingSystem::Symbol); -+ return fontDb.families(); - case Ringtone: { - QStringList l{ - QStringLiteral("Mute"), -@@ -1846,8 +1846,7 @@ UserSettingsModel::setData(const QModelIndex &index, const QVariant &value, int - } - case EmojiFont: { - if (value.userType() == QMetaType::Int) { -- i->setEmojiFontFamily( -- fontDb.families(QFontDatabase::WritingSystem::Symbol).at(value.toInt())); -+ i->setEmojiFontFamily(fontDb.families().at(value.toInt())); - return true; - } else - return false; --- -2.37.3 \ No newline at end of file diff --git a/net-im/nheko/patches/nheko-0.12.0.patchset b/net-im/nheko/patches/nheko-0.12.0.patchset new file mode 100644 index 000000000..0e67fca34 --- /dev/null +++ b/net-im/nheko/patches/nheko-0.12.0.patchset @@ -0,0 +1,47 @@ +From ef366ad5cf61650b3d2ef1b20e34a59deac67c79 Mon Sep 17 00:00:00 2001 +From: Schrijvers Luc +Date: Mon, 24 Jun 2024 19:26:00 +0200 +Subject: Build fix + + +diff --git a/src/main.cpp b/src/main.cpp +index 8ea1590..f9c3ad0 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -248,7 +248,7 @@ main(int argc, char *argv[]) + if (!singleapp.isPrimaryInstance()) { + auto token = qgetenv("XDG_ACTIVATION_TOKEN"); + +-#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) ++#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) && !defined(Q_OS_HAIKU) + // getting a valid activation token on wayland is a bit of a pain, it works most reliably + // when you have an actual window, that has the focus... + auto waylandApp = app.nativeInterface(); +-- +2.45.1 + + +From 65eb93f012a0e3119cf67dac72871eda4313281d Mon Sep 17 00:00:00 2001 +From: Daniel Weber +Date: Tue, 12 Sep 2023 18:01:12 +0000 +Subject: [PATCH 3/4] Set software mode (which should be default) + + +diff --git a/src/main.cpp b/src/main.cpp +index f9c3ad0..df34e4b 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -178,6 +178,10 @@ main(int argc, char *argv[]) + } + #endif + ++#if defined(Q_OS_HAIKU) ++ qputenv("QT_QUICK_BACKEND", "software"); ++#endif ++ + QString matrixUri; + for (int i = 1; i < argc; ++i) { + QString arg{argv[i]}; +-- +2.45.1 + diff --git a/net-im/nheko/patches/nheko-0.8.2.patchset b/net-im/nheko/patches/nheko-0.8.2.patchset deleted file mode 100644 index 7bddee812..000000000 --- a/net-im/nheko/patches/nheko-0.8.2.patchset +++ /dev/null @@ -1,174 +0,0 @@ -From 05cb74c094d285a568103a413c0d3e4ca95b8d21 Mon Sep 17 00:00:00 2001 -From: Pascal Abresch -Date: Sat, 24 Apr 2021 07:46:12 +0200 -Subject: HACK: disable rounding effect for avatars Having this enabled - produces empty avatars for some reason - - -diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml -index 108bb76..75971a3 100644 ---- a/resources/qml/Avatar.qml -+++ b/resources/qml/Avatar.qml -@@ -60,18 +60,6 @@ Rectangle { - - } - -- layer.effect: OpacityMask { -- cached: true -- -- maskSource: Rectangle { -- anchors.fill: parent -- width: avatar.width -- height: avatar.height -- radius: Settings.avatarCircles ? height / 2 : 3 -- } -- -- } -- - } - - Rectangle { --- -2.30.0 - - -From 0aa02aa568eaa2ff46e52192d25f7149c9430fee Mon Sep 17 00:00:00 2001 -From: Pascal Abresch -Date: Sat, 24 Apr 2021 07:51:50 +0200 -Subject: Haiku: decrease single pane threshold - - -diff --git a/src/Splitter.cpp b/src/Splitter.cpp -index 15e3f5c..aaf67e1 100644 ---- a/src/Splitter.cpp -+++ b/src/Splitter.cpp -@@ -160,7 +160,7 @@ splitter::calculateSidebarSizes(const QFont &f) - sz.small = std::ceil(3.8 * height); - sz.normal = std::ceil(16 * height); - sz.groups = std::ceil(3 * height); -- sz.collapsePoint = 2 * sz.normal; -+ sz.collapsePoint = 1.4 * sz.normal; - - return sz; - } --- -2.30.0 - - -From 919142c89739e63a18b286d14bba4deb7fb07e4a Mon Sep 17 00:00:00 2001 -From: Pascal Abresch -Date: Sat, 24 Apr 2021 07:40:14 +0200 -Subject: Haiku: disable singleapplication - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 468480d..2d8bcb3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -461,9 +461,11 @@ else() - add_feature_info(voip OFF "GStreamer could not be found on your system. As a consequence call support has been disabled. If you don't want that, make sure gstreamer-sdp-1.0>=1.18 gstreamer-webrtc-1.0>=1.18 can be found via pkgconfig.") - endif() - -+if(NOT HAIKU) - # single instance functionality - set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication") - add_subdirectory(third_party/SingleApplication-3.2.0-dc8042b/) -+endif() - - feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) - -@@ -633,8 +635,12 @@ target_link_libraries(nheko PRIVATE - qt5keychain - nlohmann_json::nlohmann_json - lmdbxx::lmdbxx -- liblmdb::lmdb -+ liblmdb::lmdb) -+ -+if (NOT HAIKU) -+target_link_libraries(nheko PRIVATE - SingleApplication::SingleApplication) -+endif() - - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0") - target_precompile_headers(nheko -diff --git a/src/main.cpp b/src/main.cpp -index fe1a9ee..446e165 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -29,7 +29,10 @@ - #include "MatrixClient.h" - #include "Utils.h" - #include "config/nheko.h" -+ -+#if !defined(Q_OS_HAIKU) - #include "singleapplication.h" -+#endif - - #if defined(Q_OS_MAC) - #include "emoji/MacHelper.h" -@@ -136,6 +139,7 @@ main(int argc, char *argv[]) - } - } - -+#if !defined(Q_OS_HAIKU) - SingleApplication app(argc, - argv, - true, -@@ -145,12 +149,17 @@ main(int argc, char *argv[]) - SingleApplication::Mode::SecondaryNotification, - 100, - userdata); -+#else -+ QApplication app(argc, argv, true); -+#endif - -+#if !defined(Q_OS_HAIKU) - if (app.isSecondary()) { - // open uri in main instance - app.sendMessage(matrixUri.toUtf8()); - return 0; - } -+#endif - - QCommandLineParser parser; - parser.addHelpOption(); -@@ -170,9 +179,11 @@ main(int argc, char *argv[]) - QCoreApplication::tr("profile name")); - parser.addOption(configName); - -+#if !defined(Q_OS_HAIKU) - parser.process(app); - - app.setWindowIcon(QIcon::fromTheme("nheko", QIcon{":/logos/nheko.png"})); -+#endif - - http::init(); - -@@ -236,6 +247,8 @@ main(int argc, char *argv[]) - nhlog::net()->debug("bye"); - } - }); -+ -+#if !defined(Q_OS_HAIKU) - QObject::connect(&app, &SingleApplication::instanceStarted, &w, [&w]() { - w.show(); - w.raise(); -@@ -247,9 +260,14 @@ main(int argc, char *argv[]) - &SingleApplication::receivedMessage, - ChatPage::instance(), - [&](quint32, QByteArray message) { ChatPage::instance()->handleMatrixUri(message); }); -- -+#endif - QMetaObject::Connection uriConnection; -+ -+#if !defined(Q_OS_HAIKU) - if (app.isPrimary() && !matrixUri.isEmpty()) { -+#else -+ if (!matrixUri.isEmpty()) { -+#endif - uriConnection = QObject::connect(ChatPage::instance(), - &ChatPage::contentLoaded, - ChatPage::instance(), --- -2.30.0 -