mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
net-im/telegram-desktop: Update to 2.3.2
PR: 249094 Submitted by: Henry Hu <henry.hu.sh@gmail.com> (maintainer)
This commit is contained in:
parent
4cd1c45abd
commit
4a546599e4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=547516
@ -1,10 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= telegram-desktop
|
||||
DISTVERSION= 2.1.13
|
||||
DISTVERSION= 2.3.2
|
||||
CATEGORIES= net-im
|
||||
MASTER_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/releases/download/v${DISTVERSION}/
|
||||
DISTNAME= tdesktop-${DISTVERSION}-full
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= henry.hu.sh@gmail.com
|
||||
COMMENT= Telegram Desktop messaging app
|
||||
@ -14,23 +15,30 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
NOT_FOR_ARCHS= powerpc powerpc64 powerpcspe
|
||||
NOT_FOR_ARCHS_REASON= Only little endian is supported
|
||||
BROKEN_i386= Does not build, webrtc related.
|
||||
|
||||
BUILD_DEPENDS= alsa-lib>0:audio/alsa-lib \
|
||||
dee>0:devel/dee \
|
||||
microsoft-gsl>0:devel/microsoft-gsl \
|
||||
pulseaudio>0:audio/pulseaudio \
|
||||
range-v3>0:devel/range-v3 \
|
||||
microsoft-gsl>0:devel/microsoft-gsl \
|
||||
tl-expected>0:devel/tl-expected
|
||||
tl-expected>0:devel/tl-expected \
|
||||
v4l_compat>0:multimedia/v4l_compat \
|
||||
yasm:devel/yasm
|
||||
LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \
|
||||
libdbus-1.so:devel/dbus \
|
||||
libdbusmenu-qt5.so:devel/libdbusmenu-qt \
|
||||
libenchant-2.so:textproc/enchant2 \
|
||||
libhunspell-1.7.so:textproc/hunspell \
|
||||
libjpeg.so:graphics/jpeg-turbo \
|
||||
liblz4.so:archivers/liblz4 \
|
||||
libminizip.so:archivers/minizip \
|
||||
libopenal.so:audio/openal-soft \
|
||||
libopus.so:audio/opus \
|
||||
libdbusmenu-qt5.so:devel/libdbusmenu-qt \
|
||||
libhunspell-1.7.so:textproc/hunspell \
|
||||
libxxhash.so:devel/xxhash \
|
||||
libenchant-2.so:textproc/enchant2 \
|
||||
liblz4.so:archivers/liblz4
|
||||
libqrcodegencpp.so:graphics/qr-code-generator \
|
||||
libusrsctp.so:net/libusrsctp \
|
||||
libxkbcommon.so:x11/libxkbcommon \
|
||||
libxxhash.so:devel/xxhash
|
||||
|
||||
USES= cmake compiler:c++17-lang desktop-file-utils \
|
||||
gnome pkgconfig python:3.7,build qt:5 ssl xorg
|
||||
@ -38,12 +46,15 @@ USES= cmake compiler:c++17-lang desktop-file-utils \
|
||||
# see Bugzilla #245452 for details
|
||||
NO_CCACHE= yes
|
||||
|
||||
USE_GITHUB= nodefault
|
||||
GH_ACCOUNT= telegramdesktop
|
||||
GH_PROJECT= tdesktop
|
||||
GH_TUPLE= desktop-app:tg_owt:fc49a0e:tg_owt/tg_owt
|
||||
USE_GNOME= glib20
|
||||
USE_QT= core dbus gui imageformats network widgets buildtools_build \
|
||||
qmake_build
|
||||
qmake_build wayland
|
||||
USE_XORG= x11 xcb
|
||||
USE_GL= gl
|
||||
|
||||
CMAKE_ON= DESKTOP_APP_USE_PACKAGED DESKTOP_APP_DISABLE_CRASH_REPORTS \
|
||||
TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION
|
||||
@ -51,7 +62,8 @@ CMAKE_OFF= DESKTOP_APP_USE_PACKAGED_RLOTTIE DESKTOP_APP_USE_PACKAGED_VARIANT \
|
||||
DESKTOP_APP_USE_GLIBC_WRAPS TDESKTOP_USE_PACKAGED_TGVOIP
|
||||
CMAKE_ARGS= -DDESKTOP_APP_SPECIAL_TARGET="" -DTDESKTOP_LAUNCHER_BASENAME="telegramdesktop" \
|
||||
-DTDESKTOP_API_ID=${TELEGRAM_API_ID} -DTDESKTOP_API_HASH=${TELEGRAM_API_HASH} \
|
||||
-Ddisable_autoupdate=1
|
||||
-Ddisable_autoupdate=1 \
|
||||
-DDESKTOP_APP_WEBRTC_LOCATION=${WRKSRC}/tg_owt/src
|
||||
|
||||
# Telegram asks each custom build to have its own API ID and hash.
|
||||
TELEGRAM_API_ID= 601761
|
||||
@ -73,10 +85,23 @@ PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
|
||||
|
||||
GTK_CMAKE_BOOL_OFF= TDESKTOP_DISABLE_GTK_INTEGRATION
|
||||
|
||||
INSTALLS_ICONS= yes
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MGTK}
|
||||
USE_GNOME+= gtk30
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
pre-configure:
|
||||
@cd ${WRKSRC}/tg_owt && \
|
||||
${MKDIR} out/${CMAKE_BUILD_TYPE} && \
|
||||
cd out/${CMAKE_BUILD_TYPE} && \
|
||||
${CMAKE_BIN} ${CMAKE_ARGS} ${WRKSRC}/tg_owt
|
||||
|
||||
pre-build:
|
||||
@cd ${WRKSRC}/tg_owt/out/${CMAKE_BUILD_TYPE} && ${DO_MAKE_BUILD}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,3 +1,5 @@
|
||||
TIMESTAMP = 1593031017
|
||||
SHA256 (tdesktop-2.1.13-full.tar.gz) = d1653a386107836a0808c3d828341ad54aa962f167d8b2e17430d8aedc710357
|
||||
SIZE (tdesktop-2.1.13-full.tar.gz) = 36549505
|
||||
TIMESTAMP = 1598842893
|
||||
SHA256 (tdesktop-2.3.2-full.tar.gz) = 292631bcac4b30f778879ecd2cebf4c6f569ab5be01230c8e62b924b4211a259
|
||||
SIZE (tdesktop-2.3.2-full.tar.gz) = 36402335
|
||||
SHA256 (desktop-app-tg_owt-fc49a0e_GH0.tar.gz) = bb17463246eeacf9f7bc97b04d0ff60f5f207f69a19482094e3a1cc14b46f4e4
|
||||
SIZE (desktop-app-tg_owt-fc49a0e_GH0.tar.gz) = 18379679
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp.orig 2019-10-07 15:58:21 UTC
|
||||
--- Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp.orig 2020-08-23 13:36:52 UTC
|
||||
+++ Telegram/SourceFiles/chat_helpers/stickers_emoji_pack.cpp
|
||||
@@ -107,7 +107,7 @@ constexpr auto kClearSourceTimeout = 10 * crl::time(10
|
||||
@@ -88,7 +88,7 @@ constexpr auto kRefreshTimeout = 7200 * crl::time(1000
|
||||
},
|
||||
5,
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- Telegram/lib_base/base/platform/linux/base_info_linux.cpp.orig 2020-06-24 20:32:27.483667000 +0300
|
||||
+++ Telegram/lib_base/base/platform/linux/base_info_linux.cpp 2020-06-24 20:45:44.399296000 +0300
|
||||
--- Telegram/lib_base/base/platform/linux/base_info_linux.cpp.orig 2020-08-10 11:25:13 UTC
|
||||
+++ Telegram/lib_base/base/platform/linux/base_info_linux.cpp
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <QtCore/QVersionNumber>
|
||||
#include <QtCore/QDate>
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
namespace Platform {
|
||||
namespace {
|
||||
@@ -72,11 +71,9 @@
|
||||
@@ -72,11 +71,9 @@ QString SystemVersionPretty() {
|
||||
const auto value = result ? QString::fromLatin1(result) : QString();
|
||||
const auto list = value.split(':', QString::SkipEmptyParts);
|
||||
|
||||
@ -22,32 +22,29 @@
|
||||
}
|
||||
|
||||
QString SystemCountry() {
|
||||
@@ -92,13 +89,6 @@
|
||||
}
|
||||
|
||||
@@ -94,10 +91,6 @@ QString SystemLanguage() {
|
||||
QDate WhenSystemBecomesOutdated() {
|
||||
- if (IsLinux32Bit()) {
|
||||
- return QDate(2020, 9, 1);
|
||||
if (IsLinux32Bit()) {
|
||||
return QDate(2020, 9, 1);
|
||||
- } else if (const auto version = GetGlibCVersion(); !version.isEmpty()) {
|
||||
- if (QVersionNumber::fromString(version) < QVersionNumber(2, 23)) {
|
||||
- return QDate(2020, 9, 1); // Older than Ubuntu 16.04.
|
||||
- }
|
||||
- }
|
||||
}
|
||||
return QDate();
|
||||
}
|
||||
|
||||
@@ -120,14 +110,6 @@
|
||||
@@ -118,14 +111,6 @@ QString AutoUpdateKey() {
|
||||
} else {
|
||||
Unexpected("Platform in AutoUpdateKey.");
|
||||
}
|
||||
}
|
||||
|
||||
-}
|
||||
-
|
||||
-QString GetGlibCVersion() {
|
||||
- static const auto result = [&] {
|
||||
- const auto version = QString::fromLatin1(gnu_get_libc_version());
|
||||
- return QVersionNumber::fromString(version).isNull() ? QString() : version;
|
||||
- }();
|
||||
- return result;
|
||||
-}
|
||||
-
|
||||
bool IsWayland() {
|
||||
return QGuiApplication::platformName().startsWith("wayland", Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
bool IsWayland() {
|
||||
|
@ -0,0 +1,17 @@
|
||||
--- cmake/external/webrtc/CMakeLists.txt.orig 2020-08-20 13:59:10 UTC
|
||||
+++ cmake/external/webrtc/CMakeLists.txt
|
||||
@@ -76,7 +76,7 @@ if (APPLE)
|
||||
)
|
||||
endif()
|
||||
foreach (lib ${webrtc_libs})
|
||||
- list(APPEND webrtc_libs_list "${webrtc_build_loc}/${lib}${webrtc_lib_suffix}")
|
||||
+ list(APPEND webrtc_libs_list "${DESKTOP_APP_WEBRTC_LOCATION}/../out/$<CONFIG>/${lib}${webrtc_lib_suffix}")
|
||||
endforeach()
|
||||
|
||||
if (WIN32)
|
||||
@@ -99,4 +99,5 @@ target_link_libraries(external_webrtc
|
||||
INTERFACE
|
||||
${webrtc_libs_list}
|
||||
desktop-app::external_openssl
|
||||
+ jpeg
|
||||
)
|
26
net-im/telegram-desktop/files/patch-tg__owt_CMakeLists.txt
Normal file
26
net-im/telegram-desktop/files/patch-tg__owt_CMakeLists.txt
Normal file
@ -0,0 +1,26 @@
|
||||
--- tg_owt/CMakeLists.txt.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/CMakeLists.txt
|
||||
@@ -38,7 +38,6 @@ include(cmake/libopenh264.cmake)
|
||||
include(cmake/libpffft.cmake)
|
||||
include(cmake/librnnoise.cmake)
|
||||
include(cmake/libsrtp.cmake)
|
||||
-include(cmake/libusrsctp.cmake)
|
||||
include(cmake/libvpx.cmake)
|
||||
include(cmake/libwebrtcbuild.cmake)
|
||||
include(cmake/libyuv.cmake)
|
||||
@@ -61,7 +60,6 @@ PRIVATE
|
||||
tg_owt::libpffft
|
||||
tg_owt::librnnoise
|
||||
tg_owt::libsrtp
|
||||
- tg_owt::libusrsctp
|
||||
tg_owt::libvpx
|
||||
tg_owt::libvpx_mmx
|
||||
tg_owt::libvpx_sse2
|
||||
@@ -1757,7 +1755,6 @@ TARGETS
|
||||
libpffft
|
||||
librnnoise
|
||||
libsrtp
|
||||
- libusrsctp
|
||||
libvpx
|
||||
libvpx_mmx
|
||||
libvpx_sse2
|
@ -0,0 +1,11 @@
|
||||
--- tg_owt/cmake/init_target.cmake.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/cmake/init_target.cmake
|
||||
@@ -10,7 +10,7 @@ function(init_target target_name) # init_target(my_tar
|
||||
elseif (APPLE)
|
||||
target_compile_features(${target_name} PUBLIC cxx_std_14)
|
||||
else()
|
||||
- target_compile_features(${target_name} PUBLIC cxx_std_20)
|
||||
+ target_compile_features(${target_name} PUBLIC cxx_std_17)
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set_target_properties(${target_name} PROPERTIES
|
@ -0,0 +1,26 @@
|
||||
--- tg_owt/cmake/libevent.cmake.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/cmake/libevent.cmake
|
||||
@@ -17,14 +17,13 @@ if (APPLE)
|
||||
else()
|
||||
target_include_directories(libevent
|
||||
PRIVATE
|
||||
- ${libevent_loc}/linux
|
||||
+ ${libevent_loc}/freebsd
|
||||
)
|
||||
endif()
|
||||
|
||||
nice_target_sources(libevent ${libevent_loc}
|
||||
PRIVATE
|
||||
buffer.c
|
||||
- epoll.c
|
||||
evbuffer.c
|
||||
evdns.c
|
||||
event.c
|
||||
@@ -32,6 +31,7 @@ PRIVATE
|
||||
evrpc.c
|
||||
evutil.c
|
||||
http.c
|
||||
+ kqueue.c
|
||||
log.c
|
||||
poll.c
|
||||
select.c
|
@ -0,0 +1,11 @@
|
||||
--- tg_owt/src/media/sctp/sctp_transport.cc.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/src/media/sctp/sctp_transport.cc
|
||||
@@ -43,7 +43,7 @@ enum PreservedErrno {
|
||||
#include "rtc_base/thread_annotations.h"
|
||||
#include "rtc_base/thread_checker.h"
|
||||
#include "rtc_base/trace_event.h"
|
||||
-#include "usrsctplib/usrsctp.h"
|
||||
+#include "usrsctp.h"
|
||||
|
||||
namespace {
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- tg_owt/src/rtc_base/byte_order.h.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/src/rtc_base/byte_order.h
|
||||
@@ -89,7 +89,7 @@
|
||||
#endif // defined(WEBRTC_ARCH_LITTLE_ENDIAN)
|
||||
|
||||
#elif defined(WEBRTC_POSIX)
|
||||
-#include <endian.h>
|
||||
+#include <sys/endian.h>
|
||||
#else
|
||||
#error "Missing byte order functions for this arch."
|
||||
#endif // defined(WEBRTC_MAC)
|
@ -0,0 +1,10 @@
|
||||
--- tg_owt/src/rtc_base/ip_address.cc.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/src/rtc_base/ip_address.cc
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifndef __native_client__
|
||||
+#include <sys/types.h>
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
@ -0,0 +1,29 @@
|
||||
--- tg_owt/src/rtc_base/physical_socket_server.cc.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/src/rtc_base/physical_socket_server.cc
|
||||
@@ -51,6 +51,8 @@
|
||||
#include "rtc_base/null_socket_server.h"
|
||||
#include "rtc_base/time_utils.h"
|
||||
|
||||
+#undef WEBRTC_LINUX
|
||||
+
|
||||
#if defined(WEBRTC_LINUX)
|
||||
#include <linux/sockios.h>
|
||||
#endif
|
||||
@@ -70,7 +72,7 @@ typedef void* SockOptArg;
|
||||
|
||||
#endif // WEBRTC_POSIX
|
||||
|
||||
-#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__)
|
||||
+#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) && !defined(__FreeBSD__)
|
||||
|
||||
int64_t GetSocketRecvTimestamp(int socket) {
|
||||
struct timeval tv_ioctl;
|
||||
@@ -551,7 +553,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* s
|
||||
*slevel = IPPROTO_IP;
|
||||
*sopt = IP_DONTFRAGMENT;
|
||||
break;
|
||||
-#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__)
|
||||
+#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__) || defined(__FreeBSD__)
|
||||
RTC_LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported.";
|
||||
return -1;
|
||||
#elif defined(WEBRTC_POSIX)
|
@ -0,0 +1,11 @@
|
||||
--- tg_owt/src/rtc_base/physical_socket_server.h.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/src/rtc_base/physical_socket_server.h
|
||||
@@ -12,8 +12,6 @@
|
||||
#define RTC_BASE_PHYSICAL_SOCKET_SERVER_H_
|
||||
|
||||
#if defined(WEBRTC_POSIX) && defined(WEBRTC_LINUX)
|
||||
-#include <sys/epoll.h>
|
||||
-#define WEBRTC_USE_EPOLL 1
|
||||
#endif
|
||||
|
||||
#include <memory>
|
@ -0,0 +1,43 @@
|
||||
--- tg_owt/src/rtc_base/platform_thread_types.cc.orig 2020-08-30 09:41:57 UTC
|
||||
+++ tg_owt/src/rtc_base/platform_thread_types.cc
|
||||
@@ -11,10 +11,14 @@
|
||||
#include "rtc_base/platform_thread_types.h"
|
||||
|
||||
#if defined(WEBRTC_LINUX)
|
||||
-#include <sys/prctl.h>
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/thr.h>
|
||||
+#include <pthread_np.h>
|
||||
+#endif
|
||||
+
|
||||
namespace rtc {
|
||||
|
||||
PlatformThreadId CurrentThreadId() {
|
||||
@@ -28,7 +32,13 @@ PlatformThreadId CurrentThreadId() {
|
||||
#elif defined(WEBRTC_FUCHSIA)
|
||||
return zx_thread_self();
|
||||
#elif defined(WEBRTC_LINUX)
|
||||
+#if defined(__FreeBSD__)
|
||||
+ long id;
|
||||
+ thr_self(&id);
|
||||
+ return id;
|
||||
+#else
|
||||
return syscall(__NR_gettid);
|
||||
+#endif
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
return static_cast<PlatformThreadId>(pthread_self());
|
||||
#else
|
||||
@@ -78,9 +88,7 @@ void SetCurrentThreadName(const char* name) {
|
||||
}
|
||||
#pragma warning(pop)
|
||||
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
|
||||
- prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name)); // NOLINT
|
||||
-#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
|
||||
- pthread_setname_np(name);
|
||||
+ pthread_set_name_np(pthread_self(), name);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user