diff options
author | solopasha | 2022-03-27 00:35:37 +0300 |
---|---|---|
committer | solopasha | 2022-04-04 01:32:00 +0300 |
commit | aa96e9edc1c7708bc45d4b56b8ddbb005f0e39ce (patch) | |
tree | fae3b12bdfd631d6aa5898b0764fbfbac2baef27 | |
parent | d4a9e2792725f74245beb3a1c9901b34d5438114 (diff) | |
download | aur-aa96e9edc1c7708bc45d4b56b8ddbb005f0e39ce.tar.gz |
Update to 1.0.28
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | block-sponsored_messages.patch | 13 | ||||
-rw-r--r-- | telegram-desktop-ffmpeg5.patch | 72 |
5 files changed, 132 insertions, 30 deletions
@@ -1,7 +1,8 @@ pkgbase = 64gram-desktop pkgdesc = Unofficial desktop version of Telegram messaging app - pkgver = 3.0.1.1 + pkgver = 1.0.28 pkgrel = 1 + epoch = 1 url = https://github.com/TDesktop-x64/tdesktop arch = x86_64 license = GPL3 @@ -12,36 +13,41 @@ pkgbase = 64gram-desktop makedepends = range-v3 makedepends = tl-expected makedepends = microsoft-gsl + makedepends = meson makedepends = extra-cmake-modules - makedepends = gtk3 - makedepends = webkit2gtk + makedepends = wayland-protocols + makedepends = plasma-wayland-protocols + makedepends = libtg_owt depends = hunspell depends = ffmpeg depends = hicolor-icon-theme depends = lz4 depends = minizip depends = openal - depends = qt5-imageformats - depends = qt5-svg + depends = ttf-opensans + depends = qt6-imageformats + depends = qt6-svg + depends = qt6-wayland + depends = qt6-5compat depends = xxhash - depends = libdbusmenu-qt5 - depends = kwayland depends = glibmm depends = rnnoise depends = pipewire depends = libxtst depends = libxrandr depends = jemalloc - depends = libtg_owt - optdepends = gtk3: GTK environment integration + depends = abseil-cpp + depends = libdispatch optdepends = webkit2gtk: embedded browser features - optdepends = ttf-opensans: default Open Sans font family optdepends = xdg-desktop-portal: desktop integration - provides = 64gram-desktop conflicts = telegram-desktop conflicts = tdesktop-x64 replaces = tdesktop-x64 - source = https://github.com/TDesktop-x64/tdesktop/releases/download/v3.0.1.1/64Gram-3.0.1.1-full.tar.gz - sha512sums = a373e543b0b2dcb932d896f6dffca99dbf397d4065b38a2921816fd3f1f55a319b2c36198dfae71a661f2c2cccee93c7bcc1a53d6a955664401bb6ecad19ca98 + source = https://github.com/TDesktop-x64/tdesktop/releases/download/v1.0.28/64Gram-1.0.28-full.tar.gz + source = block-sponsored_messages.patch + source = telegram-desktop-ffmpeg5.patch + sha512sums = fcbc27533cbd7536d430c764f12eed0a344d1f8195eb566e39d30393b088f0920b1686b4896b366ac32c99b9ce4fc71a0d1e421e2121f0e41a1a10ab9a44a1a0 + sha512sums = c662524ca4f4a8df021ee94696d84896ed9a271df321933942806dda4544ea25f51a650ec8b4fc72f9a2219ea54cbfaf37b9604124f7263c86f74f1d647587ae + sha512sums = d1cc737c8612eea780244dbb1a4da1db6cbbaec0d773f3350bae1a262944e1bd10ebcb42e0addaeee34abff229b9e5d70de6ffe1dfe74512d6c93bff7f6e911d pkgname = 64gram-desktop diff --git a/.gitignore b/.gitignore index 547c794ae1cc..63ffb3c1ec5a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ 64gram-desktop-*.pkg.tar.zst src/ pkg/ +*.log @@ -1,39 +1,49 @@ -# Maintainer: KspLite <ksplite@outlook.com> +# Maintainer: solopasha <daron439 at gmail dot com> +# Contributor: KspLite <ksplite@outlook.com> pkgname=64gram-desktop _pkgname=64Gram -pkgver=3.0.1.1 +pkgver=1.0.28 pkgrel=1 +epoch=1 pkgdesc='Unofficial desktop version of Telegram messaging app' arch=('x86_64') url="https://github.com/TDesktop-x64/tdesktop" license=('GPL3') -depends=('hunspell' 'ffmpeg' 'hicolor-icon-theme' 'lz4' 'minizip' 'openal' - 'qt5-imageformats' 'qt5-svg' 'xxhash' 'libdbusmenu-qt5' 'kwayland' 'glibmm' - 'rnnoise' 'pipewire' 'libxtst' 'libxrandr' 'jemalloc' 'libtg_owt') -makedepends=('cmake' 'git' 'ninja' 'python' 'range-v3' 'tl-expected' 'microsoft-gsl' - 'extra-cmake-modules' 'gtk3' 'webkit2gtk') -optdepends=('gtk3: GTK environment integration' - 'webkit2gtk: embedded browser features' - 'ttf-opensans: default Open Sans font family' +depends=('hunspell' 'ffmpeg' 'hicolor-icon-theme' 'lz4' 'minizip' 'openal' 'ttf-opensans' + 'qt6-imageformats' 'qt6-svg' 'qt6-wayland' 'qt6-5compat' 'xxhash' 'glibmm' + 'rnnoise' 'pipewire' 'libxtst' 'libxrandr' 'jemalloc' 'abseil-cpp' 'libdispatch') +makedepends=('cmake' 'git' 'ninja' 'python' 'range-v3' 'tl-expected' 'microsoft-gsl' 'meson' + 'extra-cmake-modules' 'wayland-protocols' 'plasma-wayland-protocols' 'libtg_owt') +optdepends=('webkit2gtk: embedded browser features' 'xdg-desktop-portal: desktop integration') -provides=("64gram-desktop") +source=("https://github.com/TDesktop-x64/tdesktop/releases/download/v${pkgver}/${_pkgname}-${pkgver}-full.tar.gz" + "block-sponsored_messages.patch" + "telegram-desktop-ffmpeg5.patch") +sha512sums=('fcbc27533cbd7536d430c764f12eed0a344d1f8195eb566e39d30393b088f0920b1686b4896b366ac32c99b9ce4fc71a0d1e421e2121f0e41a1a10ab9a44a1a0' + 'c662524ca4f4a8df021ee94696d84896ed9a271df321933942806dda4544ea25f51a650ec8b4fc72f9a2219ea54cbfaf37b9604124f7263c86f74f1d647587ae' + 'd1cc737c8612eea780244dbb1a4da1db6cbbaec0d773f3350bae1a262944e1bd10ebcb42e0addaeee34abff229b9e5d70de6ffe1dfe74512d6c93bff7f6e911d') conflicts=("telegram-desktop" "tdesktop-x64") replaces=("tdesktop-x64") -source=("https://github.com/TDesktop-x64/tdesktop/releases/download/v${pkgver}/${_pkgname}-${pkgver}-full.tar.gz") -sha512sums=('a373e543b0b2dcb932d896f6dffca99dbf397d4065b38a2921816fd3f1f55a319b2c36198dfae71a661f2c2cccee93c7bcc1a53d6a955664401bb6ecad19ca98') +prepare() { + cd $_pkgname-$pkgver-full + sed -i '/option(DESKTOP_APP_DISABLE_AUTOUPDATE/s/^# //' cmake/variables.cmake + patch -Np1 --binary -i ../telegram-desktop-ffmpeg5.patch + patch -Np1 --binary -i ../block-sponsored_messages.patch +} build() { cd $_pkgname-$pkgver-full - + # Fix https://bugs.archlinux.org/task/73220 + export CXXFLAGS+=" -Wp,-U_GLIBCXX_ASSERTIONS" # Official API ID&Hash by default cmake . \ -B build \ -G Ninja \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_BUILD_TYPE=Release \ - -DTDESKTOP_API_ID=611335 \ - -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c \ - -DDESKTOP_APP_DISABLE_AUTOUPDATE=ON + -DDESKTOP_APP_DISABLE_AUTOUPDATE=ON \ + -DTDESKTOP_API_TEST=ON + sed -i '/LINK_LIBRARIES/s/$/ \/usr\/lib\/liblzma.so/' build/build.ninja ninja -C build } diff --git a/block-sponsored_messages.patch b/block-sponsored_messages.patch new file mode 100644 index 000000000000..8452a9a0cccd --- /dev/null +++ b/block-sponsored_messages.patch @@ -0,0 +1,13 @@ +diff --git a/Telegram/SourceFiles/data/data_sponsored_messages.cpp b/Telegram/SourceFiles/data/data_sponsored_messages.cpp
+index c90dd3c53..f8e0a096d 100644
+--- a/Telegram/SourceFiles/data/data_sponsored_messages.cpp
++++ b/Telegram/SourceFiles/data/data_sponsored_messages.cpp
+@@ -82,7 +82,7 @@ bool SponsoredMessages::append(not_null<History*> history) {
+ }
+
+ bool SponsoredMessages::canHaveFor(not_null<History*> history) const {
+- return history->peer->isChannel();
++ return false;
+ }
+
+ void SponsoredMessages::request(not_null<History*> history) {
diff --git a/telegram-desktop-ffmpeg5.patch b/telegram-desktop-ffmpeg5.patch new file mode 100644 index 000000000000..6b63742c4480 --- /dev/null +++ b/telegram-desktop-ffmpeg5.patch @@ -0,0 +1,72 @@ +From da288b3cf4f91937da5bb8de0570dfa64871f4d9 Mon Sep 17 00:00:00 2001
+From: Nicholas Guriev <nicholas@guriev.su>
+Date: Mon, 7 Mar 2022 11:52:01 +0300
+Subject: [PATCH] Fix build against FFmpeg v5.0
+
+It has been released on January 17th. This patch keeps source compatibility
+with older versions.
+---
+ Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp | 5 ++++-
+ Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp | 2 +-
+ Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp | 5 ++++-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp
+index 27a71cb..5639036 100644
+--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp
++++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartInternal.cpp
+@@ -104,6 +104,9 @@ _avIoContext(std::move(fileData)) {
+
+ _frame = av_frame_alloc();
+
++#if LIBAVFORMAT_VERSION_MAJOR >= 59
++ const
++#endif
+ AVInputFormat *inputFormat = av_find_input_format(container.c_str());
+ if (!inputFormat) {
+ _didReadToEnd = true;
+@@ -144,7 +147,7 @@ _avIoContext(std::move(fileData)) {
+
+ _streamId = i;
+
+- _durationInMilliseconds = (int)((inStream->duration + inStream->first_dts) * 1000 / 48000);
++ _durationInMilliseconds = (int)(inStream->duration * av_q2d(inStream->time_base) * 1000);
+
+ if (inStream->metadata) {
+ AVDictionaryEntry *entry = av_dict_get(inStream->metadata, "TG_META", nullptr, 0);
+diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp
+index e79d430..63ef475 100644
+--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp
++++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/AudioStreamingPartPersistentDecoder.cpp
+@@ -32,7 +32,7 @@ class AudioStreamingPartPersistentDecoderState {
+ AudioStreamingPartPersistentDecoderState(AVCodecParameters const *codecParameters, AVRational timeBase) :
+ _codecParameters(codecParameters),
+ _timeBase(timeBase) {
+- AVCodec *codec = avcodec_find_decoder(codecParameters->codec_id);
++ const AVCodec *codec = avcodec_find_decoder(codecParameters->codec_id);
+ if (codec) {
+ _codecContext = avcodec_alloc_context3(codec);
+ int ret = avcodec_parameters_to_context(_codecContext, codecParameters);
+diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp
+index a67514a..10457eb 100644
+--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp
++++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/VideoStreamingPart.cpp
+@@ -280,6 +280,9 @@ class VideoStreamingPartInternal {
+
+ int ret = 0;
+
++#if LIBAVFORMAT_VERSION_MAJOR >= 59
++ const
++#endif
+ AVInputFormat *inputFormat = av_find_input_format(container.c_str());
+ if (!inputFormat) {
+ _didReadToEnd = true;
+@@ -323,7 +326,7 @@ class VideoStreamingPartInternal {
+ }
+
+ if (videoCodecParameters && videoStream) {
+- AVCodec *codec = avcodec_find_decoder(videoCodecParameters->codec_id);
++ const AVCodec *codec = avcodec_find_decoder(videoCodecParameters->codec_id);
+ if (codec) {
+ _codecContext = avcodec_alloc_context3(codec);
+ ret = avcodec_parameters_to_context(_codecContext, videoCodecParameters);
|