From 2c9b07292cdac5b81a062926d4abe9d3436b9227 Mon Sep 17 00:00:00 2001 From: Komeil Parseh Date: Sun, 27 Jul 2025 21:13:01 +0330 Subject: [PATCH 1/2] libtd: update to 1.8.51. adopt. --- common/shlibs | 2 +- srcpkgs/libtd/patches/build_2e2.patch | 45 +++++++++++++++++++++++++++ srcpkgs/libtd/template | 11 ++++--- 3 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/libtd/patches/build_2e2.patch diff --git a/common/shlibs b/common/shlibs index 8d1e7d3cfcb..622ffe35399 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4044,7 +4044,7 @@ libcglm.so.0 cglm-0.7.6_1 libfcft.so.4 fcft-3.0.1_1 libaml.so.0 aml-0.1.0_1 libneatvnc.so.0 neatvnc-0.3.2_1 -libtdjson.so.1.8.0 libtd-1.8.0_1 +libtdjson.so.1.8.51 libtd-1.8.51_1 libJudy.so.1 judy-1.0.5_1 libsignal-protocol-c.so.2 libsignal-protocol-c-2.3.3_2 libKSeExprUI.so.4 seexpr-krita-4.0.4.0_1 diff --git a/srcpkgs/libtd/patches/build_2e2.patch b/srcpkgs/libtd/patches/build_2e2.patch new file mode 100644 index 00000000000..9d2dfee0df7 --- /dev/null +++ b/srcpkgs/libtd/patches/build_2e2.patch @@ -0,0 +1,45 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -187,17 +187,14 @@ set(TDE2E_ENABLE_INSTALL ${TD_INSTALL_STATIC_LIBRARIES} CACHE BOOL "" FORCE) + set(TDE2E_INSTALL_INCLUDES ${TD_E2E_ONLY} CACHE BOOL "" FORCE) + add_subdirectory(tde2e) + +-if (TD_E2E_ONLY) +- if (TD_INSTALL_STATIC_LIBRARIES) ++if (TD_INSTALL_STATIC_LIBRARIES) + include(GeneratePkgConfig) +- generate_pkgconfig(tdutils "Telegram Library - Utils") + generate_pkgconfig(tde2e "Telegram Library - E2E") + install(EXPORT TdStaticTargets + FILE tde2eStaticTargets.cmake + NAMESPACE tde2e:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/tde2e" + ) +- endif() + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/tde2eConfig.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/tde2eStaticTargets.cmake\")\n") + include(CMakePackageConfigHelpers) + write_basic_package_version_file("tde2eConfigVersion.cmake" +@@ -207,7 +204,11 @@ if (TD_E2E_ONLY) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tde2eConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/tde2eConfigVersion.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/tde2e" + ) +- return() ++ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tde2e/td" ++ DESTINATION include ++ COMPONENT development ++ FILES_MATCHING PATTERN "*.h" ++ ) + endif() + + if (NOT TDUTILS_MIME_TYPE OR NOT TDUTILS_USE_EXTERNAL_DEPENDENCIES) +@@ -1400,7 +1401,6 @@ include(GeneratePkgConfig) + if (TD_INSTALL_STATIC_LIBRARIES) + generate_pkgconfig(tdutils "Telegram Library - Utils") + generate_pkgconfig(tdactor "Telegram Library - Actor") +- generate_pkgconfig(tde2e "Telegram Library - E2E") + generate_pkgconfig(tdnet "Telegram Library - Net") + generate_pkgconfig(tdsqlite "Telegram Library - SQLite") + generate_pkgconfig(tddb "Telegram Library - Database") +-- +2.50.1 + diff --git a/srcpkgs/libtd/template b/srcpkgs/libtd/template index 061be8884a0..c7b6171b66d 100644 --- a/srcpkgs/libtd/template +++ b/srcpkgs/libtd/template @@ -1,17 +1,18 @@ # Template file for 'libtd' pkgname=libtd -version=1.8.0 -revision=2 +version=1.8.51 +revision=1 +_td_hash=6d74326c5ce53aeb52496f157f0080d9b8515970 build_style=cmake build_helper=qemu hostmakedepends="gperf" makedepends="openssl-devel zlib-devel" short_desc="Cross-platform library for building Telegram clients" -maintainer="Orphaned " +maintainer="Komeil Parseh " license="BSL-1.0" homepage="https://core.telegram.org/tdlib" -distfiles="https://github.com/tdlib/td/archive/v${version}.tar.gz" -checksum=30d560205fe82fb811cd57a8fcbc7ac853a5b6195e9cb9e6ff142f5e2d8be217 +distfiles="https://github.com/tdlib/td/archive/${_td_hash}.tar.gz>libtd-${version}.tar.gz" +checksum=9e1c088fbea876b8a6b85b8478abc2facd05e380874a55d7ea687213e4ca3110 if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then broken="Unsupported tl-schema version -1" From 8b1b5c6baa92f8064ca060b934af237edfb2c53a Mon Sep 17 00:00:00 2001 From: Komeil Parseh Date: Mon, 28 Jul 2025 16:23:53 +0330 Subject: [PATCH 2/2] telegram-desktop: update to 5.16.6. --- .../telegram-desktop/patches/cstddef.h.patch | 30 ---------------- .../patches/std_nullptr_t.patch | 35 +++++++++++++++++++ srcpkgs/telegram-desktop/template | 11 +++--- 3 files changed, 41 insertions(+), 35 deletions(-) delete mode 100644 srcpkgs/telegram-desktop/patches/cstddef.h.patch create mode 100644 srcpkgs/telegram-desktop/patches/std_nullptr_t.patch diff --git a/srcpkgs/telegram-desktop/patches/cstddef.h.patch b/srcpkgs/telegram-desktop/patches/cstddef.h.patch deleted file mode 100644 index e5a86032279..00000000000 --- a/srcpkgs/telegram-desktop/patches/cstddef.h.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- a/Telegram/lib_ui/ui/widgets/buttons.h 2025-03-10 07:58:29.000000000 +0100 -+++ - 2025-03-13 21:21:45.309846801 +0100 -@@ -13,6 +13,7 @@ - #include "styles/style_widgets.h" - - #include -+#include - - class Painter; - -@@ -273,7 +274,7 @@ - const style::SettingsButton &st = st::defaultSettingsButton); - SettingsButton( - QWidget *parent, -- nullptr_t, -+ std::nullptr_t, - const style::SettingsButton &st = st::defaultSettingsButton); - ~SettingsButton(); - ---- a/Telegram/lib_ui/ui/widgets/buttons.cpp 2025-03-10 07:58:29.000000000 +0100 -+++ - 2025-03-13 21:27:09.133348285 +0100 -@@ -795,7 +795,7 @@ - - SettingsButton::SettingsButton( - QWidget *parent, -- nullptr_t, -+ std::nullptr_t, - const style::SettingsButton &st) - : RippleButton(parent, st.ripple) - , _st(st) diff --git a/srcpkgs/telegram-desktop/patches/std_nullptr_t.patch b/srcpkgs/telegram-desktop/patches/std_nullptr_t.patch new file mode 100644 index 00000000000..14d3fce0baa --- /dev/null +++ b/srcpkgs/telegram-desktop/patches/std_nullptr_t.patch @@ -0,0 +1,35 @@ +This fixes build issues on stricter environments (e.g. with musl libc), +where `nullptr_t` is not available in the global namespace. +--- a/Telegram/lib_ui/ui/widgets/buttons.cpp ++++ b/Telegram/lib_ui/ui/widgets/buttons.cpp +@@ -803,7 +803,7 @@ SettingsButton::SettingsButton( + + SettingsButton::SettingsButton( + QWidget *parent, +- nullptr_t, ++ std::nullptr_t, + const style::SettingsButton &st) + : RippleButton(parent, st.ripple) + , _st(st) +--- a/Telegram/lib_ui/ui/widgets/buttons.h ++++ b/Telegram/lib_ui/ui/widgets/buttons.h +@@ -12,6 +12,7 @@ + #include "ui/text/text.h" + #include "styles/style_widgets.h" + ++#include + #include + + class Painter; +@@ -276,7 +277,7 @@ public: + const Text::MarkedContext &context = {}); + SettingsButton( + QWidget *parent, +- nullptr_t, ++ std::nullptr_t, + const style::SettingsButton &st = st::defaultSettingsButton); + ~SettingsButton(); + +-- +2.50.1 + diff --git a/srcpkgs/telegram-desktop/template b/srcpkgs/telegram-desktop/template index e874e7f43ad..01f9bc5454e 100644 --- a/srcpkgs/telegram-desktop/template +++ b/srcpkgs/telegram-desktop/template @@ -1,6 +1,6 @@ # Template file for 'telegram-desktop' pkgname=telegram-desktop -version=5.12.3 +version=5.16.6 revision=1 build_style=cmake build_helper="qemu gir" @@ -8,15 +8,16 @@ configure_args="-DTDESKTOP_API_ID=209235 -DTDESKTOP_API_HASH=169ee702e1df4b6e66d80311db36cc43 -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON -DDESKTOP_APP_DISABLE_SPELLCHECK=$(vopt_if spellcheck 'false' 'true') + -Dtde2e_DIR='/usr/lib/cmake/Td' -DWaylandScanner_EXECUTABLE=/usr/bin/wayland-scanner -DQT_HOST_PATH=/usr" -hostmakedepends="pkg-config qt6-base python3 extra-cmake-modules - qt6-wayland-tools wayland-devel protobuf glib-devel kf6-kcoreaddons" +hostmakedepends="pkg-config qt6-base python3 extra-cmake-modules qt6-wayland-tools + qt6-declarative-host-tools wayland-devel protobuf glib-devel kf6-kcoreaddons" makedepends="alsa-lib-devel boost-devel fmt-devel ffmpeg6-devel libglib-devel gobject-introspection libdbusmenu-glib-devel libopenal-devel minizip-devel opus-devel xxHash-devel pulseaudio-devel range-v3 qt6-svg-devel libva-devel rapidjson liblz4-devel liblzma-devel - MesaLib-devel qt6-wayland-devel qt6-qt5compat-devel + MesaLib-devel qt6-wayland-devel qt6-qt5compat-devel libtd-devel qt6-base-private-devel kf6-kcoreaddons-devel ada-devel xcb-util-keysyms-devel $(vopt_if spellcheck hunspell-devel) protobuf-devel glibmm2.68-devel tg_owt rnnoise-devel jemalloc-devel qt6-declarative-devel" @@ -27,7 +28,7 @@ license="GPL-3.0-or-later, OpenSSL" homepage="https://desktop.telegram.org/" changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt" distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz" -checksum=050a19e74632eff02737f078b02d78e11faa108d0932371f3d64122b225d3034 +checksum=9b0ae00cec85d0c6735390cc453ed07f005da1d7927f2e77976037877bc1b594 build_options="spellcheck" build_options_default="spellcheck"