Update to tdesktop 4.3.1
4.3.0 switched to newer glibmm and thus broke clang builds. 4.3.1 is a fix release but not for the glibmm/range-v3/clang issues. Ship a minimal fix that builds and runs; upstream master is still broken. Newer versions require more tweaks and newer bundles, so make small steps.
This commit is contained in:
parent
d50e9eb113
commit
a54adc0b67
@ -5,11 +5,10 @@ NOT_FOR_ARCHS = ${BE_ARCHS} i386
|
||||
|
||||
COMMENT = Telegram Desktop messenger
|
||||
PORTROACH = limit:-full$$
|
||||
V = 4.2.4
|
||||
V = 4.3.1
|
||||
DISTNAME = tdesktop-${V}-full
|
||||
PKGNAME = ${DISTNAME:-full=}
|
||||
CATEGORIES = net
|
||||
REVISION = 1
|
||||
|
||||
DPB_PROPERTIES = parallel
|
||||
|
||||
@ -27,9 +26,9 @@ PERMIT_PACKAGE = Yes
|
||||
|
||||
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.4
|
||||
WANTLIB += glib-2.0 glibmm-2.4 gobject-2.0 hunspell-1.7 jpeg lz4
|
||||
WANTLIB += m openal qrcodegencpp rnnoise sigc-2.0 swresample swscale
|
||||
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 += tg_owt xcb xcb-keysyms xcb-record xcb-screensaver xxhash
|
||||
WANTLIB += z
|
||||
|
||||
@ -52,9 +51,9 @@ LIB_DEPENDS = archivers/lz4 \
|
||||
audio/openal \
|
||||
devel/abseil-cpp \
|
||||
devel/glib2 \
|
||||
devel/glib2mm \
|
||||
devel/glibmm268 \
|
||||
devel/libdispatch \
|
||||
devel/libsigc++-2 \
|
||||
devel/libsigc++30 \
|
||||
graphics/ffmpeg \
|
||||
graphics/qr-code-generator>=1.7.0p1 \
|
||||
net/tg_owt>=0.0.0.20220909 \
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (tdesktop-4.2.4-full.tar.gz) = qBCfzp1VVT78vHw9k0mGnh4mcRP1utr0jPTgwlzVWdE=
|
||||
SIZE (tdesktop-4.2.4-full.tar.gz) = 49210806
|
||||
SHA256 (tdesktop-4.3.1-full.tar.gz) = PB2MCbcttcn14tO0Z7RRprqUw7qClbmICEKk40lhU90=
|
||||
SIZE (tdesktop-4.3.1-full.tar.gz) = 49305237
|
||||
|
@ -12,7 +12,7 @@ Index: Telegram/CMakeLists.txt
|
||||
include(cmake/lib_tgcalls.cmake)
|
||||
include(cmake/td_export.cmake)
|
||||
include(cmake/td_mtproto.cmake)
|
||||
@@ -52,9 +51,7 @@ target_prepare_qrc(Telegram)
|
||||
@@ -51,9 +50,7 @@ set_target_properties(Telegram PROPERTIES AUTOMOC ON)
|
||||
|
||||
target_link_libraries(Telegram
|
||||
PRIVATE
|
||||
|
@ -0,0 +1,55 @@
|
||||
Index: Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
|
||||
--- Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp.orig
|
||||
+++ Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp
|
||||
@@ -67,12 +67,17 @@ std::unique_ptr<base::Platform::DBus::ServiceWatcher>
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::SESSION);
|
||||
+ const auto GlibNames =
|
||||
+ base::Platform::DBus::ListActivatableNames(connection);
|
||||
+ const std::vector<std::string> StringNames(
|
||||
+ GlibNames.begin(), GlibNames.end()
|
||||
+ );
|
||||
|
||||
const auto activatable = [&] {
|
||||
try {
|
||||
return ranges::contains(
|
||||
- base::Platform::DBus::ListActivatableNames(connection),
|
||||
- Glib::ustring(std::string(kService)));
|
||||
+ StringNames,
|
||||
+ std::string(kService));
|
||||
} catch (...) {
|
||||
// avoid service restart loop in sandboxed environments
|
||||
return true;
|
||||
@@ -121,7 +126,7 @@ void StartServiceAsync(Fn<void()> callback) {
|
||||
};
|
||||
|
||||
const auto errorName =
|
||||
- Gio::DBus::ErrorUtils::get_remote_error(e);
|
||||
+ Gio::DBus::ErrorUtils::get_remote_error(e).raw();
|
||||
|
||||
if (!ranges::contains(NotSupportedErrors, errorName)) {
|
||||
throw e;
|
||||
@@ -143,6 +148,11 @@ bool GetServiceRegistered() {
|
||||
try {
|
||||
const auto connection = Gio::DBus::Connection::get_sync(
|
||||
Gio::DBus::BusType::SESSION);
|
||||
+ const auto GlibNames =
|
||||
+ base::Platform::DBus::ListActivatableNames(connection);
|
||||
+ const std::vector<std::string> StringNames(
|
||||
+ GlibNames.begin(), GlibNames.end()
|
||||
+ );
|
||||
|
||||
const auto hasOwner = [&] {
|
||||
try {
|
||||
@@ -157,8 +167,8 @@ bool GetServiceRegistered() {
|
||||
static const auto activatable = [&] {
|
||||
try {
|
||||
return ranges::contains(
|
||||
- DBus::ListActivatableNames(connection),
|
||||
- Glib::ustring(std::string(kService)));
|
||||
+ StringNames,
|
||||
+ std::string(kService));
|
||||
} catch (...) {
|
||||
return false;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
XXX bring glibmm268's Glib::ustring and range-v3 together
|
||||
|
||||
Index: Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
|
||||
--- Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp.orig
|
||||
+++ Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
|
||||
@@ -103,7 +103,7 @@ std::optional<crl::time> FreedesktopDBusLastUserInputT
|
||||
"org.freedesktop.DBus.Error.AccessDenied",
|
||||
};
|
||||
|
||||
- const auto errorName = Gio::DBus::ErrorUtils::get_remote_error(e);
|
||||
+ const auto errorName = Gio::DBus::ErrorUtils::get_remote_error(e).raw();
|
||||
if (ranges::contains(NotSupportedErrors, errorName)) {
|
||||
NotSupported = true;
|
||||
return std::nullopt;
|
||||
@@ -163,7 +163,7 @@ std::optional<crl::time> MutterDBusLastUserInputTime()
|
||||
"org.freedesktop.DBus.Error.AccessDenied",
|
||||
};
|
||||
|
||||
- const auto errorName = Gio::DBus::ErrorUtils::get_remote_error(e);
|
||||
+ const auto errorName = Gio::DBus::ErrorUtils::get_remote_error(e).raw();
|
||||
if (ranges::contains(NotSupportedErrors, errorName)) {
|
||||
NotSupported = true;
|
||||
return std::nullopt;
|
Loading…
x
Reference in New Issue
Block a user