From cd76941bf30327b849bd1d9d18970ade02e7e950 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Mon, 25 Sep 2023 23:25:00 +1000 Subject: [PATCH] Telegram: bump version --- ...8.1.patchset => libtgvoip-4.10.0.patchset} | 8 +- ...chset => telegram_desktop-4.10.0.patchset} | 197 +++++++++++------- ....recipe => telegram_desktop-4.10.0.recipe} | 36 +++- 3 files changed, 150 insertions(+), 91 deletions(-) rename net-im/telegram-desktop/patches/{libtgvoip-4.8.1.patchset => libtgvoip-4.10.0.patchset} (99%) rename net-im/telegram-desktop/patches/{telegram_desktop-4.8.1.patchset => telegram_desktop-4.10.0.patchset} (84%) rename net-im/telegram-desktop/{telegram_desktop-4.8.1.recipe => telegram_desktop-4.10.0.recipe} (84%) diff --git a/net-im/telegram-desktop/patches/libtgvoip-4.8.1.patchset b/net-im/telegram-desktop/patches/libtgvoip-4.10.0.patchset similarity index 99% rename from net-im/telegram-desktop/patches/libtgvoip-4.8.1.patchset rename to net-im/telegram-desktop/patches/libtgvoip-4.10.0.patchset index 9d0cd2c9f..896f348d0 100644 --- a/net-im/telegram-desktop/patches/libtgvoip-4.8.1.patchset +++ b/net-im/telegram-desktop/patches/libtgvoip-4.10.0.patchset @@ -1,6 +1,6 @@ -From 398d7992ed1d8e9b4e9a034482d281adc916741e Mon Sep 17 00:00:00 2001 +From 7d522be38eef45ce875c6b7c4669673a9b101352 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 28 Apr 2023 19:35:39 +1000 +Date: Sat, 23 Sep 2023 22:27:34 +1000 Subject: Add Haiku support @@ -883,7 +883,7 @@ index 0bc42eb..c87cde9 100644 typedef pid_t PlatformThreadId; typedef pthread_t PlatformThreadRef; diff --git a/Telegram/cmake/lib_tgvoip.cmake b/Telegram/cmake/lib_tgvoip.cmake -index fab5e1a..f516210 100644 +index 886cd99..705a6a2 100644 --- a/Telegram/cmake/lib_tgvoip.cmake +++ b/Telegram/cmake/lib_tgvoip.cmake @@ -118,6 +118,14 @@ PRIVATE @@ -901,7 +901,7 @@ index fab5e1a..f516210 100644 # POSIX os/posix/NetworkSocketPosix.cpp os/posix/NetworkSocketPosix.h -@@ -155,6 +163,25 @@ elseif (APPLE) +@@ -160,6 +168,25 @@ elseif (APPLE) TGVOIP_NO_OSX_PRIVATE_API ) endif() diff --git a/net-im/telegram-desktop/patches/telegram_desktop-4.8.1.patchset b/net-im/telegram-desktop/patches/telegram_desktop-4.10.0.patchset similarity index 84% rename from net-im/telegram-desktop/patches/telegram_desktop-4.8.1.patchset rename to net-im/telegram-desktop/patches/telegram_desktop-4.10.0.patchset index 1e2b0d808..f3c862807 100644 --- a/net-im/telegram-desktop/patches/telegram_desktop-4.8.1.patchset +++ b/net-im/telegram-desktop/patches/telegram_desktop-4.10.0.patchset @@ -1,11 +1,11 @@ -From 8b1eae4131c09b2a741790287bc8e8d2f3635050 Mon Sep 17 00:00:00 2001 +From 9e5eafd7b1e6280f5ee262c2a26d7eac68495991 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Fri, 28 Apr 2023 19:36:45 +1000 +Date: Mon, 25 Sep 2023 22:21:24 +1000 Subject: Add Haiku support diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt -index 008c71b..697a399 100644 +index d555578..b1770d1 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -90,6 +90,15 @@ PRIVATE @@ -24,13 +24,14 @@ index 008c71b..697a399 100644 target_precompile_headers(Telegram PRIVATE $<$:${src_loc}/stdafx.h>) nice_target_sources(Telegram ${src_loc} PRIVATE -@@ -1413,6 +1422,16 @@ else() +@@ -1450,6 +1459,17 @@ if (NOT build_winstore) ) endif() +if (HAIKU) + remove_target_sources(Telegram ${src_loc} + platform/linux/notifications_manager_linux_dummy.cpp ++ platform/linux/notifications_manager_linux.cpp + ) + nice_target_sources(Telegram ${src_loc} + PRIVATE @@ -41,7 +42,7 @@ index 008c71b..697a399 100644 if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) remove_target_sources(Telegram ${src_loc} platform/linux/linux_wayland_integration.cpp -@@ -1568,7 +1587,7 @@ if (build_macstore) +@@ -1608,7 +1628,7 @@ if (build_macstore) else() set(bundle_identifier "com.tdesktop.Telegram$<$:Debug>") set(bundle_entitlements "Telegram.entitlements") @@ -51,7 +52,7 @@ index 008c71b..697a399 100644 else() set(output_name "Telegram") diff --git a/Telegram/SourceFiles/calls/group/calls_group_menu.cpp b/Telegram/SourceFiles/calls/group/calls_group_menu.cpp -index aad0723..c58929f 100644 +index 51a9068..b5296bc 100644 --- a/Telegram/SourceFiles/calls/group/calls_group_menu.cpp +++ b/Telegram/SourceFiles/calls/group/calls_group_menu.cpp @@ -572,6 +572,7 @@ void FillMenu( @@ -71,10 +72,10 @@ index aad0723..c58929f 100644 if (const auto strong = weak.get()) { showBox(Box(SettingsBox, strong)); diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h -index 111bf6c..aecadca 100644 +index f25345d..e05ce12 100644 --- a/Telegram/SourceFiles/core/core_settings.h +++ b/Telegram/SourceFiles/core/core_settings.h -@@ -893,7 +893,7 @@ private: +@@ -909,7 +909,7 @@ private: rpl::variable _dialogsWidthRatio; // per-window rpl::variable _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w bool _notifyFromAll = true; @@ -84,10 +85,10 @@ index 111bf6c..aecadca 100644 rpl::variable _systemDarkModeEnabled = false; rpl::variable _windowTitleContent; diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp -index 741f7d0..30dc2d7 100644 +index 45d2bef..b8864ec 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp -@@ -241,7 +241,7 @@ void Sandbox::setupScreenScale() { +@@ -247,7 +247,7 @@ void Sandbox::setupScreenScale() { const auto screen = Sandbox::primaryScreen(); const auto dpi = screen->logicalDotsPerInch(); @@ -96,7 +97,7 @@ index 741f7d0..30dc2d7 100644 const auto base = (basePair.first + basePair.second) * 0.5; const auto screenScaleExact = dpi / base; const auto screenScale = int(base::SafeRound(screenScaleExact * 20)) * 5; -@@ -264,9 +264,12 @@ Sandbox::~Sandbox() = default; +@@ -270,9 +270,12 @@ Sandbox::~Sandbox() = default; bool Sandbox::event(QEvent *e) { if (e->type() == QEvent::Quit && !Quitting()) { @@ -111,8 +112,8 @@ index 741f7d0..30dc2d7 100644 + } } else if (e->type() == QEvent::Close) { Quit(); - } -@@ -276,7 +279,7 @@ bool Sandbox::event(QEvent *e) { + } else if (e->type() == DeadlockDetector::PingPongEvent::Type()) { +@@ -286,7 +289,7 @@ bool Sandbox::event(QEvent *e) { void Sandbox::socketConnected() { LOG(("Socket connected, this is not the first application instance, sending show command...")); _secondInstance = true; @@ -122,12 +123,12 @@ index 741f7d0..30dc2d7 100644 const QStringList &lst(cSendPaths()); for (QStringList::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) { diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp -index b90b70a..9c6a202 100644 +index 027f6de..2b54918 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp -@@ -19,6 +19,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - #include - #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION +@@ -16,6 +16,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + + using namespace gi::repository; +#ifdef Q_OS_HAIKU +#include @@ -141,7 +142,7 @@ index b90b70a..9c6a202 100644 namespace Platform { namespace File { -@@ -43,6 +52,23 @@ void UnsafeOpenEmailLink(const QString &email) { +@@ -40,6 +49,23 @@ void UnsafeOpenEmailLink(const QString &email) { } bool UnsafeShowOpenWith(const QString &filepath) { @@ -162,14 +163,14 @@ index b90b70a..9c6a202 100644 + } +#endif + - #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION if (internal::ShowXDPOpenWithDialog(filepath)) { return true; + } diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp -index ada8cd6..0f19120 100644 +index 7fec6ec..bd1c804 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp -@@ -39,6 +39,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL +@@ -36,6 +36,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/platform/linux/base_linux_xcb_utilities.h" #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION @@ -180,7 +181,7 @@ index ada8cd6..0f19120 100644 #include #include #include -@@ -228,6 +232,12 @@ void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) { +@@ -221,6 +225,12 @@ void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) { SkipTaskbar(windowHandle(), mode == WorkMode::TrayOnly); } @@ -194,7 +195,7 @@ index ada8cd6..0f19120 100644 updateUnityCounter(); } diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.h b/Telegram/SourceFiles/platform/linux/main_window_linux.h -index 3f074db..2e1a1f9 100644 +index 467f690..f1160f2 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.h +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.h @@ -21,6 +21,9 @@ namespace Platform { @@ -508,10 +509,10 @@ index 0000000..21935f0 +} // namespace Notifications +} // namespace Platform diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp -index a8b2c6a..c517588 100644 +index 41828ed..9cb4c73 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp -@@ -34,6 +34,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL +@@ -27,6 +27,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/platform/linux/base_linux_xcb_utilities.h" #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION @@ -522,10 +523,11 @@ index a8b2c6a..c517588 100644 #include #include #include -@@ -124,6 +128,33 @@ static void t_desktop_application_init(TDesktopApplication *application) { +@@ -53,6 +57,33 @@ using Platform::internal::WaylandIntegration; + namespace Platform { namespace { - ++ +#ifdef Q_OS_HAIKU +void HaikuAutostart(bool start) { + const auto home = QDir::homePath(); @@ -552,32 +554,29 @@ index a8b2c6a..c517588 100644 + } +} +#endif // Q_OS_HAIKU -+ - constexpr auto kDesktopFile = ":/misc/org.telegram.desktop.desktop"_cs; - #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION -@@ -625,6 +656,9 @@ std::optional IsDarkMode() { - } - - bool AutostartSupported() { -+#ifdef Q_OS_HAIKU -+ return true; -+#endif - #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION - return true; - #else // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION -@@ -633,6 +667,10 @@ bool AutostartSupported() { + void PortalAutostart(bool enabled, Fn done) { + if (cExeName().isEmpty()) { +@@ -477,6 +508,10 @@ bool AutostartSupported() { } void AutostartToggle(bool enabled, Fn done) { +#ifdef Q_OS_HAIKU + HaikuAutostart(enabled); + return; ++#else + if (KSandbox::isFlatpak()) { + PortalAutostart(enabled, done); + return; +@@ -504,6 +539,7 @@ void AutostartToggle(bool enabled, Fn done) { + if (done) { + done(enabled && success); + } +#endif - #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION - const auto success = [&] { - const auto silent = !done; -@@ -703,7 +741,11 @@ QString psAppDataPath() { + } + + bool AutostartSkip() { +@@ -569,7 +605,11 @@ QString psAppDataPath() { } } @@ -589,7 +588,7 @@ index a8b2c6a..c517588 100644 } void psDoCleanup() { -@@ -845,6 +887,7 @@ bool OpenSystemSettings(SystemSettingsType type) { +@@ -697,6 +737,7 @@ bool OpenSystemSettings(SystemSettingsType type) { add("mate-volume-control"); } } @@ -624,7 +623,7 @@ index 88bdd22..6431130 100644 SetAudioInputDeviceById(_audioDeviceModule.get(), id); #endif diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp -index aa2150c..ed7eb62 100644 +index eaf2172..2e982f8 100644 --- a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp +++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp @@ -2846,7 +2846,7 @@ public: @@ -676,10 +675,10 @@ index 0000000..3a57ce2 + +#endif diff --git a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp -index ffb4dcb..720bd29 100644 +index 50fae18..3aed9a8 100644 --- a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp +++ b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp -@@ -31,8 +31,58 @@ +@@ -27,8 +27,58 @@ #include #include @@ -736,27 +735,36 @@ index ffb4dcb..720bd29 100644 +} +#endif - #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION - bool PortalShowInFolder(const QString &filepath) { -@@ -125,6 +175,11 @@ bool DBusShowInFolder(const QString &filepath) { + void PortalShowInFolder(const QString &filepath, Fn fail) { + const auto connection = [] { +@@ -123,6 +173,12 @@ void DBusShowInFolder(const QString &filepath, Fn fail) { } // namespace - bool ShowInFolder(const QString &filepath) { + void ShowInFolder(const QString &filepath) { +#ifdef Q_OS_HAIKU -+ if (HaikuShowInFolder(filepath)) { -+ return true; ++ if (!HaikuShowInFolder(filepath)) { ++ QDesktopServices::openUrl( ++ QUrl::fromLocalFile(QFileInfo(filepath).absolutePath())); + } ++#else + DBusShowInFolder(filepath, [=] { + PortalShowInFolder(filepath, [=] { + using namespace gi::repository; +@@ -140,6 +196,7 @@ void ShowInFolder(const QString &filepath) { + QUrl::fromLocalFile(QFileInfo(filepath).absolutePath())); + }); + }); +#endif - #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION - if (DBusShowInFolder(filepath)) { - return true; + } + + QString CurrentExecutablePath(int argc, char *argv[]) { diff --git a/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp b/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp -index 891cb96..a49b75a 100644 +index b7f1225..7fc8df3 100644 --- a/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp +++ b/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp -@@ -24,6 +24,11 @@ - #include - #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION +@@ -18,6 +18,11 @@ + #include + #include +#ifdef Q_OS_HAIKU +#include @@ -766,9 +774,9 @@ index 891cb96..a49b75a 100644 namespace base::Platform { namespace { -@@ -188,9 +193,23 @@ std::optional MutterDBusLastUserInputTime() { +@@ -180,9 +185,23 @@ std::optional MutterDBusLastUserInputTime() { + return std::nullopt; } - #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION +#ifdef Q_OS_HAIKU +std::optional HaikuLastUserInputTime() { @@ -790,13 +798,28 @@ index 891cb96..a49b75a 100644 #ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION if (::Platform::IsX11()) { const auto xcbResult = XCBLastUserInputTime(); +diff --git a/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp b/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp +index 30ea7a4..eb6dcf7 100644 +--- a/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp ++++ b/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp +@@ -10,6 +10,10 @@ + + #include + ++#ifdef Q_OS_HAIKU ++#include ++#endif ++ + #include + #include + #include diff --git a/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp b/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp -index 73d37e4..f4277e2 100644 +index 37c8c41..67ac88c 100644 --- a/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp +++ b/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp -@@ -21,6 +21,10 @@ - #include - #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION +@@ -16,6 +16,10 @@ + #include "base/platform/linux/base_linux_xcb_utilities.h" + #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION +#ifdef Q_OS_HAIKU +#include @@ -804,14 +827,14 @@ index 73d37e4..f4277e2 100644 + #include - namespace base::Platform { + #include diff --git a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp -index 2e6170f..f509ce4 100644 +index 19da0e8..0873fcb 100644 --- a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp +++ b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp -@@ -13,6 +13,10 @@ - #include "base/platform/linux/base_linux_glibmm_helper.h" - #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION +@@ -9,6 +9,10 @@ + #include "base/integration.h" + #include "base/debug_log.h" +#ifdef Q_OS_HAIKU +#include @@ -835,8 +858,30 @@ index efbfb72..9c82321 100644 #include "spellcheck/third_party/language_cld3.h" #include "nnet_language_identifier.h" +diff --git a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp +index 8a3cf9c..4f3779a 100644 +--- a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp ++++ b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp +@@ -417,7 +417,7 @@ void ShowXCBWindowMenu(not_null widget, const QPoint &point) { + } + #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION + +-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) ++#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) && !defined(Q_OS_HAIKU) + void ShowWaylandWindowMenu(not_null widget, const QPoint &point) { + static const auto wl_proxy_marshal_array = [] { + void (*result)( +@@ -596,7 +596,7 @@ void UnsetWindowMargins(not_null widget) { + } + + void ShowWindowMenu(not_null widget, const QPoint &point) { +-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) ++#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) && !defined(Q_OS_HAIKU) + if (::Platform::IsWayland()) { + ShowWaylandWindowMenu(widget, point); + return; diff --git a/Telegram/lib_ui/ui/ui_utility.cpp b/Telegram/lib_ui/ui/ui_utility.cpp -index 283b340..fd01c34 100644 +index 2a5de32..692f8a8 100644 --- a/Telegram/lib_ui/ui/ui_utility.cpp +++ b/Telegram/lib_ui/ui/ui_utility.cpp @@ -9,6 +9,10 @@ @@ -851,7 +896,7 @@ index 283b340..fd01c34 100644 #include #include diff --git a/Telegram/lib_ui/ui/widgets/popup_menu.cpp b/Telegram/lib_ui/ui/widgets/popup_menu.cpp -index ff81dbc..4ad5c58 100644 +index 5ce70cf..53a2fb8 100644 --- a/Telegram/lib_ui/ui/widgets/popup_menu.cpp +++ b/Telegram/lib_ui/ui/widgets/popup_menu.cpp @@ -18,6 +18,10 @@ @@ -898,7 +943,7 @@ index bb6d91a..3c4a188 100644 #include "webrtc/webrtc_create_adm.h" diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt -index 9be0e5a..4b15e50 100644 +index 2f9165b..57aa33d 100644 --- a/cmake/external/CMakeLists.txt +++ b/cmake/external/CMakeLists.txt @@ -17,7 +17,7 @@ if (add_cld3_library) diff --git a/net-im/telegram-desktop/telegram_desktop-4.8.1.recipe b/net-im/telegram-desktop/telegram_desktop-4.10.0.recipe similarity index 84% rename from net-im/telegram-desktop/telegram_desktop-4.8.1.recipe rename to net-im/telegram-desktop/telegram_desktop-4.10.0.recipe index 4dd7c7ccb..e39d9bcb9 100644 --- a/net-im/telegram-desktop/telegram_desktop-4.8.1.recipe +++ b/net-im/telegram-desktop/telegram_desktop-4.10.0.recipe @@ -3,9 +3,9 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku." HOMEPAGE="https://www.telegram.org/" COPYRIGHT="2013-2023 Telegram" LICENSE="GNU GPL v3" -REVISION="2" +REVISION="1" SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz" -CHECKSUM_SHA256="96660bb151c035a80c5b32a8fe043cecb54e9fe450329cf612ecb752db68c06f" +CHECKSUM_SHA256="c1f7d226ea50de0742b7a273f504da9168293c4feb77ef3f4a542339c5a7f804" SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz" SOURCE_DIR="tdesktop-$portVersion-full" srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92" @@ -32,10 +32,15 @@ REQUIRES=" lib:libavcodec$secondaryArchSuffix lib:libavformat$secondaryArchSuffix lib:libavutil$secondaryArchSuffix + lib:libboost_filesystem$secondaryArchSuffix + lib:libboost_system$secondaryArchSuffix + lib:libboost_program_options$secondaryArchSuffix lib:libcrypto$secondaryArchSuffix - lib:libgiomm_2.4$secondaryArchSuffix + lib:libfmt$secondaryArchSuffix + lib:libgirepository_1.0$secondaryArchSuffix + lib:libgiomm_2.68$secondaryArchSuffix lib:libglib_2.0$secondaryArchSuffix - lib:libglibmm_2.4$secondaryArchSuffix + lib:libglibmm_2.68$secondaryArchSuffix lib:libgthread_2.0$secondaryArchSuffix lib:libhunspell_1.7$secondaryArchSuffix lib:libintl$secondaryArchSuffix @@ -54,7 +59,7 @@ REQUIRES=" lib:libQt6Svg$secondaryArchSuffix lib:libQt6Widgets$secondaryArchSuffix lib:librnnoise$secondaryArchSuffix - lib:libsigc_2.0$secondaryArchSuffix + lib:libsigc_3.0$secondaryArchSuffix lib:libstdc++$secondaryArchSuffix lib:libswresample$secondaryArchSuffix lib:libswscale$secondaryArchSuffix @@ -66,11 +71,16 @@ REQUIRES=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel qt6_tools${secondaryArchSuffix}_devel - devel:libabsl_strings$secondaryArchSuffix >= 2206.0.0 - devel:libavcodec$secondaryArchSuffix >= 58 + devel:libabsl_strings$secondaryArchSuffix >= 2301.0.0 + devel:libavcodec$secondaryArchSuffix >= 59 + devel:libboost_filesystem$secondaryArchSuffix >= 1.70.0 + devel:libboost_system$secondaryArchSuffix >= 1.70.0 + devel:libboost_program_options$secondaryArchSuffix >= 1.70.0 devel:libcrypto$secondaryArchSuffix + devel:libfmt$secondaryArchSuffix + devel:libgirepository_1.0$secondaryArchSuffix devel:libglib_2.0$secondaryArchSuffix - devel:libglibmm_2.4$secondaryArchSuffix + devel:libglibmm_2.68$secondaryArchSuffix devel:libgthread_2.0$secondaryArchSuffix devel:libhunspell_1.7$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix @@ -89,11 +99,11 @@ BUILD_REQUIRES=" devel:libQt6Widgets$secondaryArchSuffix devel:librapidjson$secondaryArchSuffix devel:librnnoise$secondaryArchSuffix + devel:libsigc_3.0$secondaryArchSuffix devel:libtg_owt$secondaryArchSuffix devel:libvpx$secondaryArchSuffix devel:libxxhash$secondaryArchSuffix devel:libz$secondaryArchSuffix - devel:range_v3$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:cmake @@ -101,7 +111,7 @@ BUILD_PREREQUIRES=" cmd:gcc$secondaryArchSuffix cmd:ninja cmd:pkg_config$secondaryArchSuffix - cmd:python + cmd:python3.9 cmd:sed cmd:yasm " @@ -109,6 +119,7 @@ BUILD_PREREQUIRES=" BUILD() { export DISABLE_ASLR=1 + export GI_GIR_PATH="`finddir B_SYSTEM_DATA_DIRECTORY`"/gir-1.0 # disable stack protector (fix build for x86_gcc2) if [ $targetArchitecture == x86_gcc2 ]; then @@ -135,6 +146,8 @@ BUILD() # build telegram cmake -S . -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ + -DBoost_USE_STATIC_LIBS=OFF \ + -DBUILD_SHARED_LIBS=ON \ -DTDESKTOP_API_TEST=OFF \ -DTDESKTOP_DISABLE_GTK_INTEGRATION=ON \ -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \ @@ -151,7 +164,8 @@ BUILD() -DLIBTGVOIP_DISABLE_ALSA=ON \ -DLIBTGVOIP_DISABLE_PULSEAUDIO=ON \ -DTDESKTOP_API_ID=$TELEGRAM_API_ID \ - -DTDESKTOP_API_HASH=$TELEGRAM_API_HASH + -DTDESKTOP_API_HASH=$TELEGRAM_API_HASH \ + -DLZ4_INCLUDE_DIRS=/system/$relativeIncludeDir ninja -C build $jobArgs }