mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
nheko: Add recipe and patchset for 0.11.3 (#9510)
This commit is contained in:
137
net-im/nheko/nheko-0.11.3.recipe
Normal file
137
net-im/nheko/nheko-0.11.3.recipe
Normal file
@@ -0,0 +1,137 @@
|
||||
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-2023 Nheko Authors"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/Nheko-Reborn/nheko/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="f285156884a3a0c6870f3fba89c13d1fd70c8727bd179d8310b13819f8a63a37"
|
||||
SOURCE_FILENAME="nheko-$portVersion.tar.gz"
|
||||
PATCHES="nheko-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="nheko.rdef.in"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
nheko$secondaryArchSuffix = $portVersion
|
||||
app:Nheko$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
gstreamer$secondaryArchSuffix
|
||||
noto_emoji
|
||||
noto_emoji_color
|
||||
dbus$secondaryArchSuffix
|
||||
lib:libcmark$secondaryArchSuffix
|
||||
lib:libcoeurl$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libcurl$secondaryArchSuffix
|
||||
lib:libfmt$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgstsdp_1.0$secondaryArchSuffix
|
||||
lib:libgstwebrtc_1.0$secondaryArchSuffix
|
||||
lib:liblmdb$secondaryArchSuffix
|
||||
lib:libmatrix_client$secondaryArchSuffix
|
||||
lib:libolm$secondaryArchSuffix
|
||||
lib:liborc_0.4$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:libre2$secondaryArchSuffix
|
||||
lib:libspdlog$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
lmdbxx
|
||||
asciidoc
|
||||
extra_cmake_modules$secondaryArchSuffix >= 5.93
|
||||
gstreamer${secondaryArchSuffix}_devel
|
||||
dbus${secondaryArchSuffix}_devel
|
||||
devel:libcmark$secondaryArchSuffix
|
||||
devel:libcoeurl$secondaryArchSuffix
|
||||
devel:libcurl$secondaryArchSuffix
|
||||
devel:libevent$secondaryArchSuffix
|
||||
devel:libfmt$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgstsdp_1.0$secondaryArchSuffix
|
||||
devel:libgstwebrtc_1.0$secondaryArchSuffix
|
||||
devel:liblmdb$secondaryArchSuffix
|
||||
devel:libmatrix_client$secondaryArchSuffix >= 0.5.1
|
||||
devel:libolm$secondaryArchSuffix
|
||||
devel:liborc_0.4$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:libre2$secondaryArchSuffix
|
||||
devel:libspdlog$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:nlohmann_json
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
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 \
|
||||
-DSCREENSHARE_X11=OFF \
|
||||
-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
|
||||
}
|
||||
114
net-im/nheko/patches/nheko-0.11.3.patchset
Normal file
114
net-im/nheko/patches/nheko-0.11.3.patchset
Normal file
@@ -0,0 +1,114 @@
|
||||
From 321c8fcf1563f305c91b0ebd2863b92c999c4d41 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Werner <nicolas.werner@hotmail.de>
|
||||
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 <weberd@outlook.de>
|
||||
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 <weberd@outlook.de>
|
||||
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 <weberd@outlook.de>
|
||||
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
|
||||
Reference in New Issue
Block a user