pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

telegram-desktop: Update to 7.0.9



Module Name:	pkgsrc-wip
Committed By:	Alexander Kondrat <a%kondrat.su@localhost>
Pushed By:	a.kondrat
Date:		Wed Aug 19 09:15:14 2026 +0300
Changeset:	589fd41a653bd9848ba0330c0d981f2365ac7c8c

Modified Files:
	telegram-desktop/DESCR
	telegram-desktop/Makefile
	telegram-desktop/PLIST
	telegram-desktop/distinfo
	telegram-desktop/options.mk
Added Files:
	telegram-desktop/patches/patch-Telegram_SourceFiles_boxes_star__gift__preview__box.cpp
	telegram-desktop/patches/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp
	telegram-desktop/patches/patch-Telegram_ThirdParty_cmark-gfm_CMakeLists.txt
	telegram-desktop/patches/patch-Telegram_lib__base_base_platform_linux_base__linux__xcb__library.cpp
	telegram-desktop/patches/patch-Telegram_lib_spellcheck_spellcheck_third__party_hunspell__controller.cpp
	telegram-desktop/patches/patch-Telegram_lib_ui_ui_ui__utility.cpp
	telegram-desktop/patches/patch-cmake_options.cmake
Removed Files:
	telegram-desktop/patches/patch-Telegram-lib_base-base-object_ptr.h
	telegram-desktop/patches/patch-Telegram-lib_base-base-unique_qptr.h
	telegram-desktop/patches/patch-Telegram-lib_lottie-lottie-lottie_animation.cpp
	telegram-desktop/patches/patch-Telegram-lib_ui-emoji_suggestions-emoji_suggestions.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-click_handler.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-delayed_activation.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-effects-animation_value.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-inactive_press.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-integration.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-main_queue_processor.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-paint-arcs.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-paint-blob.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-ph.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-platform-ui_platform_window.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-style-style_core_custom_font.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-text-text_utilities.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-ui_log.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-ui_utility.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-call_button.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-labels.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-menu-menu_common.h
	telegram-desktop/patches/patch-Telegram-lib_ui-ui-wrap-wrap.h
	telegram-desktop/patches/patch-Telegram_cmake_lib_tgvoip.cmake
	telegram-desktop/patches/patch-Telegram_lib_base_CMakeLists.txt
	telegram-desktop/patches/patch-Telegram_lib_base_base_global_shortcuts.h
	telegram-desktop/patches/patch-Telegram_lib_base_base_global_shortcuts_generic.h
	telegram-desktop/patches/patch-Telegram_lib_base_base_platform_linux_base_xcb_utilities_linux_h
	telegram-desktop/patches/patch-base_file_utilities.h
	telegram-desktop/patches/patch-base_file_utilities_linux.h
	telegram-desktop/patches/patch-base_info_linux.h
	telegram-desktop/patches/patch-base_last_input_linux.h
	telegram-desktop/patches/patch-base_pch.h
	telegram-desktop/patches/patch-base_platform_last_input.h
	telegram-desktop/patches/patch-base_platform_url_scheme.h
	telegram-desktop/patches/patch-call_delayed.h
	telegram-desktop/patches/patch-concurrent_timer.h
	telegram-desktop/patches/patch-export_api_wrap.h
	telegram-desktop/patches/patch-export_data_types.h
	telegram-desktop/patches/patch-export_output_abstract.h
	telegram-desktop/patches/patch-export_output_stats.h
	telegram-desktop/patches/patch-export_settings.h
	telegram-desktop/patches/patch-last_user_input.h
	telegram-desktop/patches/patch-lib_base-crash_report_header.h
	telegram-desktop/patches/patch-lib_base-openssl_help.h
	telegram-desktop/patches/patch-lib_storage-CMakeLists.txt
	telegram-desktop/patches/patch-lib_ui-CMakeLists.txt
	telegram-desktop/patches/patch-libtgvoip-audio-AudioIO.cpp
	telegram-desktop/patches/patch-libtgvoip-audio-AudioInput.cpp
	telegram-desktop/patches/patch-libtgvoip-audio-AudioOutput.cpp
	telegram-desktop/patches/patch-libtgvoip-threading.h
	telegram-desktop/patches/patch-libtgvoip-webrtc_dsp-platform_thread_types.cc
	telegram-desktop/patches/patch-libtgvoip-webrtc_dsp-rtc_base-stringutils.h
	telegram-desktop/patches/patch-mtproto-mtproto_abstract_socket.h
	telegram-desktop/patches/patch-mtproto-mtproto_bound_key_creator.h
	telegram-desktop/patches/patch-mtproto-mtproto_proxy_data.h
	telegram-desktop/patches/patch-mtproto_auth_key.h
	telegram-desktop/patches/patch-mtproto_dc_key_creator.h
	telegram-desktop/patches/patch-mtproto_dcenter.h
	telegram-desktop/patches/patch-mtproto_dh_utils.h
	telegram-desktop/patches/patch-mtproto_domain_resolver.h
	telegram-desktop/patches/patch-mtproto_received_ids_manager.h
	telegram-desktop/patches/patch-mtproto_rpc_sender.h
	telegram-desktop/patches/patch-mtproto_rsa_public_key.h
	telegram-desktop/patches/patch-mtproto_serialized_request.h
	telegram-desktop/patches/patch-observer.h
	telegram-desktop/patches/patch-parse_helper.h
	telegram-desktop/patches/patch-qthelp_url.h
	telegram-desktop/patches/patch-runtime_composer.h
	telegram-desktop/patches/patch-single_instance.h
	telegram-desktop/patches/patch-storage_cache_types.h
	telegram-desktop/patches/patch-storage_clear_legacy.h
	telegram-desktop/patches/patch-storage_encryption.h
	telegram-desktop/patches/patch-timer.h
	telegram-desktop/patches/patch-unixtime.h

Log Message:
telegram-desktop: Update to 7.0.9

Packaging changes:
 * Updated build patches for NetBSD compatibility.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=589fd41a653bd9848ba0330c0d981f2365ac7c8c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 telegram-desktop/DESCR                             |   2 +-
 telegram-desktop/Makefile                          |  95 +++++++++--------
 telegram-desktop/PLIST                             |  22 ++++
 telegram-desktop/distinfo                          |  87 ++--------------
 telegram-desktop/options.mk                        |  48 ++-------
 .../patch-Telegram-lib_base-base-object_ptr.h      |  14 ---
 .../patch-Telegram-lib_base-base-unique_qptr.h     |  13 ---
 ...Telegram-lib_lottie-lottie-lottie_animation.cpp |  16 ---
 ...am-lib_ui-emoji_suggestions-emoji_suggestions.h |  14 ---
 .../patch-Telegram-lib_ui-ui-click_handler.h       |  13 ---
 .../patch-Telegram-lib_ui-ui-delayed_activation.h  |  14 ---
 ...ch-Telegram-lib_ui-ui-effects-animation_value.h |  12 ---
 .../patch-Telegram-lib_ui-ui-inactive_press.h      |  14 ---
 .../patches/patch-Telegram-lib_ui-ui-integration.h |  13 ---
 ...patch-Telegram-lib_ui-ui-main_queue_processor.h |  14 ---
 .../patches/patch-Telegram-lib_ui-ui-paint-arcs.h  |  13 ---
 .../patches/patch-Telegram-lib_ui-ui-paint-blob.h  |  13 ---
 .../patches/patch-Telegram-lib_ui-ui-ph.h          |  14 ---
 ...elegram-lib_ui-ui-platform-ui_platform_window.h |  13 ---
 ...legram-lib_ui-ui-style-style_core_custom_font.h |  13 ---
 .../patch-Telegram-lib_ui-ui-text-text_utilities.h |  13 ---
 .../patches/patch-Telegram-lib_ui-ui-ui_log.h      |  14 ---
 .../patches/patch-Telegram-lib_ui-ui-ui_utility.h  |  13 ---
 .../patch-Telegram-lib_ui-ui-widgets-call_button.h |  14 ---
 .../patch-Telegram-lib_ui-ui-widgets-labels.h      |  14 ---
 ...h-Telegram-lib_ui-ui-widgets-menu-menu_common.h |  14 ---
 .../patches/patch-Telegram-lib_ui-ui-wrap-wrap.h   |  13 ---
 ..._SourceFiles_boxes_star__gift__preview__box.cpp |  20 ++++
 ...latform_linux_notifications__manager__linux.cpp |  29 ++++++
 ...ch-Telegram_ThirdParty_cmark-gfm_CMakeLists.txt |  18 ++++
 .../patches/patch-Telegram_cmake_lib_tgvoip.cmake  | 112 ---------------------
 ...se_platform_linux_base__linux__xcb__library.cpp |  18 ++++
 .../patches/patch-Telegram_lib_base_CMakeLists.txt |  12 ---
 ...patch-Telegram_lib_base_base_global_shortcuts.h |  12 ---
 ...legram_lib_base_base_global_shortcuts_generic.h |  12 ---
 ..._base_platform_linux_base_xcb_utilities_linux_h |  13 ---
 ...pellcheck_third__party_hunspell__controller.cpp |  36 +++++++
 .../patch-Telegram_lib_ui_ui_ui__utility.cpp       |  21 ++++
 .../patches/patch-base_file_utilities.h            |  12 ---
 .../patches/patch-base_file_utilities_linux.h      |  12 ---
 telegram-desktop/patches/patch-base_info_linux.h   |  12 ---
 .../patches/patch-base_last_input_linux.h          |  10 --
 telegram-desktop/patches/patch-base_pch.h          |  12 ---
 .../patches/patch-base_platform_last_input.h       |  12 ---
 .../patches/patch-base_platform_url_scheme.h       |  12 ---
 telegram-desktop/patches/patch-call_delayed.h      |  12 ---
 telegram-desktop/patches/patch-cmake_options.cmake |  18 ++++
 telegram-desktop/patches/patch-concurrent_timer.h  |  12 ---
 telegram-desktop/patches/patch-export_api_wrap.h   |  12 ---
 telegram-desktop/patches/patch-export_data_types.h |  12 ---
 .../patches/patch-export_output_abstract.h         |  12 ---
 .../patches/patch-export_output_stats.h            |  12 ---
 telegram-desktop/patches/patch-export_settings.h   |  12 ---
 telegram-desktop/patches/patch-last_user_input.h   |  12 ---
 .../patches/patch-lib_base-crash_report_header.h   |  12 ---
 .../patches/patch-lib_base-openssl_help.h          |  12 ---
 .../patches/patch-lib_storage-CMakeLists.txt       |  14 ---
 .../patches/patch-lib_ui-CMakeLists.txt            |  13 ---
 .../patches/patch-libtgvoip-audio-AudioIO.cpp      |  13 ---
 .../patches/patch-libtgvoip-audio-AudioInput.cpp   |  13 ---
 .../patches/patch-libtgvoip-audio-AudioOutput.cpp  |  13 ---
 .../patches/patch-libtgvoip-threading.h            |  51 ----------
 ...h-libtgvoip-webrtc_dsp-platform_thread_types.cc |  26 -----
 ...tch-libtgvoip-webrtc_dsp-rtc_base-stringutils.h |  13 ---
 .../patch-mtproto-mtproto_abstract_socket.h        |  12 ---
 .../patch-mtproto-mtproto_bound_key_creator.h      |  12 ---
 .../patches/patch-mtproto-mtproto_proxy_data.h     |  12 ---
 telegram-desktop/patches/patch-mtproto_auth_key.h  |  12 ---
 .../patches/patch-mtproto_dc_key_creator.h         |  12 ---
 telegram-desktop/patches/patch-mtproto_dcenter.h   |  12 ---
 telegram-desktop/patches/patch-mtproto_dh_utils.h  |  12 ---
 .../patches/patch-mtproto_domain_resolver.h        |  12 ---
 .../patches/patch-mtproto_received_ids_manager.h   |  12 ---
 .../patches/patch-mtproto_rpc_sender.h             |  15 ---
 .../patches/patch-mtproto_rsa_public_key.h         |  12 ---
 .../patches/patch-mtproto_serialized_request.h     |  12 ---
 telegram-desktop/patches/patch-observer.h          |  12 ---
 telegram-desktop/patches/patch-parse_helper.h      |  12 ---
 telegram-desktop/patches/patch-qthelp_url.h        |  13 ---
 telegram-desktop/patches/patch-runtime_composer.h  |  12 ---
 telegram-desktop/patches/patch-single_instance.h   |  12 ---
 .../patches/patch-storage_cache_types.h            |  12 ---
 .../patches/patch-storage_clear_legacy.h           |  13 ---
 .../patches/patch-storage_encryption.h             |  12 ---
 telegram-desktop/patches/patch-timer.h             |  12 ---
 telegram-desktop/patches/patch-unixtime.h          |  12 ---
 86 files changed, 247 insertions(+), 1253 deletions(-)

diffs:
diff --git a/telegram-desktop/DESCR b/telegram-desktop/DESCR
index dc271202af..8f0155060e 100644
--- a/telegram-desktop/DESCR
+++ b/telegram-desktop/DESCR
@@ -1,2 +1,2 @@
-The official desktop client for the Telegram messenger, based on the 
+The official desktop client for the Telegram messenger, based on the
 Telegram API and the MTProto secure protocol.
diff --git a/telegram-desktop/Makefile b/telegram-desktop/Makefile
index 576e713d1e..df6e96ef51 100644
--- a/telegram-desktop/Makefile
+++ b/telegram-desktop/Makefile
@@ -1,68 +1,67 @@
 # $NetBSD$
 
-GITHUB_PROJECT=	       telegramdesktop
-DIST_SUBDIR=           tdesktop
-TD_VERSION=            2.5.9
-DISTNAME=              telegram-desktop-${TD_VERSION}
-PKGREVISION=	       1
-CATEGORIES=            chat
-MASTER_SITES=          -https://github.com/${GITHUB_PROJECT}/${DIST_SUBDIR}/releases/download/v${TD_VERSION}/tdesktop-${TD_VERSION}-full.tar.gz
-WRKSRC=                ${WRKDIR}/tdesktop-${TD_VERSION}-full
+GITHUB_PROJECT=		tdesktop
+GITHUB_RELEASE=		v${TD_VERSION}
+DIST_SUBDIR=		tdesktop
+TD_VERSION=		7.0.9
+DISTNAME=		tdesktop-${TD_VERSION}-full
+PKGNAME=		telegram-desktop-${TD_VERSION}
+CATEGORIES=		chat
+MASTER_SITES=		${MASTER_SITE_GITHUB:=telegramdesktop/}
 
-MAINTAINER=            jake.slazenger%yandex.com@localhost
-HOMEPAGE=              https://desktop.telegram.org/
-COMMENT=               Telegram Desktop messaging app
-LICENSE=               gnu-gpl-v3
+MAINTAINER=		jake.slazenger%yandex.com@localhost
+HOMEPAGE=		https://desktop.telegram.org/
+COMMENT=		Telegram Desktop messaging app
+LICENSE=		gnu-gpl-v3
 
-#PKGSRC_COMPILER=       clang
-#ONLY_FOR_COMPILER=     clang
-
-USE_LANGUAGES=         c c++ gnu++14
-USE_CMAKE=             yes
-
-ONLY_FOR_COMPILER=     gcc
-GCC_REQD=              10
-
-CMAKE_CONFIGURE_ARGS+=           -Ddisable_autoupdate=1
-CMAKE_CONFIGURE_ARGS+=           -DWITHOUT_PULSE=ON
-CMAKE_CONFIGURE_ARGS+=           -DWITHOUT_ALSA=ON
-CMAKE_CONFIGURE_ARGS+=           -DCMAKE_INSTALL_PREFIX=${PREFIX}/usr/pkg
-CMAKE_CONFIGURE_ARGS+=           -DCMAKE_BUILD_TYPE=Release
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_API_TEST=ON
-CMAKE_CONFIGURE_ARGS+=           -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF
-CMAKE_CONFIGURE_ARGS+=           -DDESKTOP_APP_USE_PACKAGED=ON 
-CMAKE_CONFIGURE_ARGS+=           -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF
-CMAKE_CONFIGURE_ARGS+=           -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=ON
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_USE_PACKAGED_TGVOIP=OFF
-CMAKE_CONFIGURE_ARGS+=           -DDESKTOP_APP_SPECIAL_TARGET=""
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_LAUNCHER_BASENAME="telegram-desktop"
-CMAKE_CONFIGURE_ARGS+=           -DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=ON
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "NetBSD" # NetBSD-specific config
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_WITHOUT_ALSA=ON
-.elif ${OPSYS} == "Linux"
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_WITHOUT_ALSA=OFF
-.endif
+USE_LANGUAGES=		c c++ gnu++20
+USE_TOOLS+=		pkg-config perl gdbus-codegen
 
+ONLY_FOR_COMPILER=	gcc
+GCC_REQD+=		14
 
+INSTALL_UNSTRIPPED=	yes
+CMAKE_CONFIGURE_ARGS+=	-DCMAKE_BUILD_TYPE=RelWithDebInfo
+CMAKE_CONFIGURE_ARGS+=	-DTDESKTOP_API_TEST=ON
+CMAKE_CONFIGURE_ARGS+=	-DDESKTOP_APP_USE_PACKAGED=ON
+CMAKE_CONFIGURE_ARGS+=	-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON
+CMAKE_CONFIGURE_ARGS+=	-DDESKTOP_APP_DISABLE_AUTOUPDATE=ON
+CMAKE_CONFIGURE_ARGS+=	-DLINUX=ON
 
 .include "options.mk"
-
+.include "../../devel/cmake/build.mk"
+.include "../../devel/protobuf/buildlink3.mk"
+.include "../../devel/abseil/buildlink3.mk"
+.include "../../textproc/fmtlib/buildlink3.mk"
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../comms/srtp/buildlink3.mk"
+.include "../../misc/rhash/buildlink3.mk"
 .include "../../archivers/minizip/buildlink3.mk"
 .include "../../audio/libopus/buildlink3.mk"
 .include "../../audio/openal-soft/buildlink3.mk"
+.include "../../audio/rnnoise/buildlink3.mk"
 .include "../../archivers/lz4/buildlink3.mk"
 .include "../../archivers/xz/buildlink3.mk"
 .include "../../devel/range-v3/buildlink3.mk"
 .include "../../devel/xxhash/buildlink3.mk"
-.include "../../multimedia/ffmpeg4/buildlink3.mk"
+.include "../../graphics/libavif/buildlink3.mk"
+.include "../../graphics/libheif/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../multimedia/ffmpeg6/buildlink3.mk"
 .include "../../multimedia/libva/buildlink3.mk"
-.include "../../x11/qt5-qtbase/buildlink3.mk"
-.include "../../x11/qt5-qtimageformats/buildlink3.mk"
+.include "../../x11/qt6-qtbase/buildlink3.mk"
+.include "../../graphics/qt6-qtsvg/buildlink3.mk"
+.include "../../lang/qt6-qtdeclarative/buildlink3.mk"
+.include "../../devel/qt6-qtwayland/buildlink3.mk"
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../wip/ada-url/buildlink3.mk"
 .include "../../wip/rlottie/buildlink3.mk"
+.include "../../wip/tde2e/buildlink3.mk"
 .include "../../wip/tg_owt-git/buildlink3.mk"
+.include "../../wip/libyuv-git/buildlink3.mk"
+.include "../../multimedia/openh264/buildlink3.mk"
+.include "../../security/libfido2/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/telegram-desktop/PLIST b/telegram-desktop/PLIST
index e69de29bb2..25c68f394d 100644
--- a/telegram-desktop/PLIST
+++ b/telegram-desktop/PLIST
@@ -0,0 +1,22 @@
+@comment $NetBSD$
+bin/Telegram
+share/applications/org.telegram.desktop.desktop
+share/dbus-1/services/org.telegram.desktop.service
+share/icons/hicolor/128x128/apps/org.telegram.desktop.png
+share/icons/hicolor/128x128@2/apps/org.telegram.desktop.png
+share/icons/hicolor/16x16/apps/org.telegram.desktop.png
+share/icons/hicolor/16x16@2/apps/org.telegram.desktop.png
+share/icons/hicolor/256x256/apps/org.telegram.desktop.png
+share/icons/hicolor/256x256@2/apps/org.telegram.desktop.png
+share/icons/hicolor/32x32/apps/org.telegram.desktop.png
+share/icons/hicolor/32x32@2/apps/org.telegram.desktop.png
+share/icons/hicolor/48x48/apps/org.telegram.desktop.png
+share/icons/hicolor/48x48@2/apps/org.telegram.desktop.png
+share/icons/hicolor/512x512/apps/org.telegram.desktop.png
+share/icons/hicolor/512x512@2/apps/org.telegram.desktop.png
+share/icons/hicolor/64x64/apps/org.telegram.desktop.png
+share/icons/hicolor/64x64@2/apps/org.telegram.desktop.png
+share/icons/hicolor/symbolic/apps/org.telegram.desktop-attention-symbolic.svg
+share/icons/hicolor/symbolic/apps/org.telegram.desktop-mute-symbolic.svg
+share/icons/hicolor/symbolic/apps/org.telegram.desktop-symbolic.svg
+share/metainfo/org.telegram.desktop.metainfo.xml
diff --git a/telegram-desktop/distinfo b/telegram-desktop/distinfo
index 4f82fb4938..7060ea165e 100644
--- a/telegram-desktop/distinfo
+++ b/telegram-desktop/distinfo
@@ -1,79 +1,12 @@
 $NetBSD$
 
-RMD160 (tdesktop/telegram-desktop-2.5.9.tar.gz) = 4f1a9b0da4bf5c5f594de8c443e2cd912e0a6d21
-SHA512 (tdesktop/telegram-desktop-2.5.9.tar.gz) = 1824a5cc17644e2f3d971a6bf882f90f209fcb174826f6e59dbe73301e22b4983e77830c41fe27953049af116a5698a29bec1e5e9957e8905f8f6264722e1c9f
-Size (tdesktop/telegram-desktop-2.5.9.tar.gz) = 36695226 bytes
-SHA1 (patch-Telegram-lib_base-base-object_ptr.h) = a0b2889163076bad024add94b0fc77a4027b3ee1
-SHA1 (patch-Telegram-lib_base-base-unique_qptr.h) = d88c2a241ab706ca439074c60c6f4319f5dc0a35
-SHA1 (patch-Telegram-lib_lottie-lottie-lottie_animation.cpp) = 38c0b6cd43553c7e288fdea60e5ea935721bc234
-SHA1 (patch-Telegram-lib_ui-emoji_suggestions-emoji_suggestions.h) = c0974028b1dc77ee4847b363758b3854091adcba
-SHA1 (patch-Telegram-lib_ui-ui-click_handler.h) = 0fe2f850c00b934f1571e5fda3e2d00f90343700
-SHA1 (patch-Telegram-lib_ui-ui-delayed_activation.h) = 6f62860ecdacea4f9401e5f33b63f0236e729dbb
-SHA1 (patch-Telegram-lib_ui-ui-effects-animation_value.h) = a773757199667600681c3efee242ca7f8a6935da
-SHA1 (patch-Telegram-lib_ui-ui-inactive_press.h) = 1daaccc3cd9a71a4ea2a9006b7d89a67e40d13cc
-SHA1 (patch-Telegram-lib_ui-ui-integration.h) = 1cac5ba0f6b0ab126089119b8c2d5f74ad8db8ed
-SHA1 (patch-Telegram-lib_ui-ui-main_queue_processor.h) = 2e166ccc8ee7216c5dee60b18dd2f153c961788d
-SHA1 (patch-Telegram-lib_ui-ui-paint-arcs.h) = 8ef4cbe82e74a8ef106b30b64bc77effad4535b0
-SHA1 (patch-Telegram-lib_ui-ui-paint-blob.h) = dc84db368235fb3d0e88201d0308aa0f0986e5a4
-SHA1 (patch-Telegram-lib_ui-ui-ph.h) = e9e4d9913dadab87aedcb52a5f86bc6dea3af3bd
-SHA1 (patch-Telegram-lib_ui-ui-platform-ui_platform_window.h) = db27fe0ca7b7b90b337eb70f8e4315356c708c78
-SHA1 (patch-Telegram-lib_ui-ui-style-style_core_custom_font.h) = 4e42ebb75e2c657cb94845e537dcc55ba5dfdd4e
-SHA1 (patch-Telegram-lib_ui-ui-text-text_utilities.h) = 914ca4c3eb30b64356dbf3526209e9ddfa5a1848
-SHA1 (patch-Telegram-lib_ui-ui-ui_log.h) = f96e6a9ee50da327f3f588f8fef41492c0f731dc
-SHA1 (patch-Telegram-lib_ui-ui-ui_utility.h) = 52587d27147f426165e6566341f35f7ed97b0763
-SHA1 (patch-Telegram-lib_ui-ui-widgets-call_button.h) = 885811e3bfa551e25aa14cc4ce7c7679e48d9f7f
-SHA1 (patch-Telegram-lib_ui-ui-widgets-labels.h) = 64d20ac23eb632f9b641a78c382f4c475ff813ec
-SHA1 (patch-Telegram-lib_ui-ui-widgets-menu-menu_common.h) = 39ebf0c85fd7c6920f30dd34ba2619dddf26f4a9
-SHA1 (patch-Telegram-lib_ui-ui-wrap-wrap.h) = 2db81380dc2bd2cca563f72e980480f4c67db7b5
-SHA1 (patch-Telegram_cmake_lib_tgvoip.cmake) = a5d7800e140ccad879ae082f1fd7e0360b3c4054
-SHA1 (patch-Telegram_lib_base_CMakeLists.txt) = 978beafa6367440761544352f287e5db38a0029b
-SHA1 (patch-Telegram_lib_base_base_global_shortcuts.h) = ac9b5d6e5e109d447264f3dbf8a20c628a0b696b
-SHA1 (patch-Telegram_lib_base_base_global_shortcuts_generic.h) = ddea899ce9702881b8ebac9b6053b0c13e76f105
-SHA1 (patch-Telegram_lib_base_base_platform_linux_base_xcb_utilities_linux_h) = be7eb1d991f4cf2e240c766426f85975f3902961
-SHA1 (patch-base_file_utilities.h) = 3afa01e200954e14697043e57fc09b4413769c63
-SHA1 (patch-base_file_utilities_linux.h) = b159a31a23ed0fe608129254a7b72a29bb0d42e0
-SHA1 (patch-base_info_linux.h) = 44bedaa333cc12d5de57777c1659aa11863fba36
-SHA1 (patch-base_last_input_linux.h) = c2b0e5a307c60fd3cba1891a73d218399cde3c7d
-SHA1 (patch-base_pch.h) = e69cb3807d96c7ad78bd25478fa18ef99aad022b
-SHA1 (patch-base_platform_last_input.h) = 0b4c988bbe3d71156ed9f77d313d39e1284a1367
-SHA1 (patch-base_platform_url_scheme.h) = a5bc6ea1845572f326fa19af51f5f7a87554e618
-SHA1 (patch-call_delayed.h) = 935062178537df05e44a2e651bef2030faa613f3
-SHA1 (patch-concurrent_timer.h) = 8b2356cbf705bfb9e19af2725475dd9bcd6a33d7
-SHA1 (patch-export_api_wrap.h) = 2a492eb102225f05731567106932c7a91f8cd548
-SHA1 (patch-export_data_types.h) = 01fa2c695e892172144fa254c7513d087f5e4a9d
-SHA1 (patch-export_output_abstract.h) = 5602c23108699108f96f8d46e82bd3a4bab34048
-SHA1 (patch-export_output_stats.h) = 736dbd60f9374f0bdc3b3f7ae1c187ad1f68bfb8
-SHA1 (patch-export_settings.h) = ffc21f6d2ab3afccacd1dc67a9902f0c54333e80
-SHA1 (patch-last_user_input.h) = 961f5a2a308ec973bc8037658c5658ce145627ef
-SHA1 (patch-lib_base-crash_report_header.h) = dc48f472c54d91132d2c48ac6e6628bb7ef4cda1
-SHA1 (patch-lib_base-openssl_help.h) = 145e29381d9b7b6f3095db0cfc0d380fd3603f8e
-SHA1 (patch-lib_storage-CMakeLists.txt) = ef770e3f50f075d251262fc511ef21313f5edab1
-SHA1 (patch-lib_ui-CMakeLists.txt) = 337297cf3bfe7b67b503dbf29b8c9c267ad4fc5d
-SHA1 (patch-libtgvoip-audio-AudioIO.cpp) = 96b482354b3ad6321b3ea95767d0d55ba63dab38
-SHA1 (patch-libtgvoip-audio-AudioInput.cpp) = 7f6bd97e6d453d95f9317394bf8e4e47cabfbccb
-SHA1 (patch-libtgvoip-audio-AudioOutput.cpp) = ec83d33d1158c0e3e8ada0e0458c84347a38e112
-SHA1 (patch-libtgvoip-threading.h) = 929bd84af9515d15eff00866237df5044912f5e3
-SHA1 (patch-libtgvoip-webrtc_dsp-platform_thread_types.cc) = 0c2d20a9ba95acae349519507dc9515fdb7a6cec
-SHA1 (patch-libtgvoip-webrtc_dsp-rtc_base-stringutils.h) = fb3f30dac740098d467562b75239fef9fbaa810d
-SHA1 (patch-mtproto-mtproto_abstract_socket.h) = e5eb4114a4e4095ee2681e4bd143f753139762b2
-SHA1 (patch-mtproto-mtproto_bound_key_creator.h) = e93f5415a93fba0a0ab38a0e4132d98795b967ce
-SHA1 (patch-mtproto-mtproto_proxy_data.h) = 6819e4faf65eac4d0056b05eef96d76b84516c9f
-SHA1 (patch-mtproto_auth_key.h) = 3adc37f261b4ed201405dabca5c18b8dc1f08284
-SHA1 (patch-mtproto_dc_key_creator.h) = 20aa938154094e7d6fecef198503c3452d3ba104
-SHA1 (patch-mtproto_dcenter.h) = 4ead420e0ecf1b722f868f270ca54f284fccd4d1
-SHA1 (patch-mtproto_dh_utils.h) = c41b9f24a785791b4a0b9fb804373454e57dc8ff
-SHA1 (patch-mtproto_domain_resolver.h) = a330674e816fa00da9c3459ec3c14c269dcb791b
-SHA1 (patch-mtproto_received_ids_manager.h) = a91c498c85a140dfa79fe4973a53c36717da8a8c
-SHA1 (patch-mtproto_rpc_sender.h) = 028c7ff9bf8ca0e30f28ce2b40a40773fb120026
-SHA1 (patch-mtproto_rsa_public_key.h) = 15dc450b998eae7643dad5bd185f49e4cd66e3f1
-SHA1 (patch-mtproto_serialized_request.h) = ea4093416d563168b5ec7d22cdb1c774be175239
-SHA1 (patch-observer.h) = 023e0aa9caa7efe3db575db1dc4af7227d84c29c
-SHA1 (patch-parse_helper.h) = da283461c598d06bc60e084798ffa207a963e49a
-SHA1 (patch-qthelp_url.h) = 2611720a38f9ff4422c9a64f17067ca8bd5f2ec8
-SHA1 (patch-runtime_composer.h) = 14776d343a4a8d275e6af33c67635affc0b89e3e
-SHA1 (patch-single_instance.h) = b696df585bb711149bd33e85d9b164850cf008b6
-SHA1 (patch-storage_cache_types.h) = 42a113dabb24fe1f633a63c39c57e3380d68cc27
-SHA1 (patch-storage_clear_legacy.h) = f3fb47425aac69b5aaeeccb62e80c383877b2e37
-SHA1 (patch-storage_encryption.h) = bdf884415c455f64acd0e765161c5f02dc9cb8df
-SHA1 (patch-timer.h) = 8aaaa03721d4fca2f762f6561e13cccd6a275061
-SHA1 (patch-unixtime.h) = 0ec3ce5549e24cb4fc15098d0596e16dd4b888cf
+BLAKE2s (tdesktop/tdesktop-7.0.9-full.tar.gz) = d280277d74932694c003b7dcc5ef9958e4b7e15ec7672d334aa4abdc712a326d
+SHA512 (tdesktop/tdesktop-7.0.9-full.tar.gz) = c5e97a146c903b3398b53a7451d86efcbb5f87a989586d20753c83e2cb1452b964ab1175b88977eb590b04bcffc14fc678eb9f6a629b7f6f7af522a0da811780
+Size (tdesktop/tdesktop-7.0.9-full.tar.gz) = 81403059 bytes
+SHA1 (patch-Telegram_SourceFiles_boxes_star__gift__preview__box.cpp) = 754e2b8a938094821aff3c9bc8fed506cdf37ccc
+SHA1 (patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp) = 4684ab209324e3aaf38f9e8ee137ef005cde4e4e
+SHA1 (patch-Telegram_ThirdParty_cmark-gfm_CMakeLists.txt) = e3661bc5f44d60e31b70d37c6bb9438225ecfdf7
+SHA1 (patch-Telegram_lib__base_base_platform_linux_base__linux__xcb__library.cpp) = 3ede412d4c7ddfd8e98ed5fc4322ba5c8aa664b8
+SHA1 (patch-Telegram_lib_spellcheck_spellcheck_third__party_hunspell__controller.cpp) = 179db7954e4b012a4b0e698d0d4fcb802a9a90be
+SHA1 (patch-Telegram_lib_ui_ui_ui__utility.cpp) = c11a7339384227e1ca32f29edc00d8fa711894b9
+SHA1 (patch-cmake_options.cmake) = fbc8e9aecffb8a23cf40ed050935f845f00739b0
diff --git a/telegram-desktop/options.mk b/telegram-desktop/options.mk
index d64adf9d8e..a9e2de6eaa 100644
--- a/telegram-desktop/options.mk
+++ b/telegram-desktop/options.mk
@@ -1,42 +1,19 @@
 # $NetBSD$
 
-PKG_OPTIONS_VAR=          PKG_OPTIONS.telegram-desktop
+PKG_OPTIONS_VAR=	PKG_OPTIONS.telegram-desktop
 
-PKG_SUPPORTED_OPTIONS=    gtk3 spell dbus libressl
+PKG_SUPPORTED_OPTIONS=	enchant libressl
 
 .include "../../mk/bsd.options.mk"
 
 ###
-### GTK+3 integration
+### Spell checking via Enchant (otherwise bundled Hunspell)
 ###
-.if !empty(PKG_OPTIONS:Mgtk3)
-CMAKE_CONFIGURE_ARGS+=              -DTDESKTOP_DISABLE_GTK_INTEGRATION=OFF
-CMAKE_CONFIGURE_ARGS+=              -DTDESKTOP_FORCE_GTK_FILE_DIALOG=ON
-.include "../../devel/libappindicator/buildlink3.mk"
-.include "../../x11/gtk3/buildlink3.mk"
+.if !empty(PKG_OPTIONS:Menchant)
+CMAKE_CONFIGURE_ARGS+=              -DDESKTOP_APP_USE_ENCHANT=ON
+.include "../../textproc/enchant2/buildlink3.mk"
 .else
-CMAKE_CONFIGURE_ARGS+=              -DTDESKTOP_DISABLE_GTK_INTEGRATION=ON
-CMAKE_CONFIGURE_ARGS+=              -DTDESKTOP_FORCE_GTK_FILE_DIALOG=OFF
-.endif
-
-###
-### Spell checking
-###
-.if !empty(PKG_OPTIONS:Mspell)
-CMAKE_CONFIGURE_ARGS+=              -DDESKTOP_APP_DISABLE_SPELLCHECK=OFF
-.include "../../textproc/enchant/buildlink3.mk"
-.else
-CMAKE_CONFIGURE_ARGS+=              -DDESKTOP_APP_DISABLE_SPELLCHECK=ON
-.endif
-
-###
-### D-Bus integration
-###
-.if !empty(PKG_OPTIONS:Mdbus)
-CMAKE_CONFIGURE_ARGS+=              -DTDESKTOP_DISABLE_DBUS_INTEGRATION=OFF
-.include "../../sysutils/dbus/buildlink3.mk"
-.else
-CMAKE_CONFIGURE_ARGS+=              -DTDESKTOP_DISABLE_DBUS_INTEGRATION=ON
+CMAKE_CONFIGURE_ARGS+=              -DDESKTOP_APP_USE_ENCHANT=OFF
 .endif
 
 ###
@@ -47,14 +24,3 @@ CMAKE_CONFIGURE_ARGS+=              -DTDESKTOP_DISABLE_DBUS_INTEGRATION=ON
 .else
 .include "../../security/openssl/buildlink3.mk"
 .endif
-
-###
-### PulseAudio
-###
-.if !empty(PKG_OPTIONS:Mpulseaudio)
-.include "../../security/pulseaudio/buildlink3.mk"
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_WITHOUT_PULSE=OFF
-.else
-CMAKE_CONFIGURE_ARGS+=           -DTDESKTOP_WITHOUT_PULSE=ON
-.endif
-
diff --git a/telegram-desktop/patches/patch-Telegram-lib_base-base-object_ptr.h b/telegram-desktop/patches/patch-Telegram-lib_base-base-object_ptr.h
deleted file mode 100644
index 96b09024c1..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_base-base-object_ptr.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/object_ptr.h.orig	2021-02-28 15:15:14.754032642 +0000
-+++ Telegram/lib_base/base/object_ptr.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- #include <QtCore/QPointer>
- 
- // Smart pointer for QObject*, has move semantics, destroys object if it doesn't have a parent.
diff --git a/telegram-desktop/patches/patch-Telegram-lib_base-base-unique_qptr.h b/telegram-desktop/patches/patch-Telegram-lib_base-base-unique_qptr.h
deleted file mode 100644
index fffd8d2ba2..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_base-base-unique_qptr.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/unique_qptr.h.orig	2021-02-28 12:09:26.827342516 +0000
-+++ Telegram/lib_base/base/unique_qptr.h
-@@ -8,6 +8,8 @@
- 
- #include <QtCore/QPointer>
- 
-+#include "base/base_pch.h"
-+
- namespace base {
- 
- template <typename T>
diff --git a/telegram-desktop/patches/patch-Telegram-lib_lottie-lottie-lottie_animation.cpp b/telegram-desktop/patches/patch-Telegram-lib_lottie-lottie-lottie_animation.cpp
deleted file mode 100644
index 2fcb123266..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_lottie-lottie-lottie_animation.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_lottie/lottie/lottie_animation.cpp.orig	2021-02-28 21:30:27.481815450 +0000
-+++ Telegram/lib_lottie/lottie/lottie_animation.cpp
-@@ -143,10 +143,7 @@ std::unique_ptr<rlottie::Animation> Crea
- 		string,
- 		std::string(),
- 		std::string(),
--		false,
--		(replacements
--			? replacements->replacements
--			: std::vector<std::pair<std::uint32_t, std::uint32_t>>()));
-+		false);
- #else
- 	auto result = rlottie::Animation::loadFromData(
- 		string,
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-emoji_suggestions-emoji_suggestions.h b/telegram-desktop/patches/patch-Telegram-lib_ui-emoji_suggestions-emoji_suggestions.h
deleted file mode 100644
index ce05066dc2..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-emoji_suggestions-emoji_suggestions.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/emoji_suggestions/emoji_suggestions.h.orig	2021-02-28 12:31:37.781715435 +0000
-+++ Telegram/lib_ui/emoji_suggestions/emoji_suggestions.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- #include <vector>
- 
- namespace Ui {
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-click_handler.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-click_handler.h
deleted file mode 100644
index 4689d14205..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-click_handler.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/click_handler.h.orig	2021-02-28 17:15:57.308129168 +0000
-+++ Telegram/lib_ui/ui/click_handler.h
-@@ -7,6 +7,8 @@
- #pragma once
- 
- #include "base/basic_types.h"
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- 
- #include <QtCore/QVariant>
- 
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-delayed_activation.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-delayed_activation.h
deleted file mode 100644
index 39d0758a30..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-delayed_activation.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/delayed_activation.h.orig	2021-02-28 17:44:56.030377067 +0000
-+++ Telegram/lib_ui/ui/delayed_activation.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- namespace Ui {
- 
- void ActivateWindowDelayed(not_null<QWidget*> widget);
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-effects-animation_value.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-effects-animation_value.h
deleted file mode 100644
index a5da906479..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-effects-animation_value.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/effects/animation_value.h.orig	2021-02-28 11:25:30.781059200 +0000
-+++ Telegram/lib_ui/ui/effects/animation_value.h
-@@ -6,6 +6,7 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
- #include "base/basic_types.h"
- 
- #include "ui/style/style_core.h"
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-inactive_press.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-inactive_press.h
deleted file mode 100644
index 79e7bf7626..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-inactive_press.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/inactive_press.h.orig	2021-02-28 18:13:12.771439953 +0000
-+++ Telegram/lib_ui/ui/inactive_press.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- namespace Ui {
- 
- void MarkInactivePress(not_null<QWidget*> widget, bool was);
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-integration.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-integration.h
deleted file mode 100644
index 0b1b55fe65..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-integration.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/integration.h.orig	2021-02-28 18:36:26.088211749 +0000
-+++ Telegram/lib_ui/ui/integration.h
-@@ -6,6 +6,8 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- #include "base/basic_types.h"
- 
- #include <any>
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-main_queue_processor.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-main_queue_processor.h
deleted file mode 100644
index 90f7e042be..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-main_queue_processor.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/main_queue_processor.h.orig	2021-02-28 19:12:54.602658465 +0000
-+++ Telegram/lib_ui/ui/main_queue_processor.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- namespace Ui {
- 
- class MainQueueProcessor : public QObject {
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-paint-arcs.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-paint-arcs.h
deleted file mode 100644
index 76df255c75..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-paint-arcs.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/paint/arcs.h.orig	2021-02-28 12:46:09.360997157 +0000
-+++ Telegram/lib_ui/ui/paint/arcs.h
-@@ -6,6 +6,8 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- #include "styles/style_widgets.h"
- 
- class Painter;
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-paint-blob.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-paint-blob.h
deleted file mode 100644
index e61de5ff78..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-paint-blob.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/paint/blob.h.orig	2021-02-28 13:09:14.690303948 +0000
-+++ Telegram/lib_ui/ui/paint/blob.h
-@@ -5,6 +5,8 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- 
- class Painter;
- 
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ph.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ph.h
deleted file mode 100644
index 051cd34f05..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ph.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/ph.h.orig	2021-02-28 19:41:30.438825267 +0000
-+++ Telegram/lib_ui/ui/ph.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- namespace ph {
- 
- struct now_t {
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-platform-ui_platform_window.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-platform-ui_platform_window.h
deleted file mode 100644
index 3df8c8c492..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-platform-ui_platform_window.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/platform/ui_platform_window.h.orig	2021-02-28 13:51:52.435256075 +0000
-+++ Telegram/lib_ui/ui/platform/ui_platform_window.h
-@@ -7,6 +7,8 @@
- #pragma once
- 
- #include "base/flags.h"
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- 
- namespace style {
- struct WindowTitle;
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-style-style_core_custom_font.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-style-style_core_custom_font.h
deleted file mode 100644
index 61624882d6..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-style-style_core_custom_font.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/style/style_core_custom_font.h.orig	2021-02-28 14:06:52.296838443 +0000
-+++ Telegram/lib_ui/ui/style/style_core_custom_font.h
-@@ -5,6 +5,8 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- 
- namespace style {
- 
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-text-text_utilities.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-text-text_utilities.h
deleted file mode 100644
index 7b781478e1..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-text-text_utilities.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/text/text_utilities.h.orig	2021-02-28 14:24:08.412355928 +0000
-+++ Telegram/lib_ui/ui/text/text_utilities.h
-@@ -6,6 +6,8 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- #include "ui/text/text_entity.h"
- 
- namespace Ui {
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ui_log.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ui_log.h
deleted file mode 100644
index d1384de510..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ui_log.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/ui_log.h.orig	2021-02-28 20:50:46.372569239 +0000
-+++ Telegram/lib_ui/ui/ui_log.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- namespace Ui {
- 
- void WriteLogEntry(const QString &message);
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ui_utility.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ui_utility.h
deleted file mode 100644
index 6164a1294b..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-ui_utility.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/ui_utility.h.orig	2021-02-17 14:04:06.000000000 +0000
-+++ Telegram/lib_ui/ui/ui_utility.h
-@@ -6,6 +6,8 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- #include "base/unique_qptr.h"
- #include "ui/rect_part.h"
- #include "ui/integration.h"
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-call_button.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-call_button.h
deleted file mode 100644
index c3613487e0..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-call_button.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/widgets/call_button.h.orig	2021-02-28 14:56:04.836762188 +0000
-+++ Telegram/lib_ui/ui/widgets/call_button.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- #include "base/object_ptr.h"
- #include "ui/widgets/buttons.h"
- #include "ui/effects/animations.h"
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-labels.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-labels.h
deleted file mode 100644
index a7e3e6cb6f..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-labels.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/widgets/labels.h.orig	2021-02-28 14:48:53.039921824 +0000
-+++ Telegram/lib_ui/ui/widgets/labels.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- #include "ui/rp_widget.h"
- #include "ui/wrap/padding_wrap.h"
- #include "ui/text/text.h"
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-menu-menu_common.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-menu-menu_common.h
deleted file mode 100644
index 506e71f49e..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-widgets-menu-menu_common.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/widgets/menu/menu_common.h.orig	2021-02-28 16:48:47.226690078 +0000
-+++ Telegram/lib_ui/ui/widgets/menu/menu_common.h
-@@ -6,6 +6,9 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
-+
- namespace Ui::Menu {
- 
- enum class TriggeredSource {
diff --git a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-wrap-wrap.h b/telegram-desktop/patches/patch-Telegram-lib_ui-ui-wrap-wrap.h
deleted file mode 100644
index b5723d77b4..0000000000
--- a/telegram-desktop/patches/patch-Telegram-lib_ui-ui-wrap-wrap.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/ui/wrap/wrap.h.orig	2021-02-28 14:46:08.183426609 +0000
-+++ Telegram/lib_ui/ui/wrap/wrap.h
-@@ -6,6 +6,8 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
-+#include "ui/ui_pch.h"
- #include "ui/rp_widget.h"
- #include "ui/ui_utility.h"
- #include "base/object_ptr.h"
diff --git a/telegram-desktop/patches/patch-Telegram_SourceFiles_boxes_star__gift__preview__box.cpp b/telegram-desktop/patches/patch-Telegram_SourceFiles_boxes_star__gift__preview__box.cpp
new file mode 100644
index 0000000000..42bf9b75f9
--- /dev/null
+++ b/telegram-desktop/patches/patch-Telegram_SourceFiles_boxes_star__gift__preview__box.cpp
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Replace ranges::copy with a simple for loop — range-v3 0.10.0 does not
+support std::back_insert_iterator with ranges::copy.
+
+--- Telegram/SourceFiles/boxes/star_gift_preview_box.cpp.orig	2026-08-03 04:35:53.639496971 +0300
++++ Telegram/SourceFiles/boxes/star_gift_preview_box.cpp	2026-08-03 04:35:53.685843992 +0300
+@@ -1436,9 +1436,9 @@
+ 		void randomize() {
+ 			const auto choose = [](const auto &list, auto &indices) {
+ 				if (indices.empty()) {
+-					ranges::copy(
+-						ranges::views::ints(0, int(list.size())),
+-						std::back_inserter(indices));
++					for (int i = 0; i < int(list.size()); ++i) {
++						indices.push_back(i);
++					}
+ 				}
+ 				const auto which = base::RandomIndex(indices.size());
+ 				const auto index = indices[which];
diff --git a/telegram-desktop/patches/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp b/telegram-desktop/patches/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp
new file mode 100644
index 0000000000..86e8c1030e
--- /dev/null
+++ b/telegram-desktop/patches/patch-Telegram_SourceFiles_platform_linux_notifications__manager__linux.cpp
@@ -0,0 +1,29 @@
+$NetBSD$
+
+Replace ranges::fold_left with std::accumulate — range-v3 0.10.0
+(pkgsrc version) does not have fold_left, added in range-v3 0.12.0.
+
+--- Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp.orig	2026-08-03 10:32:05.664801354 +0300
++++ Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp	2026-08-03 10:32:05.711070649 +0300
+@@ -28,6 +28,7 @@
+ 
+ #include <QtCore/QBuffer>
+ #include <QtCore/QVersionNumber>
++#include <numeric>
+ #include <QtGui/QGuiApplication>
+ 
+ #include <ksandbox.h>
+@@ -363,9 +364,10 @@
+ 
+ 	if (!CurrentCapabilities.empty()) {
+ 		LOG(("Notification daemon capabilities: %1").arg(
+-			ranges::fold_left(
+-				CurrentCapabilities,
+-				"",
++			std::accumulate(
++				CurrentCapabilities.begin(),
++				CurrentCapabilities.end(),
++				std::string(),
+ 				[](const std::string &a, const std::string &b) {
+ 					return a + (a.empty() ? "" : ", ") + b;
+ 				}).c_str()));
diff --git a/telegram-desktop/patches/patch-Telegram_ThirdParty_cmark-gfm_CMakeLists.txt b/telegram-desktop/patches/patch-Telegram_ThirdParty_cmark-gfm_CMakeLists.txt
new file mode 100644
index 0000000000..dc5064d0c2
--- /dev/null
+++ b/telegram-desktop/patches/patch-Telegram_ThirdParty_cmark-gfm_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Remove in-source build guard from cmark-gfm — pkgsrc builds in-source
+by default (WRKSRC == build dir), so CMAKE_SOURCE_DIR == CMAKE_BINARY_DIR.
+
+--- Telegram/ThirdParty/cmark-gfm/CMakeLists.txt.orig	2026-07-27 20:19:00.000000000 +0000
++++ Telegram/ThirdParty/cmark-gfm/CMakeLists.txt
+@@ -11,10 +11,6 @@
+ include("FindAsan.cmake")
+ include("CheckFileOffsetBits.cmake")
+ 
+-if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+-    message(FATAL_ERROR "Do not build in-source.\nPlease remove CMakeCache.txt and the CMakeFiles/ directory.\nThen: mkdir build ; cd build ; cmake .. ; make")
+-endif()
+-
+ option(CMARK_TESTS "Build cmark-gfm tests and enable testing" ON)
+ option(CMARK_STATIC "Build static libcmark-gfm library" ON)
+ option(CMARK_SHARED "Build shared libcmark-gfm library" ON)
diff --git a/telegram-desktop/patches/patch-Telegram_cmake_lib_tgvoip.cmake b/telegram-desktop/patches/patch-Telegram_cmake_lib_tgvoip.cmake
deleted file mode 100644
index 0a7e0a239b..0000000000
--- a/telegram-desktop/patches/patch-Telegram_cmake_lib_tgvoip.cmake
+++ /dev/null
@@ -1,112 +0,0 @@
-$NetBSD$
-
---- Telegram/cmake/lib_tgvoip.cmake.orig	2021-02-17 15:20:05.000000000 +0000
-+++ Telegram/cmake/lib_tgvoip.cmake
-@@ -79,46 +79,6 @@ if (NOT TGVOIP_FOUND)
-         json11.cpp
-         json11.hpp
- 
--        # Windows
--        os/windows/NetworkSocketWinsock.cpp
--        os/windows/NetworkSocketWinsock.h
--        os/windows/AudioInputWave.cpp
--        os/windows/AudioInputWave.h
--        os/windows/AudioOutputWave.cpp
--        os/windows/AudioOutputWave.h
--        os/windows/AudioOutputWASAPI.cpp
--        os/windows/AudioOutputWASAPI.h
--        os/windows/AudioInputWASAPI.cpp
--        os/windows/AudioInputWASAPI.h
--        os/windows/MinGWSupport.h
--        os/windows/WindowsSpecific.cpp
--        os/windows/WindowsSpecific.h
--
--        # macOS
--        os/darwin/AudioInputAudioUnit.cpp
--        os/darwin/AudioInputAudioUnit.h
--        os/darwin/AudioOutputAudioUnit.cpp
--        os/darwin/AudioOutputAudioUnit.h
--        os/darwin/AudioInputAudioUnitOSX.cpp
--        os/darwin/AudioInputAudioUnitOSX.h
--        os/darwin/AudioOutputAudioUnitOSX.cpp
--        os/darwin/AudioOutputAudioUnitOSX.h
--        os/darwin/AudioUnitIO.cpp
--        os/darwin/AudioUnitIO.h
--        os/darwin/DarwinSpecific.mm
--        os/darwin/DarwinSpecific.h
--
--        # Linux
--        os/linux/AudioInputALSA.cpp
--        os/linux/AudioInputALSA.h
--        os/linux/AudioOutputALSA.cpp
--        os/linux/AudioOutputALSA.h
--        os/linux/AudioOutputPulse.cpp
--        os/linux/AudioOutputPulse.h
--        os/linux/AudioInputPulse.cpp
--        os/linux/AudioInputPulse.h
--        os/linux/AudioPulse.cpp
--        os/linux/AudioPulse.h
- 
-         # POSIX
-         os/posix/NetworkSocketPosix.cpp
-@@ -169,6 +129,51 @@ if (NOT TGVOIP_FOUND)
-         endif()
-     endif()
- 
-+	if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|DragonFly")
-+		remove_target_sources(Telegram ${src_loc}
-+        # Windows
-+        os/windows/NetworkSocketWinsock.cpp
-+        os/windows/NetworkSocketWinsock.h
-+        os/windows/AudioInputWave.cpp
-+        os/windows/AudioInputWave.h
-+        os/windows/AudioOutputWave.cpp
-+        os/windows/AudioOutputWave.h
-+        os/windows/AudioOutputWASAPI.cpp
-+        os/windows/AudioOutputWASAPI.h
-+        os/windows/AudioInputWASAPI.cpp
-+        os/windows/AudioInputWASAPI.h
-+        os/windows/MinGWSupport.h
-+        os/windows/WindowsSpecific.cpp
-+        os/windows/WindowsSpecific.h
-+
-+        # macOS
-+        os/darwin/AudioInputAudioUnit.cpp
-+        os/darwin/AudioInputAudioUnit.h
-+        os/darwin/AudioOutputAudioUnit.cpp
-+        os/darwin/AudioOutputAudioUnit.h
-+        os/darwin/AudioInputAudioUnitOSX.cpp
-+        os/darwin/AudioInputAudioUnitOSX.h
-+        os/darwin/AudioOutputAudioUnitOSX.cpp
-+        os/darwin/AudioOutputAudioUnitOSX.h
-+        os/darwin/AudioUnitIO.cpp
-+        os/darwin/AudioUnitIO.h
-+        os/darwin/DarwinSpecific.mm
-+        os/darwin/DarwinSpecific.h
-+
-+        # Linux
-+        os/linux/AudioInputALSA.cpp
-+        os/linux/AudioInputALSA.h
-+        os/linux/AudioOutputALSA.cpp
-+        os/linux/AudioOutputALSA.h
-+        os/linux/AudioOutputPulse.cpp
-+        os/linux/AudioOutputPulse.h
-+        os/linux/AudioInputPulse.cpp
-+        os/linux/AudioInputPulse.h
-+        os/linux/AudioPulse.cpp
-+        os/linux/AudioPulse.h
-+		)
-+	endif()
-+
-     target_include_directories(lib_tgvoip_bundled
-     PUBLIC
-         ${tgvoip_loc}
-@@ -179,7 +184,7 @@ if (NOT TGVOIP_FOUND)
-         desktop-app::external_opus
-     )
- 
--    if (LINUX)
-+    if (LINUX AND NOT (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|DragonFly"))
-         find_package(PkgConfig REQUIRED)
-         find_package(ALSA REQUIRED)
-         pkg_check_modules(PULSE REQUIRED libpulse)
diff --git a/telegram-desktop/patches/patch-Telegram_lib__base_base_platform_linux_base__linux__xcb__library.cpp b/telegram-desktop/patches/patch-Telegram_lib__base_base_platform_linux_base__linux__xcb__library.cpp
new file mode 100644
index 0000000000..a21e505652
--- /dev/null
+++ b/telegram-desktop/patches/patch-Telegram_lib__base_base_platform_linux_base__linux__xcb__library.cpp
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Use unversioned libxcb.so instead of hardcoded libxcb.so.1 (Linux).
+NetBSD ships libxcb.so.2, so dlopen("libxcb.so.1") fails, all xcb
+function pointers are null, and xcb_connection_has_error() dereferences
+null → SIGSEGV at address 0x0.
+
+--- Telegram/lib_base/base/platform/linux/base_linux_xcb_library.cpp.orig	2026-08-03 12:00:00.000000000 +0300
++++ Telegram/lib_base/base/platform/linux/base_linux_xcb_library.cpp
+@@ -11,7 +11,7 @@
+ namespace base::Platform::XCB::Library {
+ 
+ void *LoadSymbol(const char *name) {
+-	static const auto Handle = LoadLibrary("libxcb.so.1", RTLD_NODELETE);
++	static const auto Handle = LoadLibrary("libxcb.so", RTLD_NODELETE);
+ 	return Handle ? LoadSymbolGeneric(Handle, name) : nullptr;
+ }
+ 
diff --git a/telegram-desktop/patches/patch-Telegram_lib_base_CMakeLists.txt b/telegram-desktop/patches/patch-Telegram_lib_base_CMakeLists.txt
deleted file mode 100644
index eff00a2191..0000000000
--- a/telegram-desktop/patches/patch-Telegram_lib_base_CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/CMakeLists.txt.orig	2021-02-27 22:18:24.957120449 +0000
-+++ Telegram/lib_base/CMakeLists.txt
-@@ -14,7 +14,6 @@ init_target(lib_base_crash_report_writer
- 
- get_filename_component(src_loc . REALPATH)
- 
--target_precompile_headers(lib_base PRIVATE ${src_loc}/base/base_pch.h)
- nice_target_sources(lib_base ${src_loc}
- PRIVATE
-     base/platform/linux/base_file_utilities_linux.cpp
diff --git a/telegram-desktop/patches/patch-Telegram_lib_base_base_global_shortcuts.h b/telegram-desktop/patches/patch-Telegram_lib_base_base_global_shortcuts.h
deleted file mode 100644
index 1ff5324a45..0000000000
--- a/telegram-desktop/patches/patch-Telegram_lib_base_base_global_shortcuts.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/global_shortcuts.h.orig	2021-02-28 10:38:49.480394976 +0000
-+++ Telegram/lib_base/base/global_shortcuts.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- namespace base {
- 
diff --git a/telegram-desktop/patches/patch-Telegram_lib_base_base_global_shortcuts_generic.h b/telegram-desktop/patches/patch-Telegram_lib_base_base_global_shortcuts_generic.h
deleted file mode 100644
index a0459b840a..0000000000
--- a/telegram-desktop/patches/patch-Telegram_lib_base_base_global_shortcuts_generic.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/global_shortcuts_generic.h.orig	2021-02-28 10:43:12.865732966 +0000
-+++ Telegram/lib_base/base/global_shortcuts_generic.h
-@@ -6,6 +6,7 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
- #include "base/global_shortcuts.h"
- 
- namespace base {
diff --git a/telegram-desktop/patches/patch-Telegram_lib_base_base_platform_linux_base_xcb_utilities_linux_h b/telegram-desktop/patches/patch-Telegram_lib_base_base_platform_linux_base_xcb_utilities_linux_h
deleted file mode 100644
index 049da27f26..0000000000
--- a/telegram-desktop/patches/patch-Telegram_lib_base_base_platform_linux_base_xcb_utilities_linux_h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/platform/linux/base_xcb_utilities_linux.h.orig	2021-02-28 11:03:10.939139915 +0000
-+++ Telegram/lib_base/base/platform/linux/base_xcb_utilities_linux.h
-@@ -8,6 +8,8 @@
- 
- #include <xcb/xcb.h>
- 
-+#include "base/base_pch.h"
-+
- namespace base::Platform::XCB {
- 
- class CustomConnection {
diff --git a/telegram-desktop/patches/patch-Telegram_lib_spellcheck_spellcheck_third__party_hunspell__controller.cpp b/telegram-desktop/patches/patch-Telegram_lib_spellcheck_spellcheck_third__party_hunspell__controller.cpp
new file mode 100644
index 0000000000..11892e1231
--- /dev/null
+++ b/telegram-desktop/patches/patch-Telegram_lib_spellcheck_spellcheck_third__party_hunspell__controller.cpp
@@ -0,0 +1,36 @@
+$NetBSD$
+
+Replace ranges::views::chunk_by with manual grouping — range-v3 0.10.0
+(pkgsrc version) does not have chunk_by, added in range-v3 0.11.0.
+
+--- Telegram/lib_spellcheck/spellcheck/third_party/hunspell_controller.cpp.orig	2026-08-02 18:36:14.504239967 +0300
++++ Telegram/lib_spellcheck/spellcheck/third_party/hunspell_controller.cpp	2026-08-02 19:04:17.716375191 +0300
+@@ -574,13 +574,21 @@
+ 	});
+ 
+ 	// {{"a"}, {"β"}};
+-	auto groupedWords = ranges::views::all(
+-		filteredWords
+-	) | ranges::views::chunk_by([](auto &a, auto &b) {
+-		return WordScript(a) == WordScript(b);
+-	}) | ranges::views::transform([](auto &&rng) {
+-		return rng | ranges::to_vector;
+-	}) | ranges::to_vector;
++	auto groupedWordsVec = filteredWords | ranges::to_vector;
++	std::vector<std::vector<QString>> groupedWordsResult;
++	if (!groupedWordsVec.empty()) {
++		auto currentGroup = std::vector<QString>{ groupedWordsVec.front() };
++		for (auto it = std::next(groupedWordsVec.begin()); it != groupedWordsVec.end(); ++it) {
++			if (WordScript(*std::prev(it)) == WordScript(*it)) {
++				currentGroup.push_back(*it);
++			} else {
++				groupedWordsResult.push_back(std::move(currentGroup));
++				currentGroup = std::vector<QString>{ *it };
++			}
++		}
++		groupedWordsResult.push_back(std::move(currentGroup));
++	}
++	auto &groupedWords = groupedWordsResult;
+ 
+ 	// {QChar::Script_Latin, QChar::Script_Greek};
+ 	auto scripts = ranges::views::all(
diff --git a/telegram-desktop/patches/patch-Telegram_lib_ui_ui_ui__utility.cpp b/telegram-desktop/patches/patch-Telegram_lib_ui_ui_ui__utility.cpp
new file mode 100644
index 0000000000..1a1df7d24c
--- /dev/null
+++ b/telegram-desktop/patches/patch-Telegram_lib_ui_ui_ui__utility.cpp
@@ -0,0 +1,21 @@
+$NetBSD$
+
+On X11, Qt6 synthesizes pixelDelta from angleDelta with unreliable
+scaling, causing one mouse wheel notch to scroll multiple screens.
+Only use pixelDelta on Wayland or touchpad input; fall through to
+angleDelta for mouse wheel events on X11, which normalizes to 120
+per notch.
+
+--- Telegram/lib_ui/ui/ui_utility.cpp.orig	2026-08-18 17:00:00.304299587 +0300
++++ Telegram/lib_ui/ui/ui_utility.cpp
+@@ -278,7 +278,9 @@
+ 		&& !touch
+ 		&& (e->phase() == Qt::NoScrollPhase)
+ 		&& !e->angleDelta().isNull();
+-	if (!ignorePixels && !e->pixelDelta().isNull()) {
++	if (!ignorePixels
++		&& !e->pixelDelta().isNull()
++		&& (::Platform::IsWayland() || touch)) {
+ 		return convert(e->pixelDelta())
+ 			* ((::Platform::IsWayland() && !touch)
+ 				? kMagicScrollMultiplier
diff --git a/telegram-desktop/patches/patch-base_file_utilities.h b/telegram-desktop/patches/patch-base_file_utilities.h
deleted file mode 100644
index 3e9683dae7..0000000000
--- a/telegram-desktop/patches/patch-base_file_utilities.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/base_file_utilities.h.orig	2020-02-14 22:51:38.506037412 +0000
-+++ Telegram/lib_base/base/base_file_utilities.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- namespace base {
- 
diff --git a/telegram-desktop/patches/patch-base_file_utilities_linux.h b/telegram-desktop/patches/patch-base_file_utilities_linux.h
deleted file mode 100644
index fc0101214b..0000000000
--- a/telegram-desktop/patches/patch-base_file_utilities_linux.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/platform/linux/base_file_utilities_linux.h.orig	2020-02-14 16:28:52.347473766 +0000
-+++ Telegram/lib_base/base/platform/linux/base_file_utilities_linux.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- namespace base::Platform {
- 
diff --git a/telegram-desktop/patches/patch-base_info_linux.h b/telegram-desktop/patches/patch-base_info_linux.h
deleted file mode 100644
index 52e09df304..0000000000
--- a/telegram-desktop/patches/patch-base_info_linux.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/platform/linux/base_info_linux.h.orig	2020-02-14 19:21:13.810873287 +0000
-+++ Telegram/lib_base/base/platform/linux/base_info_linux.h
-@@ -6,6 +6,7 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
- #include "base/platform/base_platform_info.h"
- 
- namespace Platform {
diff --git a/telegram-desktop/patches/patch-base_last_input_linux.h b/telegram-desktop/patches/patch-base_last_input_linux.h
deleted file mode 100644
index 4a2c595103..0000000000
--- a/telegram-desktop/patches/patch-base_last_input_linux.h
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/platform/linux/base_last_input_linux.h.orig	2020-02-14 20:53:35.652350813 +0000
-+++ Telegram/lib_base/base/platform/linux/base_last_input_linux.h
-@@ -5,4 +5,4 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
--
-+#include "base/platform/base_platform_last_input.h"
diff --git a/telegram-desktop/patches/patch-base_pch.h b/telegram-desktop/patches/patch-base_pch.h
deleted file mode 100644
index f283bfbdbc..0000000000
--- a/telegram-desktop/patches/patch-base_pch.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/base_pch.h.orig	2020-02-14 20:38:18.195784056 +0000
-+++ Telegram/lib_base/base/base_pch.h
-@@ -16,6 +16,7 @@
- #include <crl/crl.h>
- #include <rpl/rpl.h>
- 
-+#include <optional>
- #include <vector>
- #include <unordered_map>
- #include <set>
diff --git a/telegram-desktop/patches/patch-base_platform_last_input.h b/telegram-desktop/patches/patch-base_platform_last_input.h
deleted file mode 100644
index 593c9df3ff..0000000000
--- a/telegram-desktop/patches/patch-base_platform_last_input.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/platform/base_platform_last_input.h.orig	2020-02-14 20:43:20.863762137 +0000
-+++ Telegram/lib_base/base/platform/base_platform_last_input.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- namespace base::Platform {
- 
diff --git a/telegram-desktop/patches/patch-base_platform_url_scheme.h b/telegram-desktop/patches/patch-base_platform_url_scheme.h
deleted file mode 100644
index 2e718f4c91..0000000000
--- a/telegram-desktop/patches/patch-base_platform_url_scheme.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/platform/base_platform_url_scheme.h.orig	2020-02-14 22:04:48.047028032 +0000
-+++ Telegram/lib_base/base/platform/base_platform_url_scheme.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- namespace base::Platform {
- 
diff --git a/telegram-desktop/patches/patch-call_delayed.h b/telegram-desktop/patches/patch-call_delayed.h
deleted file mode 100644
index 792f64bb91..0000000000
--- a/telegram-desktop/patches/patch-call_delayed.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/call_delayed.h.orig	2020-02-14 22:28:28.607785852 +0000
-+++ Telegram/lib_base/base/call_delayed.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base_pch.h"
- 
- namespace base {
- 
diff --git a/telegram-desktop/patches/patch-cmake_options.cmake b/telegram-desktop/patches/patch-cmake_options.cmake
new file mode 100644
index 0000000000..a13be08781
--- /dev/null
+++ b/telegram-desktop/patches/patch-cmake_options.cmake
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Treat NetBSD as Linux for platform options and set LINUX so that all
+if (LINUX) guards throughout the build system work correctly.
+
+--- cmake/options.cmake.orig	2026-07-27 20:19:00.000000000 +0000
++++ cmake/options.cmake
+@@ -14,8 +14,9 @@ target_compile_definitions(common_options
+ if (WIN32)
+     include(cmake/options_win.cmake)
+ elseif (APPLE)
+     include(cmake/options_mac.cmake)
+-elseif (LINUX)
++elseif (LINUX OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
++    set(LINUX TRUE)
+     include(cmake/options_linux.cmake)
+ else()
+     message(FATAL_ERROR "Unknown platform type")
diff --git a/telegram-desktop/patches/patch-concurrent_timer.h b/telegram-desktop/patches/patch-concurrent_timer.h
deleted file mode 100644
index 40862354f9..0000000000
--- a/telegram-desktop/patches/patch-concurrent_timer.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/concurrent_timer.h.orig	2020-02-14 22:40:43.318315127 +0000
-+++ Telegram/lib_base/base/concurrent_timer.h
-@@ -6,6 +6,7 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
- #include "base/binary_guard.h"
- #include <crl/crl_time.h>
- #include <crl/crl_object_on_queue.h>
diff --git a/telegram-desktop/patches/patch-export_api_wrap.h b/telegram-desktop/patches/patch-export_api_wrap.h
deleted file mode 100644
index 87394d28d0..0000000000
--- a/telegram-desktop/patches/patch-export_api_wrap.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/export/export_api_wrap.h.orig	2020-02-22 15:24:22.773948270 +0000
-+++ Telegram/SourceFiles/export/export_api_wrap.h
-@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesk
- */
- #pragma once
- 
-+#include "base/base_pch.h"
- #include "mtproto/mtproto_concurrent_sender.h"
- 
- namespace Export {
diff --git a/telegram-desktop/patches/patch-export_data_types.h b/telegram-desktop/patches/patch-export_data_types.h
deleted file mode 100644
index 606172fd24..0000000000
--- a/telegram-desktop/patches/patch-export_data_types.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/export/data/export_data_types.h.orig	2020-02-22 19:55:11.523863973 +0000
-+++ Telegram/SourceFiles/export/data/export_data_types.h
-@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesk
- #pragma once
- 
- #include "scheme.h"
-+#include "base/base_pch.h"
- #include "base/optional.h"
- #include "base/variant.h"
- 
diff --git a/telegram-desktop/patches/patch-export_output_abstract.h b/telegram-desktop/patches/patch-export_output_abstract.h
deleted file mode 100644
index 025666607b..0000000000
--- a/telegram-desktop/patches/patch-export_output_abstract.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/export/output/export_output_abstract.h.orig	2020-03-06 00:32:42.296561696 +0000
-+++ Telegram/SourceFiles/export/output/export_output_abstract.h
-@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesk
- #pragma once
- 
- #include <QtCore/QString>
-+#include <memory>
- 
- namespace Export {
- namespace Data {
diff --git a/telegram-desktop/patches/patch-export_output_stats.h b/telegram-desktop/patches/patch-export_output_stats.h
deleted file mode 100644
index 5c494b7594..0000000000
--- a/telegram-desktop/patches/patch-export_output_stats.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/export/output/export_output_stats.h.orig	2020-03-06 21:41:17.128893400 +0000
-+++ Telegram/SourceFiles/export/output/export_output_stats.h
-@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesk
- #pragma once
- 
- #include <atomic>
-+#include "../export_pch.h"
- 
- namespace Export {
- namespace Output {
diff --git a/telegram-desktop/patches/patch-export_settings.h b/telegram-desktop/patches/patch-export_settings.h
deleted file mode 100644
index bdecd55709..0000000000
--- a/telegram-desktop/patches/patch-export_settings.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/export/export_settings.h.orig	2020-01-28 17:45:49.000000000 +0000
-+++ Telegram/SourceFiles/export/export_settings.h
-@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesk
- 
- #include "base/flags.h"
- #include "base/flat_map.h"
-+#include "mtproto/mtproto_pch.h"
- 
- namespace Export {
- namespace Output {
diff --git a/telegram-desktop/patches/patch-last_user_input.h b/telegram-desktop/patches/patch-last_user_input.h
deleted file mode 100644
index d949e97b3a..0000000000
--- a/telegram-desktop/patches/patch-last_user_input.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/last_user_input.h.orig	2020-02-14 23:01:14.817848770 +0000
-+++ Telegram/lib_base/base/last_user_input.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- namespace base {
- 
diff --git a/telegram-desktop/patches/patch-lib_base-crash_report_header.h b/telegram-desktop/patches/patch-lib_base-crash_report_header.h
deleted file mode 100644
index 4f9e3074a8..0000000000
--- a/telegram-desktop/patches/patch-lib_base-crash_report_header.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/crash_report_header.h.orig	2020-02-18 23:14:27.572402430 +0000
-+++ Telegram/lib_base/base/crash_report_header.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- namespace base::details {
- 
diff --git a/telegram-desktop/patches/patch-lib_base-openssl_help.h b/telegram-desktop/patches/patch-lib_base-openssl_help.h
deleted file mode 100644
index 93a86a94bd..0000000000
--- a/telegram-desktop/patches/patch-lib_base-openssl_help.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/openssl_help.h.orig	2020-02-20 00:55:39.755225659 +0000
-+++ Telegram/lib_base/base/openssl_help.h
-@@ -8,6 +8,7 @@
- 
- #include "base/bytes.h"
- #include "base/algorithm.h"
-+#include "base/base_pch.h"
- #include "base/basic_types.h"
- 
- extern "C" {
diff --git a/telegram-desktop/patches/patch-lib_storage-CMakeLists.txt b/telegram-desktop/patches/patch-lib_storage-CMakeLists.txt
deleted file mode 100644
index f12587edd1..0000000000
--- a/telegram-desktop/patches/patch-lib_storage-CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
-Remove useless precompiled headers from lib_storage
-
---- Telegram/lib_storage/CMakeLists.txt.orig	2020-02-17 20:21:07.812160059 +0000
-+++ Telegram/lib_storage/CMakeLists.txt
-@@ -10,7 +10,6 @@ init_target(lib_storage)
- 
- get_filename_component(src_loc . REALPATH)
- 
--target_precompile_headers(lib_storage PRIVATE ${src_loc}/storage/storage_pch.h)
- nice_target_sources(lib_storage ${src_loc}
- PRIVATE
-     storage/storage_clear_legacy.cpp
diff --git a/telegram-desktop/patches/patch-lib_ui-CMakeLists.txt b/telegram-desktop/patches/patch-lib_ui-CMakeLists.txt
deleted file mode 100644
index ed1fdcff89..0000000000
--- a/telegram-desktop/patches/patch-lib_ui-CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_ui/CMakeLists.txt.orig	2020-03-06 23:16:00.470139439 +0000
-+++ Telegram/lib_ui/CMakeLists.txt
-@@ -26,7 +26,7 @@ generate_emoji(lib_ui emoji_suggestions/
- 
- set_target_properties(lib_ui PROPERTIES AUTOMOC ON AUTORCC ON)
- 
--target_precompile_headers(lib_ui PRIVATE ${src_loc}/ui/ui_pch.h)
-+#target_precompile_headers(lib_ui PRIVATE ${src_loc}/ui/ui_pch.h)
- nice_target_sources(lib_ui ${src_loc}
- PRIVATE
-     ${style_files}
diff --git a/telegram-desktop/patches/patch-libtgvoip-audio-AudioIO.cpp b/telegram-desktop/patches/patch-libtgvoip-audio-AudioIO.cpp
deleted file mode 100644
index 978d51d916..0000000000
--- a/telegram-desktop/patches/patch-libtgvoip-audio-AudioIO.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp.orig	2020-02-18 21:50:53.875728496 +0000
-+++ Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp
-@@ -31,7 +31,7 @@
- #endif
- #include "../os/windows/AudioInputWASAPI.h"
- #include "../os/windows/AudioOutputWASAPI.h"
--#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)
-+#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) || defined(__NetBSD__)
- #ifndef WITHOUT_ALSA
- #include "../os/linux/AudioInputALSA.h"
- #include "../os/linux/AudioOutputALSA.h"
diff --git a/telegram-desktop/patches/patch-libtgvoip-audio-AudioInput.cpp b/telegram-desktop/patches/patch-libtgvoip-audio-AudioInput.cpp
deleted file mode 100644
index 6b993f9c28..0000000000
--- a/telegram-desktop/patches/patch-libtgvoip-audio-AudioInput.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp.orig	2021-01-01 14:29:15.000000000 +0000
-+++ Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp
-@@ -26,7 +26,7 @@
- #include "../os/windows/AudioInputWave.h"
- #endif
- #include "../os/windows/AudioInputWASAPI.h"
--#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)
-+#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) || !defined(__NetBSD__)
- #ifndef WITHOUT_ALSA
- #include "../os/linux/AudioInputALSA.h"
- #endif
diff --git a/telegram-desktop/patches/patch-libtgvoip-audio-AudioOutput.cpp b/telegram-desktop/patches/patch-libtgvoip-audio-AudioOutput.cpp
deleted file mode 100644
index 7cf26e3d3f..0000000000
--- a/telegram-desktop/patches/patch-libtgvoip-audio-AudioOutput.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp.orig	2020-02-18 21:42:27.390221991 +0000
-+++ Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp
-@@ -29,7 +29,7 @@
- #include "../os/windows/AudioOutputWave.h"
- #endif
- #include "../os/windows/AudioOutputWASAPI.h"
--#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)
-+#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__) || defined(__NetBSD__)
- #ifndef WITHOUT_ALSA
- #include "../os/linux/AudioOutputALSA.h"
- #endif
diff --git a/telegram-desktop/patches/patch-libtgvoip-threading.h b/telegram-desktop/patches/patch-libtgvoip-threading.h
deleted file mode 100644
index df7be9d407..0000000000
--- a/telegram-desktop/patches/patch-libtgvoip-threading.h
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD$
-
---- Telegram/ThirdParty/libtgvoip/threading.h.orig	2020-01-21 12:16:27.000000000 +0000
-+++ Telegram/ThirdParty/libtgvoip/threading.h
-@@ -9,8 +9,9 @@
- 
- #include <functional>
- 
--#if defined(_POSIX_THREADS) || defined(_POSIX_VERSION) || defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__))
-+#if defined(_POSIX_THREADS) || defined(_POSIX_VERSION) || defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)) || defined(__NetBSD__)
- 
-+#include <cstring>
- #include <pthread.h>
- #include <semaphore.h>
- #include <sched.h>
-@@ -53,9 +54,12 @@ namespace tgvoip{
- 			name=NULL;
- 			thread=0;
- 		}
-+		char *descr=NULL;
- 
- 		virtual ~Thread(){
--
-+			if (this->descr != NULL){
-+				free(this->descr);
-+			}
- 		}
- 
- 		void Start(){
-@@ -71,6 +75,9 @@ namespace tgvoip{
- 
- 		void SetName(const char* name){
- 			this->name=name;
-+
-+			this->descr = (char *) malloc(sizeof(char) * (strlen(this->name) + 1));
-+			strcpy(this->descr, this->name);
- 		}
- 
- 
-@@ -92,8 +99,10 @@ namespace tgvoip{
- 		static void* ActualEntryPoint(void* arg){
- 			Thread* self=reinterpret_cast<Thread*>(arg);
- 			if(self->name){
--#if !defined(__APPLE__) && !defined(__gnu_hurd__)
-+#if !defined(__APPLE__) && !defined(__gnu_hurd__) && !defined(__NetBSD__)
- 				pthread_setname_np(self->thread, self->name);
-+#elif defined(__NetBSD__)
-+				pthread_setname_np(self->thread, self->name, self->descr);
- #elif !defined(__gnu_hurd__)
- 				pthread_setname_np(self->name);
- 				if(self->maxPriority){
diff --git a/telegram-desktop/patches/patch-libtgvoip-webrtc_dsp-platform_thread_types.cc b/telegram-desktop/patches/patch-libtgvoip-webrtc_dsp-platform_thread_types.cc
deleted file mode 100644
index 172081f80a..0000000000
--- a/telegram-desktop/patches/patch-libtgvoip-webrtc_dsp-platform_thread_types.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/platform_thread_types.cc.orig	2020-01-21 12:16:27.000000000 +0000
-+++ Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/platform_thread_types.cc
-@@ -11,7 +11,12 @@
- #include "rtc_base/platform_thread_types.h"
- 
- #if defined(WEBRTC_LINUX)
-+#if !defined(__NetBSD__)
- #include <sys/prctl.h>
-+#endif //!NetBSD
-+#if defined(__NetBSD__)
-+#include <lwp.h>
-+#endif //NetBSD
- #include <sys/syscall.h>
- #endif
- 
-@@ -27,6 +32,8 @@ PlatformThreadId CurrentThreadId() {
-   return gettid();
- #elif defined(WEBRTC_FUCHSIA)
-   return zx_thread_self();
-+#elif defined(__NetBSD__)
-+  return _lwp_self();
- #elif defined(WEBRTC_LINUX)
-   return syscall(__NR_gettid);
- #else
diff --git a/telegram-desktop/patches/patch-libtgvoip-webrtc_dsp-rtc_base-stringutils.h b/telegram-desktop/patches/patch-libtgvoip-webrtc_dsp-rtc_base-stringutils.h
deleted file mode 100644
index d3a819509f..0000000000
--- a/telegram-desktop/patches/patch-libtgvoip-webrtc_dsp-rtc_base-stringutils.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/stringutils.h.orig	2020-02-18 22:22:41.565702834 +0000
-+++ Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/stringutils.h
-@@ -25,7 +25,7 @@
- #endif  // WEBRTC_WIN
- 
- #if defined(WEBRTC_POSIX)
--#ifdef BSD
-+#if defined(BSD) || defined(__NetBSD__)
- #include <stdlib.h>
- #else  // BSD
- #include <alloca.h>
diff --git a/telegram-desktop/patches/patch-mtproto-mtproto_abstract_socket.h b/telegram-desktop/patches/patch-mtproto-mtproto_abstract_socket.h
deleted file mode 100644
index ba42166067..0000000000
--- a/telegram-desktop/patches/patch-mtproto-mtproto_abstract_socket.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/details/mtproto_abstract_socket.h.orig	2020-02-18 23:41:44.584330690 +0000
-+++ Telegram/SourceFiles/mtproto/details/mtproto_abstract_socket.h
-@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesk
- 
- #include "base/bytes.h"
- #include "base/basic_types.h"
-+#include "mtproto/mtproto_pch.h"
- 
- namespace MTP::details {
- 
diff --git a/telegram-desktop/patches/patch-mtproto-mtproto_bound_key_creator.h b/telegram-desktop/patches/patch-mtproto-mtproto_bound_key_creator.h
deleted file mode 100644
index ea05450085..0000000000
--- a/telegram-desktop/patches/patch-mtproto-mtproto_bound_key_creator.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/details/mtproto_bound_key_creator.h.orig	2020-02-19 00:00:10.457243223 +0000
-+++ Telegram/SourceFiles/mtproto/details/mtproto_bound_key_creator.h
-@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesk
- 
- #include "mtproto/details/mtproto_dc_key_creator.h"
- #include "mtproto/details/mtproto_dc_key_binder.h"
-+#include "mtproto/mtproto_pch.h"
- 
- namespace MTP::details {
- 
diff --git a/telegram-desktop/patches/patch-mtproto-mtproto_proxy_data.h b/telegram-desktop/patches/patch-mtproto-mtproto_proxy_data.h
deleted file mode 100644
index 3125953e49..0000000000
--- a/telegram-desktop/patches/patch-mtproto-mtproto_proxy_data.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/mtproto_proxy_data.h.orig	2020-02-19 00:21:27.967442742 +0000
-+++ Telegram/SourceFiles/mtproto/mtproto_proxy_data.h
-@@ -6,6 +6,7 @@ For license and copyright information pl
- https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
- */
- #pragma once
-+#include "mtproto/mtproto_pch.h"
- 
- namespace MTP {
- 
diff --git a/telegram-desktop/patches/patch-mtproto_auth_key.h b/telegram-desktop/patches/patch-mtproto_auth_key.h
deleted file mode 100644
index 85a50b87e3..0000000000
--- a/telegram-desktop/patches/patch-mtproto_auth_key.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/mtproto_auth_key.h.orig	2020-02-19 20:48:36.335845360 +0000
-+++ Telegram/SourceFiles/mtproto/mtproto_auth_key.h
-@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesk
- #pragma once
- 
- #include "base/bytes.h"
-+#include "mtproto/mtproto_pch.h"
- #include <array>
- #include <memory>
- 
diff --git a/telegram-desktop/patches/patch-mtproto_dc_key_creator.h b/telegram-desktop/patches/patch-mtproto_dc_key_creator.h
deleted file mode 100644
index b9238c7c44..0000000000
--- a/telegram-desktop/patches/patch-mtproto_dc_key_creator.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/details/mtproto_dc_key_creator.h.orig	2020-02-19 23:58:17.922620995 +0000
-+++ Telegram/SourceFiles/mtproto/details/mtproto_dc_key_creator.h
-@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesk
- 
- #include "mtproto/core_types.h"
- #include "mtproto/mtproto_auth_key.h"
-+#include "mtproto/mtproto_pch.h"
- #include "mtproto/connection_abstract.h"
- #include "base/basic_types.h"
- #include "base/expected.h"
diff --git a/telegram-desktop/patches/patch-mtproto_dcenter.h b/telegram-desktop/patches/patch-mtproto_dcenter.h
deleted file mode 100644
index e2a953fe00..0000000000
--- a/telegram-desktop/patches/patch-mtproto_dcenter.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/details/mtproto_dcenter.h.orig	2020-02-19 22:44:42.763730721 +0000
-+++ Telegram/SourceFiles/mtproto/details/mtproto_dcenter.h
-@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesk
- */
- #pragma once
- 
-+#include "mtproto/mtproto_pch.h"
- #include <QtCore/QReadWriteLock>
- 
- namespace MTP {
diff --git a/telegram-desktop/patches/patch-mtproto_dh_utils.h b/telegram-desktop/patches/patch-mtproto_dh_utils.h
deleted file mode 100644
index 3ba84cd358..0000000000
--- a/telegram-desktop/patches/patch-mtproto_dh_utils.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/mtproto_dh_utils.h.orig	2020-02-21 01:46:16.168677004 +0000
-+++ Telegram/SourceFiles/mtproto/mtproto_dh_utils.h
-@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesk
- 
- #include "base/bytes.h"
- #include "base/openssl_help.h"
-+#include "mtproto/mtproto_pch.h"
- 
- namespace MTP {
- 
diff --git a/telegram-desktop/patches/patch-mtproto_domain_resolver.h b/telegram-desktop/patches/patch-mtproto_domain_resolver.h
deleted file mode 100644
index 7632ec1f1c..0000000000
--- a/telegram-desktop/patches/patch-mtproto_domain_resolver.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/details/mtproto_domain_resolver.h.orig	2020-02-20 00:13:03.782166716 +0000
-+++ Telegram/SourceFiles/mtproto/details/mtproto_domain_resolver.h
-@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesk
- #pragma once
- 
- #include "base/weak_ptr.h"
-+#include "mtproto/mtproto_pch.h"
- 
- #include <QtCore/QPointer>
- #include <QtNetwork/QNetworkReply>
diff --git a/telegram-desktop/patches/patch-mtproto_received_ids_manager.h b/telegram-desktop/patches/patch-mtproto_received_ids_manager.h
deleted file mode 100644
index 888954ca73..0000000000
--- a/telegram-desktop/patches/patch-mtproto_received_ids_manager.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/details/mtproto_received_ids_manager.h.orig	2020-02-20 00:39:01.478695047 +0000
-+++ Telegram/SourceFiles/mtproto/details/mtproto_received_ids_manager.h
-@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesk
- #pragma once
- 
- #include "base/flat_map.h"
-+#include "mtproto/mtproto_pch.h"
- 
- namespace MTP::details {
- 
diff --git a/telegram-desktop/patches/patch-mtproto_rpc_sender.h b/telegram-desktop/patches/patch-mtproto_rpc_sender.h
deleted file mode 100644
index 06d41072b7..0000000000
--- a/telegram-desktop/patches/patch-mtproto_rpc_sender.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/mtproto_rpc_sender.h.orig	2020-01-28 17:45:49.000000000 +0000
-+++ Telegram/SourceFiles/mtproto/mtproto_rpc_sender.h
-@@ -7,7 +7,10 @@ https://github.com/telegramdesktop/tdesk
- */
- #pragma once
- 
-+#include "base/basic_types.h"
- #include "base/flat_set.h"
-+#include "mtproto/mtproto_pch.h"
-+
- 
- class RPCError {
- public:
diff --git a/telegram-desktop/patches/patch-mtproto_rsa_public_key.h b/telegram-desktop/patches/patch-mtproto_rsa_public_key.h
deleted file mode 100644
index 5d7cff7c55..0000000000
--- a/telegram-desktop/patches/patch-mtproto_rsa_public_key.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/details/mtproto_rsa_public_key.h.orig	2020-02-20 23:33:11.121488512 +0000
-+++ Telegram/SourceFiles/mtproto/details/mtproto_rsa_public_key.h
-@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesk
- #pragma once
- 
- #include "base/bytes.h"
-+#include "mtproto/mtproto_pch.h"
- 
- namespace MTP::details {
- 
diff --git a/telegram-desktop/patches/patch-mtproto_serialized_request.h b/telegram-desktop/patches/patch-mtproto_serialized_request.h
deleted file mode 100644
index 39f4521fa6..0000000000
--- a/telegram-desktop/patches/patch-mtproto_serialized_request.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/SourceFiles/mtproto/details/mtproto_serialized_request.h.orig	2020-02-20 23:55:56.201313743 +0000
-+++ Telegram/SourceFiles/mtproto/details/mtproto_serialized_request.h
-@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesk
- #pragma once
- 
- #include "mtproto/core_types.h"
-+#include "mtproto/mtproto_pch.h"
- 
- #include <crl/crl_time.h>
- 
diff --git a/telegram-desktop/patches/patch-observer.h b/telegram-desktop/patches/patch-observer.h
deleted file mode 100644
index 0dbb38d10a..0000000000
--- a/telegram-desktop/patches/patch-observer.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/observer.h.orig	2020-02-14 23:27:20.968340772 +0000
-+++ Telegram/lib_base/base/observer.h
-@@ -9,6 +9,7 @@
- #include <vector>
- #include <deque>
- #include <rpl/producer.h>
-+#include "base/base_pch.h"
- #include "base/type_traits.h"
- 
- namespace base {
diff --git a/telegram-desktop/patches/patch-parse_helper.h b/telegram-desktop/patches/patch-parse_helper.h
deleted file mode 100644
index 8aa63ce4f2..0000000000
--- a/telegram-desktop/patches/patch-parse_helper.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/parse_helper.h.orig	2020-02-14 23:42:23.359806430 +0000
-+++ Telegram/lib_base/base/parse_helper.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- namespace base {
- namespace parse {
diff --git a/telegram-desktop/patches/patch-qthelp_url.h b/telegram-desktop/patches/patch-qthelp_url.h
deleted file mode 100644
index df353f33be..0000000000
--- a/telegram-desktop/patches/patch-qthelp_url.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/qthelp_url.h.orig	2020-02-16 19:42:50.207614396 +0000
-+++ Telegram/lib_base/base/qthelp_url.h
-@@ -10,6 +10,8 @@
- #include <QtCore/QString>
- #include <QtCore/QRegularExpression>
- 
-+#include "base/base_pch.h"
-+
- namespace qthelp {
- 
- const QRegularExpression &RegExpDomain();
diff --git a/telegram-desktop/patches/patch-runtime_composer.h b/telegram-desktop/patches/patch-runtime_composer.h
deleted file mode 100644
index 7311599e51..0000000000
--- a/telegram-desktop/patches/patch-runtime_composer.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/runtime_composer.h.orig	2020-02-16 20:18:51.907563863 +0000
-+++ Telegram/lib_base/base/runtime_composer.h
-@@ -5,6 +5,7 @@
- // https://github.com/desktop-app/legal/blob/master/LEGAL
- //
- #pragma once
-+#include "base/base_pch.h"
- 
- template <typename Base>
- class RuntimeComposer;
diff --git a/telegram-desktop/patches/patch-single_instance.h b/telegram-desktop/patches/patch-single_instance.h
deleted file mode 100644
index 9d2a59acae..0000000000
--- a/telegram-desktop/patches/patch-single_instance.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/single_instance.h.orig	2020-02-16 20:34:20.023842921 +0000
-+++ Telegram/lib_base/base/single_instance.h
-@@ -6,6 +6,7 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
- #include "base/file_lock.h"
- 
- #include <QtNetwork/QLocalServer>
diff --git a/telegram-desktop/patches/patch-storage_cache_types.h b/telegram-desktop/patches/patch-storage_cache_types.h
deleted file mode 100644
index 3f45e62cf1..0000000000
--- a/telegram-desktop/patches/patch-storage_cache_types.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_storage/storage/cache/storage_cache_types.h.orig	2020-02-18 00:14:25.522435379 +0000
-+++ Telegram/lib_storage/storage/cache/storage_cache_types.h
-@@ -9,6 +9,7 @@
- #include "base/basic_types.h"
- #include "base/flat_map.h"
- #include "base/optional.h"
-+#include "storage/storage_pch.h"
- #include <crl/crl_time.h>
- #include <QtCore/QString>
- #include <QtCore/QByteArray>
diff --git a/telegram-desktop/patches/patch-storage_clear_legacy.h b/telegram-desktop/patches/patch-storage_clear_legacy.h
deleted file mode 100644
index b460e2dfc1..0000000000
--- a/telegram-desktop/patches/patch-storage_clear_legacy.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_storage/storage/storage_clear_legacy.h.orig	2020-02-17 23:45:45.124957617 +0000
-+++ Telegram/lib_storage/storage/storage_clear_legacy.h
-@@ -6,6 +6,8 @@
- //
- #pragma once
- 
-+#include "storage/storage_pch.h"
-+
- namespace Storage {
- 
- using CollectGoodFiles = Fn<void(FnMut<void(base::flat_set<QString>&&)>)>;
diff --git a/telegram-desktop/patches/patch-storage_encryption.h b/telegram-desktop/patches/patch-storage_encryption.h
deleted file mode 100644
index 406142eeff..0000000000
--- a/telegram-desktop/patches/patch-storage_encryption.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_storage/storage/storage_encryption.h.orig	2020-02-18 00:05:13.804386114 +0000
-+++ Telegram/lib_storage/storage/storage_encryption.h
-@@ -7,6 +7,7 @@
- #pragma once
- 
- #include "base/bytes.h"
-+#include "storage/storage_pch.h"
- 
- namespace Storage {
- 
diff --git a/telegram-desktop/patches/patch-timer.h b/telegram-desktop/patches/patch-timer.h
deleted file mode 100644
index 488f7ce084..0000000000
--- a/telegram-desktop/patches/patch-timer.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/timer.h.orig	2020-02-16 20:39:14.706242585 +0000
-+++ Telegram/lib_base/base/timer.h
-@@ -8,6 +8,7 @@
- 
- #include <QtCore/QObject>
- #include <QtCore/QThread>
-+#include "base/base_pch.h"
- #include "base/flat_map.h"
- 
- #include <crl/crl_time.h>
diff --git a/telegram-desktop/patches/patch-unixtime.h b/telegram-desktop/patches/patch-unixtime.h
deleted file mode 100644
index decc3e3ade..0000000000
--- a/telegram-desktop/patches/patch-unixtime.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- Telegram/lib_base/base/unixtime.h.orig	2020-02-17 18:57:26.650800032 +0000
-+++ Telegram/lib_base/base/unixtime.h
-@@ -6,6 +6,7 @@
- //
- #pragma once
- 
-+#include "base/base_pch.h"
- #include "base/basic_types.h"
- 
- class QDateTime;



Home | Main Index | Thread Index | Old Index