net-im/telegram-desktop: Update to 3.1.9
Thanks to the work done by Gleb (glebius@), we are able to remove most of the patches. 11 patches are upstreamed, and 2 seem to be obsolete. Changelog: https://github.com/telegramdesktop/tdesktop/blob/dev/changelog.txt PR: 259014
This commit is contained in:
parent
0a25c2abdd
commit
2bc3e6229f
18 changed files with 22 additions and 217 deletions
|
@ -1,6 +1,5 @@
|
|||
PORTNAME= telegram-desktop
|
||||
DISTVERSION= 2.8.11
|
||||
PORTREVISION= 3
|
||||
DISTVERSION= 3.1.9
|
||||
CATEGORIES= net-im
|
||||
MASTER_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/v${DISTVERSION}/
|
||||
DISTNAME= tdesktop-${DISTVERSION}-full
|
||||
|
@ -12,7 +11,7 @@ COMMENT= Telegram Desktop messaging app
|
|||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BROKEN_i386= Does not build, webrtc related.
|
||||
BROKEN_i386= does not build, webrtc related
|
||||
NOT_FOR_ARCHS= powerpc powerpc64 powerpcspe
|
||||
NOT_FOR_ARCHS_REASON= Only little endian is supported
|
||||
|
||||
|
@ -40,6 +39,7 @@ LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \
|
|||
libpipewire-0.3.so:multimedia/pipewire \
|
||||
libqrcodegencpp.so:graphics/qr-code-generator \
|
||||
libusrsctp.so:net/libusrsctp \
|
||||
libwebkit2gtk-4.0.so:www/webkit2-gtk3 \
|
||||
libxcb-keysyms.so:x11/xcb-util-keysyms \
|
||||
libxkbcommon.so:x11/libxkbcommon \
|
||||
libxxhash.so:devel/xxhash \
|
||||
|
@ -52,9 +52,10 @@ USE_GITHUB= nodefault
|
|||
GH_ACCOUNT= telegramdesktop
|
||||
GH_PROJECT= tdesktop
|
||||
USE_GL= gl
|
||||
USE_GNOME= glib20 glibmm
|
||||
USE_GNOME= glib20 glibmm gtk30
|
||||
INSTALLS_ICONS= yes
|
||||
USE_QT= core dbus gui imageformats network widgets buildtools_build \
|
||||
qmake_build wayland
|
||||
qmake_build wayland svg
|
||||
USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xrandr xtst
|
||||
|
||||
CMAKE_ARGS= -DDESKTOP_APP_SPECIAL_TARGET="" -DTDESKTOP_LAUNCHER_BASENAME="telegramdesktop" \
|
||||
|
@ -76,22 +77,24 @@ NO_CCACHE= yes
|
|||
# Telegram uses OpenAL for its audio, but libtgvoip (for voice calls) can use PulseAudio or ALSA.
|
||||
# It dynamically loads PulseAudio, and if this fails, it loads ALSA.
|
||||
# If both of them are not installed, then voice calls do not work, but other functionalities still work.
|
||||
OPTIONS_DEFINE= GTK
|
||||
OPTIONS_DEFAULT= ALSA
|
||||
OPTIONS_MULTI= AUDIO
|
||||
OPTIONS_MULTI_AUDIO= ALSA PULSEAUDIO
|
||||
|
||||
AUDIO_DESC= Audio backend for voice calls
|
||||
GTK_DESC= Gtk integration (Use Gtk dialogs, etc.)
|
||||
|
||||
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
|
||||
GTK_CMAKE_BOOL_OFF= DESKTOP_APP_DISABLE_GTK_INTEGRATION
|
||||
GTK_LIB_DEPENDS= libwebkit2gtk-4.0.so:www/webkit2-gtk3
|
||||
GTK_USE= GNOME=gtk30
|
||||
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
|
||||
|
||||
# Telegram asks each custom build to have its own API ID and hash.
|
||||
TELEGRAM_API_HASH= 20a3432aab43f24bb4460fceac5ba38d
|
||||
TELEGRAM_API_ID= 601761
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${CHOSEN_COMPILER_TYPE} == clang && ${COMPILER_VERSION} <= 100
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e '/-fstack-clash-protection/d' ${WRKSRC}/cmake/options_linux.cmake
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1626644072
|
||||
SHA256 (tdesktop-2.8.11-full.tar.gz) = 168487a59a8ae6ca1fbd66ccefc9eae19344af61bfb8d4cdde3cf73c115aa9dc
|
||||
SIZE (tdesktop-2.8.11-full.tar.gz) = 37105468
|
||||
TIMESTAMP = 1633724864
|
||||
SHA256 (tdesktop-3.1.9-full.tar.gz) = 569555194f8c8396ee21de44971709dc0d331fe9b3d99cce49977d6dd19fcecf
|
||||
SIZE (tdesktop-3.1.9-full.tar.gz) = 38494199
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
--- Telegram/CMakeLists.txt.orig 2020-02-18 08:28:06 UTC
|
||||
+++ Telegram/CMakeLists.txt
|
||||
@@ -4,6 +4,7 @@
|
||||
# For license and copyright information please follow this link:
|
||||
# https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
+link_directories(${OPUS_LIBDIR})
|
||||
add_executable(Telegram WIN32 MACOSX_BUNDLE)
|
||||
init_target(Telegram)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp.orig 2020-08-23 13:36:52 UTC
|
||||
--- Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp.orig 2021-10-08 09:51:22 UTC
|
||||
+++ Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp
|
||||
@@ -88,7 +88,7 @@ constexpr auto kRefreshTimeout = 7200 * crl::time(1000
|
||||
@@ -99,7 +99,7 @@ constexpr auto kRefreshTimeout = 7200 * crl::time(1000
|
||||
},
|
||||
5,
|
||||
};
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- Telegram/SourceFiles/platform/linux/specific_linux.cpp.orig 2021-07-17 09:47:10 UTC
|
||||
+++ Telegram/SourceFiles/platform/linux/specific_linux.cpp
|
||||
@@ -48,7 +48,7 @@ https://github.com/telegramdesktop/tdesktop/blob/maste
|
||||
#include <gio/gio.h>
|
||||
#include <glibmm.h>
|
||||
#include <giomm.h>
|
||||
-#include <jemalloc/jemalloc.h>
|
||||
+#include <malloc_np.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
|
@ -1,11 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/VoIPController.cpp.orig 2020-02-12 13:11:18 UTC
|
||||
+++ Telegram/ThirdParty/libtgvoip/VoIPController.cpp
|
||||
@@ -3005,7 +3005,7 @@ static void initMachTimestart() {
|
||||
#endif
|
||||
|
||||
double VoIPController::GetCurrentTime(){
|
||||
-#if defined(__linux__)
|
||||
+#if defined(__linux__) || defined(__FreeBSD__)
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
return ts.tv_sec+(double)ts.tv_nsec/1000000000.0;
|
|
@ -1,20 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp.orig 2018-12-31 01:05:58 UTC
|
||||
+++ 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__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)
|
||||
#ifndef WITHOUT_ALSA
|
||||
#include "../os/linux/AudioInputALSA.h"
|
||||
#include "../os/linux/AudioOutputALSA.h"
|
||||
@@ -65,7 +65,7 @@ AudioIO* AudioIO::Create(std::string inputDevice, std:
|
||||
return new ContextlessAudioIO<AudioInputWave, AudioOutputWave>(inputDevice, outputDevice);
|
||||
#endif
|
||||
return new ContextlessAudioIO<AudioInputWASAPI, AudioOutputWASAPI>(inputDevice, outputDevice);
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
#ifndef WITHOUT_ALSA
|
||||
#ifndef WITHOUT_PULSE
|
||||
if(AudioPulse::Load()){
|
|
@ -1,20 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp.orig 2018-12-31 01:05:58 UTC
|
||||
+++ 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__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)
|
||||
#ifndef WITHOUT_ALSA
|
||||
#include "../os/linux/AudioInputALSA.h"
|
||||
#endif
|
||||
@@ -72,7 +72,7 @@ void AudioInput::EnumerateDevices(std::vector<AudioInp
|
||||
}
|
||||
#endif
|
||||
AudioInputWASAPI::EnumerateDevices(devs);
|
||||
-#elif defined(__linux__) && !defined(__ANDROID__)
|
||||
+#elif (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
|
||||
#if !defined(WITHOUT_PULSE) && !defined(WITHOUT_ALSA)
|
||||
if(!AudioInputPulse::EnumerateDevices(devs))
|
||||
AudioInputALSA::EnumerateDevices(devs);
|
|
@ -1,20 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp.orig 2018-12-31 01:05:58 UTC
|
||||
+++ 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__) || defined(__FreeBSD_kernel__) || defined(__gnu_hurd__)
|
||||
#ifndef WITHOUT_ALSA
|
||||
#include "../os/linux/AudioOutputALSA.h"
|
||||
#endif
|
||||
@@ -83,7 +83,7 @@ void AudioOutput::EnumerateDevices(std::vector<AudioOu
|
||||
}
|
||||
#endif
|
||||
AudioOutputWASAPI::EnumerateDevices(devs);
|
||||
-#elif defined(__linux__) && !defined(__ANDROID__)
|
||||
+#elif (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
|
||||
#if !defined(WITHOUT_PULSE) && !defined(WITHOUT_ALSA)
|
||||
if(!AudioOutputPulse::EnumerateDevices(devs))
|
||||
AudioOutputALSA::EnumerateDevices(devs);
|
|
@ -1,20 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/logging.cpp.orig 2018-12-31 01:05:58 UTC
|
||||
+++ Telegram/ThirdParty/libtgvoip/logging.cpp
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <sys/system_properties.h>
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
|
||||
@@ -51,7 +51,7 @@ void tgvoip_log_file_write_header(FILE* file){
|
||||
#else
|
||||
char* systemVersion="Windows RT";
|
||||
#endif
|
||||
-#elif defined(__linux__)
|
||||
+#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
#ifdef __ANDROID__
|
||||
char systemVersion[128];
|
||||
char sysRel[PROP_VALUE_MAX];
|
|
@ -1,13 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp.orig 2018-11-23 01:03:16 UTC
|
||||
+++ Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp
|
||||
@@ -12,6 +12,10 @@
|
||||
#include "../../logging.h"
|
||||
#include "../../VoIPController.h"
|
||||
|
||||
+#ifndef typeof
|
||||
+#define typeof __typeof__
|
||||
+#endif
|
||||
+
|
||||
using namespace tgvoip::audio;
|
||||
|
||||
#define BUFFER_SIZE 960
|
|
@ -1,13 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp.orig 2018-11-23 01:03:16 UTC
|
||||
+++ Telegram/ThirdParty/libtgvoip/os/linux/AudioOutputALSA.cpp
|
||||
@@ -11,6 +11,10 @@
|
||||
#include "../../logging.h"
|
||||
#include "../../VoIPController.h"
|
||||
|
||||
+#ifndef typeof
|
||||
+#define typeof __typeof__
|
||||
+#endif
|
||||
+
|
||||
#define BUFFER_SIZE 960
|
||||
#define CHECK_ERROR(res, msg) if(res<0){LOGE(msg ": %s", _snd_strerror(res)); failed=true; return;}
|
||||
#define CHECK_DL_ERROR(res, msg) if(!res){LOGE(msg ": %s", dlerror()); failed=true; return;}
|
|
@ -1,23 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/threading.h.orig 2018-11-23 01:03:16 UTC
|
||||
+++ Telegram/ThirdParty/libtgvoip/threading.h
|
||||
@@ -18,6 +18,9 @@
|
||||
#ifdef __APPLE__
|
||||
#include "os/darwin/DarwinSpecific.h"
|
||||
#endif
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <pthread_np.h>
|
||||
+#endif
|
||||
|
||||
namespace tgvoip{
|
||||
class Mutex{
|
||||
@@ -92,7 +95,9 @@ namespace tgvoip{
|
||||
static void* ActualEntryPoint(void* arg){
|
||||
Thread* self=reinterpret_cast<Thread*>(arg);
|
||||
if(self->name){
|
||||
-#if !defined(__APPLE__) && !defined(__gnu_hurd__)
|
||||
+#if defined(__FreeBSD__)
|
||||
+ pthread_set_name_np(self->thread, self->name);
|
||||
+#elif !defined(__APPLE__) && !defined(__gnu_hurd__)
|
||||
pthread_setname_np(self->thread, self->name);
|
||||
#elif !defined(__gnu_hurd__)
|
||||
pthread_setname_np(self->name);
|
|
@ -1,11 +0,0 @@
|
|||
--- Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/stringutils.h.orig 2018-11-23 01:03:16 UTC
|
||||
+++ Telegram/ThirdParty/libtgvoip/webrtc_dsp/rtc_base/stringutils.h
|
||||
@@ -25,7 +25,7 @@
|
||||
#endif // WEBRTC_WIN
|
||||
|
||||
#if defined(WEBRTC_POSIX)
|
||||
-#ifdef BSD
|
||||
+#ifdef __FreeBSD__
|
||||
#include <stdlib.h>
|
||||
#else // BSD
|
||||
#include <alloca.h>
|
|
@ -1,4 +1,4 @@
|
|||
--- Telegram/lib_base/base/bytes.h.orig 2020-05-12 13:19:31 UTC
|
||||
--- Telegram/lib_base/base/bytes.h.orig 2021-10-06 07:02:39 UTC
|
||||
+++ Telegram/lib_base/base/bytes.h
|
||||
@@ -145,7 +145,7 @@ template <
|
||||
vector concatenate(Args &&...args) {
|
||||
|
@ -9,7 +9,7 @@
|
|||
return result;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ vector concatenate(SpanRange args) {
|
||||
@@ -156,7 +156,7 @@ vector concatenate(SpanRange args) {
|
||||
size += bytes::make_span(arg).size();
|
||||
}
|
||||
auto result = vector(size);
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
#pragma once
|
||||
|
||||
+#include <type_traits> // Required for glib/gatomic.h
|
||||
extern "C" {
|
||||
#include <JavaScriptCore/JavaScript.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <webkit2/webkit2.h>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
--- cmake/external/CMakeLists.txt.orig 2021-07-13 19:08:45 UTC
|
||||
+++ cmake/external/CMakeLists.txt
|
||||
@@ -37,9 +37,6 @@ if (add_hunspell_library)
|
||||
add_checked_subdirectory(hunspell)
|
||||
endif()
|
||||
add_checked_subdirectory(iconv)
|
||||
-if (LINUX)
|
||||
- add_checked_subdirectory(jemalloc)
|
||||
-endif()
|
||||
add_checked_subdirectory(jpeg)
|
||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
add_checked_subdirectory(kwayland)
|
|
@ -1,14 +0,0 @@
|
|||
--- cmake/options_linux.cmake.orig 2021-07-13 19:08:45 UTC
|
||||
+++ cmake/options_linux.cmake
|
||||
@@ -58,11 +58,6 @@ if (DESKTOP_APP_SPECIAL_TARGET)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-target_link_libraries(common_options
|
||||
-INTERFACE
|
||||
- desktop-app::external_jemalloc
|
||||
-)
|
||||
-
|
||||
if (DESKTOP_APP_USE_PACKAGED)
|
||||
find_library(ATOMIC_LIBRARY atomic)
|
||||
else()
|
Loading…
Reference in a new issue