summaryrefslogtreecommitdiff
path: root/net-im/telegram-desktop/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-10 15:51:39 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-10 15:51:39 +0100
commit42e82780761e75f17a5cc96626558a297782f385 (patch)
tree45425190df4e3cbf429fd2b0834f320d51fd6579 /net-im/telegram-desktop/files
parent3d00647fec2600e217d690a64ba45a41f1a2fa0c (diff)
gentoo auto-resync : 10:06:2023 - 15:51:39
Diffstat (limited to 'net-im/telegram-desktop/files')
-rw-r--r--net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram.patch43
-rw-r--r--net-im/telegram-desktop/files/tdesktop-4.8.3-fix-clang.patch52
-rw-r--r--net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch50
3 files changed, 102 insertions, 43 deletions
diff --git a/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram.patch b/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram.patch
deleted file mode 100644
index a7710e145443..000000000000
--- a/net-im/telegram-desktop/files/tdesktop-4.2.4-jemalloc-only-telegram.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Only link jemalloc for the Telegram binary
-
-Some combination of factors is making the different codegen tools hang when
-jemalloc is linked for those, and they're ran under portage's sandbox. Since
-this is only used during build-time, and jemalloc is merely necessary to
-improve runtime memory use, it's unnecessary to use it for anything else.
-
-https://bugs.gentoo.org/802624
-
---- tdesktop-4.2.4-full.orig/Telegram/CMakeLists.txt
-+++ tdesktop-4.2.4-full/Telegram/CMakeLists.txt
-@@ -1478,6 +1478,14 @@
- desktop-app::external_wayland_client
- )
- endif()
-+
-+ if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
-+ target_link_libraries(Telegram
-+ INTERFACE
-+ $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
-+ $<LINK_ONLY:desktop-app::external_jemalloc>
-+ )
-+ endif()
- endif()
-
- if (build_macstore)
---- tdesktop-4.2.4-full.orig/cmake/options_linux.cmake
-+++ tdesktop-4.2.4-full/cmake/options_linux.cmake
-@@ -78,14 +78,6 @@
- )
- endif()
-
--if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
-- target_link_libraries(common_options
-- INTERFACE
-- $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
-- $<LINK_ONLY:desktop-app::external_jemalloc>
-- )
--endif()
--
- if (DESKTOP_APP_USE_ALLOCATION_TRACER)
- target_link_options(common_options
- INTERFACE
diff --git a/net-im/telegram-desktop/files/tdesktop-4.8.3-fix-clang.patch b/net-im/telegram-desktop/files/tdesktop-4.8.3-fix-clang.patch
new file mode 100644
index 000000000000..5135c3c5ef4b
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.8.3-fix-clang.patch
@@ -0,0 +1,52 @@
+Fix build issues with clang
+
+/var/tmp/portage/net-im/telegram-desktop-4.8.3/work/tdesktop-4.8.3-full/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux.cpp:198:4: error: reference to 'GObject' is ambiguous
+ GObject::Object,
+ ^
+/usr/include/glib-2.0/gobject/gobject.h:192:42: note: candidate found by name lookup is 'GObject'
+typedef struct _GObject GObject;
+ ^
+/var/tmp/portage/net-im/telegram-desktop-4.8.3/work/tdesktop-4.8.3-full_build/gen/gobject/_functions_impl.hpp:10:11: note: candidate found by name lookup is 'gi::repository::GObject'
+namespace GObject {
+ ^
+--- tdesktop-4.8.3-full.orig/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux.cpp
++++ tdesktop-4.8.3-full/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux.cpp
+@@ -195,7 +195,7 @@
+ player().set_loop_status("None");
+ player().set_rate(1.0);
+ const auto executeCommand = [=](
+- GObject::Object,
++ gi::repository::GObject::Object,
+ Gio::DBusMethodInvocation invocation) {
+ base::Integration::Instance().enterFromEventLoop([&] {
+ _commandRequests.fire_copy(
+@@ -232,23 +232,23 @@
+ return true;
+ });
+ player().property_loop_status().signal_notify().connect([=](
+- GObject::Object,
+- GObject::ParamSpec) {
++ gi::repository::GObject::Object,
++ gi::repository::GObject::ParamSpec) {
+ base::Integration::Instance().enterFromEventLoop([&] {
+ _commandRequests.fire_copy(
+ LoopStatusToCommand(player().get_loop_status()));
+ });
+ });
+ player().property_shuffle().signal_notify().connect([=](
+- GObject::Object,
+- GObject::ParamSpec) {
++ gi::repository::GObject::Object,
++ gi::repository::GObject::ParamSpec) {
+ base::Integration::Instance().enterFromEventLoop([&] {
+ _commandRequests.fire_copy(Command::Shuffle);
+ });
+ });
+ player().property_volume().signal_notify().connect([=](
+- GObject::Object,
+- GObject::ParamSpec) {
++ gi::repository::GObject::Object,
++ gi::repository::GObject::ParamSpec) {
+ base::Integration::Instance().enterFromEventLoop([&] {
+ _volumeChangeRequests.fire_copy(player().get_volume());
+ });
diff --git a/net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch b/net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch
new file mode 100644
index 000000000000..54c79b3e5a0c
--- /dev/null
+++ b/net-im/telegram-desktop/files/tdesktop-4.8.3-system-cppgir.patch
@@ -0,0 +1,50 @@
+Use system cppgir
+
+--- tdesktop-4.8.3-full.orig/cmake/external/glib/CMakeLists.txt
++++ tdesktop-4.8.3-full/cmake/external/glib/CMakeLists.txt
+@@ -7,14 +7,6 @@
+ add_library(external_glib INTERFACE IMPORTED GLOBAL)
+ add_library(desktop-app::external_glib ALIAS external_glib)
+
+-function(add_cppgir) # isolate scope
+- set(BUILD_TESTING OFF)
+- set(BUILD_DOC OFF)
+- set(CMAKE_DISABLE_FIND_PACKAGE_Qt5Core ON)
+- add_subdirectory(cppgir)
+-endfunction()
+-add_cppgir()
+-
+ include(generate_cppgir.cmake)
+ generate_cppgir(external_glib Gio-2.0)
+
+--- tdesktop-4.8.3-full.orig/cmake/external/glib/generate_cppgir.cmake
++++ tdesktop-4.8.3-full/cmake/external/glib/generate_cppgir.cmake
+@@ -4,6 +4,8 @@
+ # For license and copyright information please follow this link:
+ # https://github.com/desktop-app/legal/blob/master/LEGAL
+
++find_package(CppGir REQUIRED)
++
+ function(generate_cppgir target_name gir)
+ # cppgir generates all the dependent headers everytime, better to have a global folder
+ set(gen_dst ${CMAKE_BINARY_DIR}/gen)
+@@ -32,17 +34,16 @@
+ echo 1> ${gen_timestamp}
+ COMMENT "Generating C++ wrapper for ${gir} (${target_name})"
+ DEPENDS
+- cppgir
+ ${gir_path}
+ )
+ generate_target(${target_name} cppgir ${gen_timestamp} "" ${gen_dst})
+
+ get_target_property(target_type ${target_name} TYPE)
+ if (${target_type} STREQUAL "INTERFACE_LIBRARY")
+- target_link_libraries(${target_name} INTERFACE gi)
++ target_link_libraries(${target_name} INTERFACE CppGir::gi)
+ target_compile_definitions(${target_name} INTERFACE GI_INLINE GI_OBJECT_NEWV)
+ else()
+- target_link_libraries(${target_name} PUBLIC gi)
++ target_link_libraries(${target_name} PUBLIC CppGir::gi)
+ target_compile_definitions(${target_name} PUBLIC GI_INLINE GI_OBJECT_NEWV)
+ endif()
+ endfunction()