Update to tdesktop 4.3.4

bundled sonnet got replaced with bundled cld3.
More pending/backported upstream fixes.
This commit is contained in:
kn 2022-12-08 16:21:23 +00:00
parent 037885a5e4
commit 44312c7663
4 changed files with 53 additions and 22 deletions

View File

@ -5,7 +5,7 @@ NOT_FOR_ARCHS = ${BE_ARCHS} i386
COMMENT = Telegram Desktop messenger
PORTROACH = limit:-full$$
V = 4.3.3
V = 4.3.4
DISTNAME = tdesktop-${V}-full
PKGNAME = ${DISTNAME:-full=}
CATEGORIES = net
@ -17,6 +17,17 @@ DEBUG_PACKAGES = ${BUILD_PACKAGES}
HOMEPAGE = https://desktop.telegram.org
MASTER_SITES = https://github.com/telegramdesktop/tdesktop/releases/download/v${V}/
DIST_SUBDIR = tdesktop
MASTER_SITES0 = https://github.com/desktop-app/
# merged "Fix tdesktop 4.3.4 cld3 bundle build with system protobuf"
# https://github.com/desktop-app/cmake_helpers/pull/246
PATCHFILES += cmake-fix-cld3-protobuf-{cmake_helpers/pull/}246.patch:0
PATCH_CASES += cmake-*.patch) ${PATCH} ${PATCH_DIST_ARGS} \
-d ${WRKSRC}/cmake/ <$$patchfile ;;
PATCH_DIST_STRIP = -p1
MAINTAINER = Andrew Krasavin <noiseless-ak@yandex.ru>, \
Klemens Nanni <kn@openbsd.org>
@ -28,7 +39,7 @@ WANTLIB += ${COMPILER_LIBCXX} Qt6Core Qt6Core5Compat Qt6DBus Qt6Gui Qt6Network
WANTLIB += Qt6OpenGL Qt6OpenGLWidgets Qt6Svg Qt6Widgets absl_strings
WANTLIB += avcodec avformat avutil c crypto dispatch gio-2.0 giomm-2.68
WANTLIB += glib-2.0 glibmm-2.68 gobject-2.0 hunspell-1.7 jpeg lz4
WANTLIB += m openal qrcodegencpp rnnoise sigc-3.0 swresample swscale
WANTLIB += m openal protobuf-lite qrcodegencpp rnnoise sigc-3.0 swresample swscale
WANTLIB += tg_owt xcb xcb-keysyms xcb-record xcb-screensaver xxhash
WANTLIB += z
@ -55,6 +66,7 @@ LIB_DEPENDS = archivers/lz4 \
devel/glibmm268 \
devel/libdispatch \
devel/libsigc++30 \
devel/protobuf \
graphics/ffmpeg \
graphics/qr-code-generator>=1.7.0p1 \
net/tg_owt>=0.0.0.20220909 \
@ -96,10 +108,10 @@ NEEDED_BUNDLES += minizip
CFLAGS += -DIOAPI_NO_64
# unported and required
NEEDED_BUNDLES += rlottie tgcalls
NEEDED_BUNDLES += cld3 rlottie tgcalls
# exist under Qt5-only devel/kf5/
NEEDED_BUNDLES += kcoreaddons sonnet
NEEDED_BUNDLES += kcoreaddons
post-patch:
# XXX fix the following on every source file

View File

@ -1,2 +1,4 @@
SHA256 (tdesktop-4.3.3-full.tar.gz) = ZzD0I/hWlM5Gnjm4V36/IKeMr1PwlwcnPSw0ip0pq8A=
SIZE (tdesktop-4.3.3-full.tar.gz) = 55287695
SHA256 (tdesktop/cmake-fix-cld3-protobuf-246.patch) = daq13+7bPsFAHF+1moqtJuRKVfmn7K57incP1ntWC9o=
SHA256 (tdesktop/tdesktop-4.3.4-full.tar.gz) = qhHFL3gSxumlzPLjox1Sah21ViwbvLVxqnDWgcqQm5M=
SIZE (tdesktop/cmake-fix-cld3-protobuf-246.patch) = 942
SIZE (tdesktop/tdesktop-4.3.4-full.tar.gz) = 50030732

View File

@ -1,5 +1,8 @@
XXX bring glibmm268's Glib::ustring and range-v3 together
backport pending "Use std::invoke_result_t not ::result_of to fix C++20 tdesktop 4.3.4"
https://github.com/telegramdesktop/tdesktop/pull/25527
Index: Telegram/SourceFiles/platform/linux/specific_linux.cpp
--- Telegram/SourceFiles/platform/linux/specific_linux.cpp.orig
+++ Telegram/SourceFiles/platform/linux/specific_linux.cpp
@ -22,12 +25,17 @@ Index: Telegram/SourceFiles/platform/linux/specific_linux.cpp
}();
const auto freedesktopNotifications = [&] {
@@ -346,7 +350,7 @@ void LaunchGApplication() {
@@ -346,9 +350,10 @@ void LaunchGApplication() {
using Window::Notifications::Manager;
using NotificationId = Manager::NotificationId;
- using NotificationIdTuple = std::result_of<
+ using NotificationIdTuple = ranges::result_of<
decltype(&NotificationId::toTuple)(NotificationId*)
>::type;
- decltype(&NotificationId::toTuple)(NotificationId*)
- >::type;
+ using NotificationIdTuple = std::invoke_result_t<
+ decltype(&NotificationId::toTuple),
+ NotificationId*
+ >;
const auto notificationIdVariantType = [] {
try {

View File

@ -1,22 +1,31 @@
backport pending "Do actual check for long type size for Glib::Variant<(u)int64>"
https://github.com/desktop-app/lib_base/pull/148
backport merged "Use std::conditional_t for Glib::Variant<(u)int64> rather than LONG_TYPE_SIZE"
https://github.com/desktop-app/lib_base/pull/149
Index: Telegram/lib_base/base/platform/linux/base_linux_glibmm_helper.h
--- Telegram/lib_base/base/platform/linux/base_linux_glibmm_helper.h.orig
+++ Telegram/lib_base/base/platform/linux/base_linux_glibmm_helper.h
@@ -10,6 +10,7 @@
@@ -12,8 +12,14 @@
#include <glibmm/variant.h>
+#if LONG_TYPE_SIZE == 64
namespace Glib {
+struct Int64Helper0 {};
+using Int64Helper = std::conditional_t<std::is_same_v<gint64, int64>, Int64Helper0, int64>;
+
+struct UInt64Helper0 {};
+using UInt64Helper = std::conditional_t<std::is_same_v<guint64, uint64>, UInt64Helper0, uint64>;
+
template <>
@@ -103,6 +104,7 @@ class Variant<uint64> : public VariantBase (public)
-class Variant<int64> : public VariantBase
+class Variant<Int64Helper> : public VariantBase
{
public:
using CType = gint64;
@@ -58,7 +64,7 @@ class Variant<int64> : public VariantBase (public)
};
} // namespace Glib
+#endif LONG_TYPE_SIZE == 64
namespace base {
namespace Platform {
template <>
-class Variant<uint64> : public VariantBase
+class Variant<UInt64Helper> : public VariantBase
{
public:
using CType = guint64;