diff --git a/net-im/telegram-desktop/Makefile b/net-im/telegram-desktop/Makefile index e0cd2f60463e..4b736654360c 100644 --- a/net-im/telegram-desktop/Makefile +++ b/net-im/telegram-desktop/Makefile @@ -1,120 +1,120 @@ PORTNAME= telegram-desktop -DISTVERSION= 4.10.2 +DISTVERSION= 4.10.3 CATEGORIES= net-im MASTER_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/v${DISTVERSION}/ DISTNAME= tdesktop-${DISTVERSION}-full DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= ports@FreeBSD.org COMMENT= Telegram Desktop messaging app WWW= https://desktop.telegram.org/ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_i386= does not build, webrtc related BROKEN_SSL= openssl30 openssl31 BROKEN_SSL_REASON= undefined symbol: ERR_load_BIO_strings NOT_FOR_ARCHS= powerpc powerpc64 powerpcspe NOT_FOR_ARCHS_REASON= Only little endian is supported BUILD_DEPENDS= boost-libs>0:devel/boost-libs \ microsoft-gsl>0:devel/microsoft-gsl \ range-v3>0:devel/range-v3 \ tl-expected>0:devel/tl-expected \ v4l_compat>0:multimedia/v4l_compat \ yasm:devel/yasm \ ${LOCALBASE}/lib/libtg_owt.a:net-im/tg_owt LIB_DEPENDS= libabsl_base.so:devel/abseil \ libavformat.so:multimedia/ffmpeg \ libdbus-1.so:devel/dbus \ libdispatch.so:devel/libdispatch \ libfmt.so:devel/libfmt \ libhunspell-1.7.so:textproc/hunspell \ liblz4.so:archivers/liblz4 \ libopenh264.so:multimedia/openh264 \ libopus.so:audio/opus \ libpipewire-0.3.so:multimedia/pipewire \ libprotobuf.so:devel/protobuf \ libqrcodegencpp.so:graphics/qr-code-generator \ librnnoise.so:audio/rnnoise \ libxcb-keysyms.so:x11/xcb-util-keysyms \ libxkbcommon.so:x11/libxkbcommon \ libxxhash.so:devel/xxhash \ libvpx.so:multimedia/libvpx FLAVORS= qt5 qt6 FLAVOR?= ${FLAVORS:[1]} qt5_PKGNAMESUFFIX= qt6_PKGNAMESUFFIX= -qt6 qt5_CONFLICTS_INSTALL= ${PORTNAME}-qt6 qt6_CONFLICTS_INSTALL= ${PORTNAME} USES= cmake desktop-file-utils gl gnome jpeg localbase \ minizip openal pkgconfig python:build ssl xorg USE_GITHUB= nodefault GH_ACCOUNT= telegramdesktop GH_PROJECT= tdesktop .if ${FLAVOR} == qt5 USES+= kde:5 qt:5 USE_QT= buildtools:build core dbus declarative gui imageformats network qmake:build \ svg wayland widgets USE_KDE= coreaddons kimageformats .else USES+= qt:6 USE_QT= 5compat base imageformats lottie shadertools svg tools:build wayland .endif USE_GL= gl USE_GNOME= glib20 glibmm26 introspection USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrandr xrender xtst CMAKE_ARGS= -DTDESKTOP_API_ID=${TELEGRAM_API_ID} -DTDESKTOP_API_HASH=${TELEGRAM_API_HASH} CMAKE_ON= DESKTOP_APP_USE_PACKAGED DESKTOP_APP_DISABLE_CRASH_REPORTS \ DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION # Since cmake 3.25.0, BSDs are no longer recognised as Linux (in this port). CMAKE_ARGS+= -DLINUX=true # libdispatch components LDFLAGS+= -lBlocksRuntime # Telegram uses OpenAL for its audio, but libtgvoip (for voice calls) can use PulseAudio or ALSA. # It dynamically loads PulseAudio, and if this fails, it loads ALSA. # If both of them are not installed, then voice calls do not work, but other functionalities still work. OPTIONS_DEFINE= SYSTEM_FONTS OPTIONS_DEFAULT= ALSA OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO AUDIO_DESC= Audio backend for voice calls SYSTEM_FONTS_DESC= Use system fonts instead of bundled patched ones ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio ALSA_CMAKE_BOOL_OFF= LIBTGVOIP_DISABLE_ALSA PULSEAUDIO_CMAKE_BOOL_OFF= LIBTGVOIP_DISABLE_PULSEAUDIO SYSTEM_FONTS_CMAKE_BOOL_OFF= DESKTOP_APP_USE_PACKAGED_FONTS # Telegram asks each custom build to have its own API ID and hash. TELEGRAM_API_HASH= 20a3432aab43f24bb4460fceac5ba38d TELEGRAM_API_ID= 601761 .include .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400000 && ${OSVERSION} < 1400079 USES+= llvm:max=15,build .else USES+= compiler:c++20-lang .endif post-patch: # XXX fix the following on every source file # warning: unknown warning option '-Wno-maybe-uninitialized' # warning: argument unused during compilation: '-fstack-clash-protection' ${REINPLACE_CMD} -e /-Wno-maybe-uninitialized/d -e /-fstack-clash-protection/d \ ${WRKSRC}/cmake/options_linux.cmake .include diff --git a/net-im/telegram-desktop/distinfo b/net-im/telegram-desktop/distinfo index da57f3853eef..cc7f9cbc0ded 100644 --- a/net-im/telegram-desktop/distinfo +++ b/net-im/telegram-desktop/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1696263386 -SHA256 (tdesktop-4.10.2-full.tar.gz) = 3f7aa12bf421a7fb6e9db9669f63bb6e1351cec2e7567551cef4ff2d936f2a27 -SIZE (tdesktop-4.10.2-full.tar.gz) = 67750091 +TIMESTAMP = 1696278627 +SHA256 (tdesktop-4.10.3-full.tar.gz) = 09d793834f7a25614ba23995e2290002a09e8e790520b4a265d0f7c3592c396e +SIZE (tdesktop-4.10.3-full.tar.gz) = 67750018 diff --git a/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp b/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp index f0ce20468478..1f69d447fd4f 100644 --- a/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp +++ b/net-im/telegram-desktop/files/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp @@ -1,120 +1,11 @@ ---- Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp.orig 2023-09-29 15:29:53 UTC +--- Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp.orig 2023-10-02 20:31:34 UTC +++ Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp -@@ -53,6 +53,10 @@ bool ServiceRegistered = false; - ServerInformation CurrentServerInformation; - std::vector CurrentCapabilities; - -+[[nodiscard]] bool HasCapability(const char *value) { -+ return ranges::contains(CurrentCapabilities, value, &Glib::ustring::raw); -+} -+ - void Noexcept(Fn callback, Fn failed = nullptr) noexcept { - try { - callback(); -@@ -446,7 +450,6 @@ bool NotificationData::init( - } - - const auto weak = base::make_weak(this); -- const auto &capabilities = CurrentCapabilities; - - const auto signalEmitted = crl::guard(weak, [=]( - const Glib::RefPtr &connection, -@@ -496,7 +499,7 @@ bool NotificationData::init( - - _imageKey = GetImageKey(CurrentServerInformation.specVersion); - -- if (ranges::contains(capabilities, "body-markup")) { -+ if (HasCapability("body-markup")) { - _title = title.toStdString(); - - _body = subtitle.isEmpty() -@@ -512,7 +515,7 @@ bool NotificationData::init( - _body = msg.toStdString(); - } - -- if (ranges::contains(capabilities, "actions")) { -+ if (HasCapability("actions")) { - _actions.push_back("default"); - _actions.push_back(tr::lng_open_link(tr::now).toStdString()); - -@@ -523,7 +526,7 @@ bool NotificationData::init( - tr::lng_context_mark_read(tr::now).toStdString()); - } - -- if (ranges::contains(capabilities, "inline-reply") -+ if (HasCapability("inline-reply") - && !options.hideReplyButton) { - _actions.push_back("inline-reply"); - _actions.push_back( -@@ -553,13 +556,13 @@ bool NotificationData::init( - kObjectPath); - } - -- if (ranges::contains(capabilities, "action-icons")) { -+ if (HasCapability("action-icons")) { - _hints["action-icons"] = Glib::create_variant(true); - } - - // suppress system sound if telegram sound activated, - // otherwise use system sound -- if (ranges::contains(capabilities, "sound")) { -+ if (HasCapability("sound")) { - if (Core::App().settings().soundNotify()) { - _hints["suppress-sound"] = Glib::create_variant(true); - } else { -@@ -569,7 +572,7 @@ bool NotificationData::init( - } - } - -- if (ranges::contains(capabilities, "x-canonical-append")) { -+ if (HasCapability("x-canonical-append")) { - _hints["x-canonical-append"] = Glib::create_variant( - Glib::ustring("true")); - } -@@ -805,7 +808,7 @@ bool ByDefault() { +@@ -814,7 +814,7 @@ bool ByDefault() { // A list of capabilities that offer feature parity // with custom notifications - return ranges::all_of(std::initializer_list{ + return ranges::all_of(std::array{ // To show message content "body", // To have buttons on notifications -@@ -816,7 +819,7 @@ bool ByDefault() { - // (no, using sound capability is not a way) - "inhibitions", - }, [](const auto *capability) { -- return ranges::contains(CurrentCapabilities, capability); -+ return HasCapability(capability); - }); - } - -@@ -909,7 +912,6 @@ class Manager::Private : public base::has_weak_ptr { ( - Manager::Private::Private(not_null manager) - : _manager(manager) { - const auto &serverInformation = CurrentServerInformation; -- const auto &capabilities = CurrentCapabilities; - - if (!serverInformation.name.empty()) { - LOG(("Notification daemon product name: %1") -@@ -931,17 +933,17 @@ Manager::Private::Private(not_null manager) - .arg(serverInformation.specVersion.toString())); - } - -- if (!capabilities.empty()) { -+ if (!CurrentCapabilities.empty()) { - LOG(("Notification daemon capabilities: %1").arg( - ranges::fold_left( -- capabilities, -+ CurrentCapabilities, - "", - [](const Glib::ustring &a, const Glib::ustring &b) { - return a + (a.empty() ? "" : ", ") + b; - }).c_str())); - } - -- if (ranges::contains(capabilities, "inhibitions")) { -+ if (HasCapability("inhibitions")) { - Noexcept([&] { - _dbusConnection = Gio::DBus::Connection::get_sync( - Gio::DBus::BusType::SESSION); diff --git a/net-im/telegram-desktop/files/patch-Telegram_lib__base_base_platform_linux_base__linux__xdp__utilities.h b/net-im/telegram-desktop/files/patch-Telegram_lib__base_base_platform_linux_base__linux__xdp__utilities.h deleted file mode 100644 index 79c5514df801..000000000000 --- a/net-im/telegram-desktop/files/patch-Telegram_lib__base_base_platform_linux_base__linux__xdp__utilities.h +++ /dev/null @@ -1,20 +0,0 @@ ---- Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.h.orig 2023-10-01 14:40:15 UTC -+++ Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.h -@@ -78,7 +78,7 @@ class SettingWatcher { (public) - - template - SettingWatcher(Callback callback) -- : SettingWatcher(Fn(callback)) { -+ : SettingWatcher(std::function(callback)) { - } - - template -@@ -101,7 +101,7 @@ class SettingWatcher { (public) - const Glib::ustring &group, - const Glib::ustring &key, - Callback callback) -- : SettingWatcher(group, key, Fn(callback)) { -+ : SettingWatcher(group, key, std::function(callback)) { - } - - ~SettingWatcher();