summarylogtreecommitdiffstats
diff options
context:
space:
mode:
author3JlOy_PYCCKUI2023-05-20 02:15:27 +0300
committer3JlOy_PYCCKUI2023-05-20 02:15:27 +0300
commit681ed88935f02cb7e49c27c2018a7be91d653182 (patch)
tree4ea3c0370cd8a097cd9f0a07d955074323bac0b6
parent3072d28ce956dfaa408cbae5206024808a2baa8f (diff)
downloadaur-681ed88935f02cb7e49c27c2018a7be91d653182.tar.gz
fix
-rw-r--r--.SRCINFO104
-rw-r--r--0002-Block-sponsored_messages.patch (renamed from block-sponsored_messages.patch)0
-rw-r--r--0003-Allow-downloading-and-copying-from-restricted-channels.patch52
-rw-r--r--PKGBUILD197
-rw-r--r--fix_ffmpeg5_build_24044.patch85
-rw-r--r--fix_tgcalls_ffmpeg5.patch44
-rw-r--r--include.patch13
-rw-r--r--kf594.patch57
-rw-r--r--tg_owt-fix.patch49
9 files changed, 276 insertions, 325 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9e92dd989497..25488f03dbc7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = kotatogram-dev-git
pkgdesc = Kotatogram – experimental Telegram Desktop fork - Dev branch
- pkgver = k1.4.9.r0.ge5dcf48d4
- pkgrel = 2
+ pkgver = k1.4.9.r2.g52b300cb3
+ pkgrel = 1
url = https://kotatogram.github.io
arch = x86_64
license = GPL3
@@ -18,7 +18,6 @@ pkgbase = kotatogram-dev-git
makedepends = webkit2gtk
makedepends = unzip
makedepends = yasm
- makedepends = libtg_owt
makedepends = meson
depends = hunspell
depends = ffmpeg4.4
@@ -27,10 +26,9 @@ pkgbase = kotatogram-dev-git
depends = minizip
depends = openal
depends = ttf-opensans
- depends = qt6-imageformats
- depends = qt6-svg
- depends = qt6-wayland
- depends = qt6-5compat
+ depends = qt5-imageformats
+ depends = qt5-svg
+ depends = qt5-wayland
depends = xxhash
depends = kwayland
depends = glibmm
@@ -42,7 +40,7 @@ pkgbase = kotatogram-dev-git
depends = abseil-cpp
depends = libjpeg-turbo
depends = opus
- depends = openssl
+ depends = openssl-1.1
depends = libx11
depends = libvpx
depends = libxcomposite
@@ -66,74 +64,32 @@ pkgbase = kotatogram-dev-git
conflicts = kotatogram-desktop-dynamic-bin
conflicts = kotatogram-desktop
source = kotatogram-desktop::git+https://github.com/kotatogram/kotatogram-desktop.git#branch=dev
- source = kotatogram-desktop-libtgvoip::git+https://github.com/telegramdesktop/libtgvoip.git
- source = kotatogram-desktop-GSL::git+https://github.com/Microsoft/GSL.git
- source = kotatogram-desktop-xxHash::git+https://github.com/Cyan4973/xxHash.git
- source = kotatogram-desktop-rlottie::git+https://github.com/desktop-app/rlottie.git
- source = kotatogram-desktop-lz4::git+https://github.com/lz4/lz4.git
- source = kotatogram-desktop-lib_crl::git+https://github.com/desktop-app/lib_crl.git
- source = kotatogram-desktop-lib_rpl::git+https://github.com/desktop-app/lib_rpl.git
- source = kotatogram-desktop-lib_base::git+https://github.com/desktop-app/lib_base.git
- source = kotatogram-desktop-codegen::git+https://github.com/desktop-app/codegen.git
- source = kotatogram-desktop-lib_ui::git+https://github.com/kotatogram/lib_ui.git
- source = kotatogram-desktop-lib_lottie::git+https://github.com/desktop-app/lib_lottie.git
- source = kotatogram-desktop-lib_tl::git+https://github.com/desktop-app/lib_tl.git
- source = kotatogram-desktop-lib_spellcheck::git+https://github.com/desktop-app/lib_spellcheck.git
- source = kotatogram-desktop-lib_storage::git+https://github.com/desktop-app/lib_storage.git
- source = kotatogram-desktop-cmake_helpers::git+https://github.com/kotatogram/cmake_helpers.git
- source = kotatogram-desktop-expected::git+https://github.com/TartanLlama/expected.git
- source = kotatogram-desktop-QR-Code-generator::git+https://github.com/nayuki/QR-Code-generator.git
- source = kotatogram-desktop-lib_qr::git+https://github.com/desktop-app/lib_qr.git
- source = kotatogram-desktop-libdbusmenu-qt::git+https://github.com/desktop-app/libdbusmenu-qt.git
- source = kotatogram-desktop-hunspell::git+https://github.com/hunspell/hunspell.git
- source = kotatogram-desktop-range-v3::git+https://github.com/ericniebler/range-v3.git
- source = kotatogram-desktop-fcitx-qt5::git+https://github.com/fcitx/fcitx-qt5.git
- source = kotatogram-desktop-nimf::git+https://github.com/hamonikr/nimf.git
- source = kotatogram-desktop-hime::git+https://github.com/hime-ime/hime.git
- source = kotatogram-desktop-fcitx5-qt::git+https://github.com/fcitx/fcitx5-qt.git
- source = kotatogram-desktop-lib_webrtc::git+https://github.com/desktop-app/lib_webrtc.git
- source = kotatogram-desktop-tgcalls::git+https://github.com/TelegramMessenger/tgcalls.git
- source = kotatogram-desktop-lib_webview::git+https://github.com/desktop-app/lib_webview.git
- source = kotatogram-desktop-lib_waylandshells::git+https://github.com/desktop-app/lib_waylandshells.git
- source = kotatogram-desktop-jemalloc::git+https://github.com/jemalloc/jemalloc.git
- source = kotatogram-desktop-kwayland::git+https://github.com/KDE/kwayland.git
- source = kotatogram-desktop-dispatch::git+https://github.com/apple/swift-corelibs-libdispatch.git
+ source = kotatogram-desktop-tg_owt::git+https://github.com/desktop-app/tg_owt.git#commit=63a934db1ed212ebf8aaaa20f0010dd7b0d7b396
+ source = include.patch
+ source = kf594.patch
+ source = https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/326.patch
+ source = https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/333.patch
+ source = https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/334.patch
+ source = https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/335.patch
+ source = https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/337.patch
+ source = https://patch-diff.githubusercontent.com/raw/desktop-app/tg_owt/pull/101.patch
+ source = tg_owt-fix.patch
source = 0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch
- source = block-sponsored_messages.patch
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
- b2sums = SKIP
+ source = 0002-Block-sponsored_messages.patch
+ source = 0003-Allow-downloading-and-copying-from-restricted-channels.patch
+ b2sums = SKIP
+ b2sums = SKIP
+ b2sums = a3448b085b2046a9cb19848f8e5c96c609ba00f41209e23cae82c09e23e22303fbc313f718ce635541d66d42b7682215b3dfa35a969575ecaba65b68354b2c2d
+ b2sums = c4e75540ed8363689265d57dfe3410ceeeed4a1f06d3b8efd4fd029c0c2792b7ecc992ea75bfeba0599133ff85814f4ba25ce7dab2a18264344de3fadb47e626
+ b2sums = 7564058d932166d6e267ad87d8da1e1bc9e33c42de057feae44f74da9cbdc0947f7233c724802af3e1d10fe699cdf1e7630a634fc7c47eb06d55f0237fd36972
+ b2sums = 5fcc611dad411bc53a800a9f6e6f013bcf72ada64c5a70453f624941d983f02e80afb0cbcd646e4aaf51688ef3304f601d2cf1ab41de81a171250ca0d11cad5c
+ b2sums = 228acce28b60cd60c54e954a281893bb9cbdbaccec9743907c237d0577963963f79efe44df7de932d69061603cc0a1626d4a8e04f78e04d167b1e3bf1c7c020b
+ b2sums = ab537548d871939e0d905849032d435f0732a1bd586dde212c8f7079f1652dafa07a0cde356cee78e47f5fb9a687185a9150fe3b70d08562fd781f20e6f64708
+ b2sums = 802199bb3b6ec54437d8505695112743cbdaef1b13e25629d3832e68601147b48668738e3c0832296e74ee3bf1820914a46264aeda54411d4733fbb2e86260c9
+ b2sums = 0d9d0927e401da06e5b77b6606c32d79966e946bc5dedb2086a5fc3fb5472a1c9039b8470031416d2bad81b3138ead5e29636b28e283774978e66b80cec15c2f
+ b2sums = 9874a75e04500c2a9b8f67d75e9c81e970ab5dd8f62657fe82046a5be22f4dde371e3e8b50ab207d2a6a3017e3a209b5078f7ea16b94a2128a5a96db42f9d1c4
b2sums = 63c912c53b7c259d97162f96acdb67a88b625c99ac2144869abc88a08d96e940bfdefcf9478c3c20a95f03c19ac16428e3fa6f6a2fa16a879de29b2856b4b617
b2sums = 96a703e3c7e4a2e2229c386daa24af0ca0228d130a35a6ba25e5da4885297d5d0b33fe37f26f71955cac01e3250dc4f811ebb6ff0fe58f3f7e5d5380a970347f
+ b2sums = a2190defa8f08a7c8c42062debf7339ba1f6bf3171977cb23a0ca8a6264c6e4da8ac52966d9191bd395e6463531c431662ab009f7d7c8df82dd9219d07b9e5b6
pkgname = kotatogram-dev-git
diff --git a/block-sponsored_messages.patch b/0002-Block-sponsored_messages.patch
index 4ccdd789f4e8..4ccdd789f4e8 100644
--- a/block-sponsored_messages.patch
+++ b/0002-Block-sponsored_messages.patch
diff --git a/0003-Allow-downloading-and-copying-from-restricted-channels.patch b/0003-Allow-downloading-and-copying-from-restricted-channels.patch
new file mode 100644
index 000000000000..cf96c089c286
--- /dev/null
+++ b/0003-Allow-downloading-and-copying-from-restricted-channels.patch
@@ -0,0 +1,52 @@
+diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp
+index eedcd4cb6..efe87ce59 100644
+--- a/Telegram/SourceFiles/history/history_inner_widget.cpp
++++ b/Telegram/SourceFiles/history/history_inner_widget.cpp
+@@ -2314,6 +2314,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
+ }
+
+ bool HistoryInner::hasCopyRestriction(HistoryItem *item) const {
++ return false;
+ return !_peer->allowsForwarding() || (item && item->forbidsForward());
+ }
+
+@@ -2330,6 +2331,7 @@ bool HistoryInner::showCopyRestriction(HistoryItem *item) {
+ }
+
+ bool HistoryInner::hasCopyRestrictionForSelected() const {
++ return false;
+ if (hasCopyRestriction()) {
+ return true;
+ }
+diff --git a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp
+index 87b8611f7..b0cfc7670 100644
+--- a/Telegram/SourceFiles/history/view/history_view_list_widget.cpp
++++ b/Telegram/SourceFiles/history/view/history_view_list_widget.cpp
+@@ -1218,6 +1218,7 @@ bool ListWidget::isEmpty() const {
+ }
+
+ bool ListWidget::hasCopyRestriction(HistoryItem *item) const {
++ return false;
+ return _delegate->listCopyRestrictionType(item)
+ != CopyRestrictionType::None;
+ }
+@@ -1236,6 +1237,7 @@ bool ListWidget::showCopyRestriction(HistoryItem *item) {
+ }
+
+ bool ListWidget::hasCopyRestrictionForSelected() const {
++ return false;
+ if (hasCopyRestriction()) {
+ return true;
+ }
+diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
+index 6b77cfefe..75ceb075d 100644
+--- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
++++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
+@@ -560,6 +560,7 @@ QSize OverlayWidget::flipSizeByRotation(QSize size) const {
+ }
+
+ bool OverlayWidget::hasCopyRestriction() const {
++ return false;
+ return (_history && !_history->peer->allowsForwarding())
+ || (_message && _message->forbidsForward());
+ }
diff --git a/PKGBUILD b/PKGBUILD
index d455a6397ed8..e44db8f35d96 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,96 +6,60 @@
pkgname=kotatogram-dev-git
_pkgname=kotatogram-desktop
-pkgver=k1.4.9.r0.ge5dcf48d4
-pkgrel=2
+pkgver=k1.4.9.r2.g52b300cb3
+pkgrel=1
pkgdesc='Kotatogram – experimental Telegram Desktop fork - Dev branch'
arch=('x86_64')
url="https://kotatogram.github.io"
license=('GPL3')
provides=(kotatogram-desktop kotatogram-desktop-git)
depends=('hunspell' 'ffmpeg4.4' 'hicolor-icon-theme' 'lz4' 'minizip' 'openal' 'ttf-opensans'
- 'qt6-imageformats' 'qt6-svg' 'qt6-wayland' 'qt6-5compat' 'xxhash' 'kwayland' 'glibmm'
- 'rnnoise' 'pipewire' 'libxtst' 'jemalloc' 'libxrandr' 'abseil-cpp' 'libjpeg-turbo' 'opus' 'openssl' 'libx11' 'libvpx' 'libxcomposite'
- 'libxdamage' 'libxext' 'libxfixes' 'zlib' 'wayland' 'glibc' 'libsigc++' 'glib2' 'xcb-util-keysyms' 'libxcb' 'gcc-libs' 'libdispatch')
+ # 'qt6-imageformats' 'qt6-svg' 'qt6-wayland' 'qt6-5compat'
+ 'qt5-imageformats' 'qt5-svg' 'qt5-wayland'
+ 'xxhash' 'kwayland' 'glibmm'
+ 'rnnoise' 'pipewire' 'libxtst' 'jemalloc' 'libxrandr' 'abseil-cpp' 'libjpeg-turbo' 'opus' 'openssl-1.1' 'libx11' 'libvpx' 'libxcomposite'
+ 'libxdamage' 'libxext' 'libxfixes' 'zlib' 'wayland' 'glibc' 'libsigc++' 'glib2' 'xcb-util-keysyms' 'libxcb' 'gcc-libs' 'libdispatch'
+ )
makedepends=('cmake' 'git' 'ninja' 'python' 'range-v3' 'tl-expected' 'microsoft-gsl'
'extra-cmake-modules' 'wayland-protocols' 'plasma-wayland-protocols' 'webkit2gtk' 'unzip'
- 'yasm' 'libtg_owt' 'meson')
+ 'yasm' 'meson')
optdepends=('webkit2gtk: embedded browser features'
'xdg-desktop-portal: desktop integration')
conflicts=('kotatogram-desktop-bin' 'kotatogram-desktop-dynamic-bin' 'kotatogram-desktop')
+_tg_owt_commit=63a934db1ed212ebf8aaaa20f0010dd7b0d7b396
source=("${_pkgname}::git+https://github.com/kotatogram/${_pkgname}.git#branch=dev"
- "${_pkgname}-libtgvoip::git+https://github.com/telegramdesktop/libtgvoip.git"
- "${_pkgname}-GSL::git+https://github.com/Microsoft/GSL.git"
- "${_pkgname}-xxHash::git+https://github.com/Cyan4973/xxHash.git"
- "${_pkgname}-rlottie::git+https://github.com/desktop-app/rlottie.git"
- "${_pkgname}-lz4::git+https://github.com/lz4/lz4.git"
- "${_pkgname}-lib_crl::git+https://github.com/desktop-app/lib_crl.git"
- "${_pkgname}-lib_rpl::git+https://github.com/desktop-app/lib_rpl.git"
- "${_pkgname}-lib_base::git+https://github.com/desktop-app/lib_base.git"
- "${_pkgname}-codegen::git+https://github.com/desktop-app/codegen.git"
- "${_pkgname}-lib_ui::git+https://github.com/kotatogram/lib_ui.git"
- "${_pkgname}-lib_lottie::git+https://github.com/desktop-app/lib_lottie.git"
- "${_pkgname}-lib_tl::git+https://github.com/desktop-app/lib_tl.git"
- "${_pkgname}-lib_spellcheck::git+https://github.com/desktop-app/lib_spellcheck.git"
- "${_pkgname}-lib_storage::git+https://github.com/desktop-app/lib_storage.git"
- "${_pkgname}-cmake_helpers::git+https://github.com/kotatogram/cmake_helpers.git"
- "${_pkgname}-expected::git+https://github.com/TartanLlama/expected.git"
- "${_pkgname}-QR-Code-generator::git+https://github.com/nayuki/QR-Code-generator.git"
- "${_pkgname}-lib_qr::git+https://github.com/desktop-app/lib_qr.git"
- "${_pkgname}-libdbusmenu-qt::git+https://github.com/desktop-app/libdbusmenu-qt.git"
- "${_pkgname}-hunspell::git+https://github.com/hunspell/hunspell.git"
- "${_pkgname}-range-v3::git+https://github.com/ericniebler/range-v3.git"
- "${_pkgname}-fcitx-qt5::git+https://github.com/fcitx/fcitx-qt5.git"
- "${_pkgname}-nimf::git+https://github.com/hamonikr/nimf.git"
- "${_pkgname}-hime::git+https://github.com/hime-ime/hime.git"
- "${_pkgname}-fcitx5-qt::git+https://github.com/fcitx/fcitx5-qt.git"
- "${_pkgname}-lib_webrtc::git+https://github.com/desktop-app/lib_webrtc.git"
- "${_pkgname}-tgcalls::git+https://github.com/TelegramMessenger/tgcalls.git"
- "${_pkgname}-lib_webview::git+https://github.com/desktop-app/lib_webview.git"
- "${_pkgname}-lib_waylandshells::git+https://github.com/desktop-app/lib_waylandshells.git"
- "${_pkgname}-jemalloc::git+https://github.com/jemalloc/jemalloc.git"
- "${_pkgname}-kwayland::git+https://github.com/KDE/kwayland.git"
- "${_pkgname}-dispatch::git+https://github.com/apple/swift-corelibs-libdispatch.git"
+ "${_pkgname}-tg_owt::git+https://github.com/desktop-app/tg_owt.git#commit=${_tg_owt_commit}"
+
+ "include.patch"
+ "kf594.patch"
+ "https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/326.patch"
+ "https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/333.patch"
+ "https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/334.patch"
+ "https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/335.patch"
+ "https://patch-diff.githubusercontent.com/raw/kotatogram/kotatogram-desktop/pull/337.patch"
+
+ "https://patch-diff.githubusercontent.com/raw/desktop-app/tg_owt/pull/101.patch"
+ "tg_owt-fix.patch"
"0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch"
- "block-sponsored_messages.patch"
+ "0002-Block-sponsored_messages.patch"
+ "0003-Allow-downloading-and-copying-from-restricted-channels.patch"
)
b2sums=('SKIP'
'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
+ 'a3448b085b2046a9cb19848f8e5c96c609ba00f41209e23cae82c09e23e22303fbc313f718ce635541d66d42b7682215b3dfa35a969575ecaba65b68354b2c2d'
+ 'c4e75540ed8363689265d57dfe3410ceeeed4a1f06d3b8efd4fd029c0c2792b7ecc992ea75bfeba0599133ff85814f4ba25ce7dab2a18264344de3fadb47e626'
+ '7564058d932166d6e267ad87d8da1e1bc9e33c42de057feae44f74da9cbdc0947f7233c724802af3e1d10fe699cdf1e7630a634fc7c47eb06d55f0237fd36972'
+ '5fcc611dad411bc53a800a9f6e6f013bcf72ada64c5a70453f624941d983f02e80afb0cbcd646e4aaf51688ef3304f601d2cf1ab41de81a171250ca0d11cad5c'
+ '228acce28b60cd60c54e954a281893bb9cbdbaccec9743907c237d0577963963f79efe44df7de932d69061603cc0a1626d4a8e04f78e04d167b1e3bf1c7c020b'
+ 'ab537548d871939e0d905849032d435f0732a1bd586dde212c8f7079f1652dafa07a0cde356cee78e47f5fb9a687185a9150fe3b70d08562fd781f20e6f64708'
+ '802199bb3b6ec54437d8505695112743cbdaef1b13e25629d3832e68601147b48668738e3c0832296e74ee3bf1820914a46264aeda54411d4733fbb2e86260c9'
+ '0d9d0927e401da06e5b77b6606c32d79966e946bc5dedb2086a5fc3fb5472a1c9039b8470031416d2bad81b3138ead5e29636b28e283774978e66b80cec15c2f'
+ '9874a75e04500c2a9b8f67d75e9c81e970ab5dd8f62657fe82046a5be22f4dde371e3e8b50ab207d2a6a3017e3a209b5078f7ea16b94a2128a5a96db42f9d1c4'
'63c912c53b7c259d97162f96acdb67a88b625c99ac2144869abc88a08d96e940bfdefcf9478c3c20a95f03c19ac16428e3fa6f6a2fa16a879de29b2856b4b617'
- '96a703e3c7e4a2e2229c386daa24af0ca0228d130a35a6ba25e5da4885297d5d0b33fe37f26f71955cac01e3250dc4f811ebb6ff0fe58f3f7e5d5380a970347f')
+ '96a703e3c7e4a2e2229c386daa24af0ca0228d130a35a6ba25e5da4885297d5d0b33fe37f26f71955cac01e3250dc4f811ebb6ff0fe58f3f7e5d5380a970347f'
+ 'a2190defa8f08a7c8c42062debf7339ba1f6bf3171977cb23a0ca8a6264c6e4da8ac52966d9191bd395e6463531c431662ab009f7d7c8df82dd9219d07b9e5b6')
pkgver() {
cd "${srcdir}/${_pkgname}"
@@ -103,69 +67,58 @@ pkgver() {
}
prepare() {
+ apply-patch(){
+ printf "Applying patch %s\n" "$1"
+ patch -Np1 -i "$1"
+ }
+
cd "${srcdir}/${_pkgname}"
- git config submodule.cmake.url "${srcdir}/${_pkgname}-cmake_helpers"
-
- git config submodule.Telegram/lib_crl.url "${srcdir}/${_pkgname}-lib_crl"
- git config submodule.Telegram/lib_rpl.url "${srcdir}/${_pkgname}-lib_rpl"
- git config submodule.Telegram/lib_base.url "${srcdir}/${_pkgname}-lib_base"
- git config submodule.Telegram/codegen.url "${srcdir}/${_pkgname}-codegen"
- git config submodule.Telegram/lib_ui.url "${srcdir}/${_pkgname}-lib_ui"
- git config submodule.Telegram/lib_lottie.url "${srcdir}/${_pkgname}-lib_lottie"
- git config submodule.Telegram/lib_tl.url "${srcdir}/${_pkgname}-lib_tl"
- git config submodule.Telegram/lib_spellcheck.url "${srcdir}/${_pkgname}-lib_spellcheck"
- git config submodule.Telegram/lib_storage.url "${srcdir}/${_pkgname}-lib_storage"
- git config submodule.Telegram/lib_qr.url "${srcdir}/${_pkgname}-lib_qr"
- git config submodule.Telegram/lib_webrtc.url "${srcdir}/${_pkgname}-lib_webrtc"
- git config submodule.Telegram/lib_webview.url "${srcdir}/${_pkgname}-lib_webview"
- git config submodule.Telegram/lib_waylandshells.url "${srcdir}/${_pkgname}-lib_waylandshells"
-
- git config submodule.Telegram/ThirdParty/libtgvoip.url "${srcdir}/${_pkgname}-libtgvoip"
- git config submodule.Telegram/ThirdParty/GSL.url "${srcdir}/${_pkgname}-GSL"
- git config submodule.Telegram/ThirdParty/xxHash.url "${srcdir}/${_pkgname}-xxHash"
- git config submodule.Telegram/ThirdParty/rlottie.url "${srcdir}/${_pkgname}-rlottie"
- git config submodule.Telegram/ThirdParty/lz4.url "${srcdir}/${_pkgname}-lz4"
- git config submodule.Telegram/ThirdParty/expected.url "${srcdir}/${_pkgname}-expected"
- git config submodule.Telegram/ThirdParty/QR.url "${srcdir}/${_pkgname}-QR-Code-generator"
- git config submodule.Telegram/ThirdParty/libdbusmenu-qt.url "${srcdir}/${_pkgname}-libdbusmenu-qt"
- git config submodule.Telegram/ThirdParty/hunspell.url "${srcdir}/${_pkgname}-hunspell"
- git config submodule.Telegram/ThirdParty/range-v3.url "${srcdir}/${_pkgname}-range-v3"
- git config submodule.Telegram/ThirdParty/fcitx-qt5.url "${srcdir}/${_pkgname}-fcitx-qt5"
- git config submodule.Telegram/ThirdParty/nimf.url "${srcdir}/${_pkgname}-nimf"
- git config submodule.Telegram/ThirdParty/hime.url "${srcdir}/${_pkgname}-hime"
- git config submodule.Telegram/ThirdParty/fcitx5-qt.url "${srcdir}/${_pkgname}-fcitx5-qt"
- git config submodule.Telegram/ThirdParty/tgcalls.url "${srcdir}/${_pkgname}-tgcalls"
- git config submodule.Telegram/ThirdParty/jemalloc.url "${srcdir}/${_pkgname}-jemalloc"
- git config submodule.Telegram/ThirdParty/kwayland.url "${srcdir}/${_pkgname}-kwayland"
- git config submodule.Telegram/ThirdParty/dispatch.url "${srcdir}/${_pkgname}-dispatch"
-
- git submodule update --init
-
- #patches
- patch -p1 < "${srcdir}/0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch"
- patch -p1 < "${srcdir}/block-sponsored_messages.patch"
+ git submodule update --init --recursive --depth 1 --jobs $(nproc)
+
+ apply-patch "${srcdir}/kf594.patch"
+ apply-patch "${srcdir}/326.patch"
+ apply-patch "${srcdir}/333.patch"
+ apply-patch "${srcdir}/334.patch"
+ apply-patch "${srcdir}/335.patch"
+ apply-patch "${srcdir}/337.patch"
+
+ apply-patch "${srcdir}/0001-Add-an-option-to-hide-messages-from-blocked-users-in.patch"
+ apply-patch "${srcdir}/0002-Block-sponsored_messages.patch"
+ apply-patch "${srcdir}/0003-Allow-downloading-and-copying-from-restricted-channels.patch"
+
+ cd "${srcdir}/${_pkgname}-tg_owt"
+ git submodule update --init --recursive --depth 1 --jobs $(nproc)
+
+ apply-patch "$srcdir/101.patch"
+ # apply-patch "$srcdir/include.patch"
+ apply-patch "$srcdir/tg_owt-fix.patch"
}
build() {
- cd "${srcdir}/${_pkgname}"
export CXXFLAGS+=" -Wp,-U_GLIBCXX_ASSERTIONS"
export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig' # force build with ffmpeg4.4
+
+ cd "${srcdir}/${_pkgname}-tg_owt"
+ cmake \
+ -B build \
+ -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
+ -DBUILD_SHARED_LIBS=OFF \
+ -DTG_OWT_PACKAGED_BUILD=ON
+
+ CFLAGS+=" -ffat-lto-objects" CXXFLAGS+=" -ffat-lto-objects -I/usr/include/libdrm" cmake --build build
+
+ cd "${srcdir}/${_pkgname}"
cmake . \
-B build \
-G Ninja \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_BUILD_TYPE=Release \
- -DTDESKTOP_API_TEST=ON
-
- # Hack to compile for ffmpeg4.4
- sed -i "s|/usr/lib/libav|/usr/lib/ffmpeg4.4/libav|g" build/build.ninja
- sed -i "s|/usr/lib/libsw|/usr/lib/ffmpeg4.4/libsw|g" build/build.ninja
- sed -i "s|-lavcodec|/usr/lib/ffmpeg4.4/libavcodec.so|g" build/build.ninja
- sed -i "s|-lavformat|/usr/lib/ffmpeg4.4/libavformat.so|g" build/build.ninja
- sed -i "s|-lavutil|/usr/lib/ffmpeg4.4/libavutil.so|g" build/build.ninja
- sed -i "s|-lswscale|/usr/lib/ffmpeg4.4/libswscale.so|g" build/build.ninja
- sed -i "s|-lswresample|/usr/lib/ffmpeg4.4/libswresample.so|g" build/build.ninja
+ -DTDESKTOP_API_TEST=ON \
+ -Dtg_owt_DIR="${srcdir}/${_pkgname}-tg_owt/build" \
+ -DDESKTOP_APP_QT6=OFF
cmake --build build
}
diff --git a/fix_ffmpeg5_build_24044.patch b/fix_ffmpeg5_build_24044.patch
deleted file mode 100644
index 389d5f778fff..000000000000
--- a/fix_ffmpeg5_build_24044.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 75e40907af063d25cdb9e42ed5c8a033920ab5c8 Mon Sep 17 00:00:00 2001
-From: Nicholas Guriev <nicholas@guriev.su>
-Date: Tue, 8 Feb 2022 18:20:27 +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/SourceFiles/ffmpeg/ffmpeg_utility.cpp | 2 +-
- Telegram/SourceFiles/ffmpeg/ffmpeg_utility.h | 2 +-
- Telegram/SourceFiles/media/audio/media_audio_capture.cpp | 2 +-
- Telegram/SourceFiles/media/audio/media_audio_ffmpeg_loader.h | 4 ++++
- Telegram/SourceFiles/media/streaming/media_streaming_file.cpp | 4 ++--
- 5 files changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
-index 866926a9ef13..a01b9fe6152f 100644
---- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
-+++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp
-@@ -154,7 +154,7 @@ void FormatDeleter::operator()(AVFormatContext *value) {
- }
- }
-
--AVCodec *FindDecoder(not_null<AVCodecContext*> context) {
-+const AVCodec *FindDecoder(not_null<AVCodecContext*> context) {
- // Force libvpx-vp9, because we need alpha channel support.
- return (context->codec_id == AV_CODEC_ID_VP9)
- ? avcodec_find_decoder_by_name("libvpx-vp9")
-diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.h b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.h
-index 401d65dc6b45..6f502dcaa88b 100644
---- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.h
-+++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.h
-@@ -158,7 +158,7 @@ using SwscalePointer = std::unique_ptr<SwsContext, SwscaleDeleter>;
- void LogError(QLatin1String method);
- void LogError(QLatin1String method, FFmpeg::AvErrorWrap error);
-
--[[nodiscard]] AVCodec *FindDecoder(not_null<AVCodecContext*> context);
-+[[nodiscard]] const AVCodec *FindDecoder(not_null<AVCodecContext*> context);
- [[nodiscard]] crl::time PtsToTime(int64_t pts, AVRational timeBase);
- // Used for full duration conversion.
- [[nodiscard]] crl::time PtsToTimeCeil(int64_t pts, AVRational timeBase);
-diff --git a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-index 6ce2456681b3..04c361a37d9e 100644
---- a/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-+++ b/Telegram/SourceFiles/media/audio/media_audio_capture.cpp
-@@ -147,7 +147,7 @@ struct Instance::Inner::Private {
- AVIOContext *ioContext = nullptr;
- AVFormatContext *fmtContext = nullptr;
- AVStream *stream = nullptr;
-- AVCodec *codec = nullptr;
-+ const AVCodec *codec = nullptr;
- AVCodecContext *codecContext = nullptr;
- bool opened = false;
- bool processing = false;
-diff --git a/Telegram/SourceFiles/media/audio/media_audio_ffmpeg_loader.h b/Telegram/SourceFiles/media/audio/media_audio_ffmpeg_loader.h
-index 83de13bad267..58c97fe49bb0 100644
---- a/Telegram/SourceFiles/media/audio/media_audio_ffmpeg_loader.h
-+++ b/Telegram/SourceFiles/media/audio/media_audio_ffmpeg_loader.h
-@@ -60,7 +60,11 @@ class AbstractFFMpegLoader : public AudioPlayerLoader {
- uchar *ioBuffer = nullptr;
- AVIOContext *ioContext = nullptr;
- AVFormatContext *fmtContext = nullptr;
-+#if LIBAVFORMAT_VERSION_MAJOR >= 59
-+ const AVCodec *codec = nullptr;
-+#else
- AVCodec *codec = nullptr;
-+#endif
- int32 streamId = 0;
-
- bool _opened = false;
-diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp
-index 874cf5cd2417..3d2658c880d9 100644
---- a/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp
-+++ b/Telegram/SourceFiles/media/streaming/media_streaming_file.cpp
-@@ -23,8 +23,8 @@ constexpr auto kMaxQueuedPackets = 1024;
- not_null<AVStream*> stream,
- Mode mode) {
- return (mode == Mode::Video || mode == Mode::Inspection)
-- && stream->codec
-- && (stream->codec->codec_id == AV_CODEC_ID_VP9)
-+ && stream->codecpar
-+ && (stream->codecpar->codec_id == AV_CODEC_ID_VP9)
- && format->iformat
- && format->iformat->name
- && QString::fromLatin1(
diff --git a/fix_tgcalls_ffmpeg5.patch b/fix_tgcalls_ffmpeg5.patch
deleted file mode 100644
index 4e0cb53b0292..000000000000
--- a/fix_tgcalls_ffmpeg5.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git a/tgcalls/group/AudioStreamingPart.cpp b/tgcalls/group/AudioStreamingPart.cpp
-index f71c8c7..27d8c89 100644
---- a/tgcalls/group/AudioStreamingPart.cpp
-+++ b/tgcalls/group/AudioStreamingPart.cpp
-@@ -170,7 +170,7 @@ public:
-
- _frame = av_frame_alloc();
-
-- AVInputFormat *inputFormat = av_find_input_format("ogg");
-+ const AVInputFormat *inputFormat = av_find_input_format("ogg");
- if (!inputFormat) {
- _didReadToEnd = true;
- return;
-@@ -255,7 +255,7 @@ public:
- }
-
- if (audioCodecParameters && audioStream) {
-- AVCodec *codec = avcodec_find_decoder(audioCodecParameters->codec_id);
-+ const AVCodec *codec = avcodec_find_decoder(audioCodecParameters->codec_id);
- if (codec) {
- _codecContext = avcodec_alloc_context3(codec);
- ret = avcodec_parameters_to_context(_codecContext, audioCodecParameters);
-diff --git a/tgcalls/group/VideoStreamingPart.cpp b/tgcalls/group/VideoStreamingPart.cpp
-index 591a523..c2b1998 100644
---- a/tgcalls/group/VideoStreamingPart.cpp
-+++ b/tgcalls/group/VideoStreamingPart.cpp
-@@ -337,7 +337,7 @@ public:
-
- int ret = 0;
-
-- AVInputFormat *inputFormat = av_find_input_format(container.c_str());
-+ const AVInputFormat *inputFormat = av_find_input_format(container.c_str());
- if (!inputFormat) {
- _didReadToEnd = true;
- return;
-@@ -380,7 +380,7 @@ public:
- }
-
- 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);
diff --git a/include.patch b/include.patch
new file mode 100644
index 000000000000..1cedb97ffb85
--- /dev/null
+++ b/include.patch
@@ -0,0 +1,13 @@
+diff --git a/src/modules/include/module_common_types_public.h b/src/modules/include/module_common_types_public.h
+index 345e45ce..de74bf69 100644
+--- a/src/modules/include/module_common_types_public.h
++++ b/src/modules/include/module_common_types_public.h
+@@ -10,7 +10,7 @@
+
+ #ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+ #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+-
++#include <cstdint>
+ #include <limits>
+
+ #include "absl/types/optional.h"
diff --git a/kf594.patch b/kf594.patch
new file mode 100644
index 000000000000..0fa2d8bc8f6e
--- /dev/null
+++ b/kf594.patch
@@ -0,0 +1,57 @@
+diff --git a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
+index 7641579aa..3c195e397 100644
+--- a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
++++ b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
+@@ -9,10 +9,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
+
+ #include "base/platform/base_platform_info.h"
+
+-#include <connection_thread.h>
+-#include <registry.h>
+-#include <surface.h>
+-#include <plasmashell.h>
++#include <KWayland/Client/connection_thread.h>
++#include <KWayland/Client/registry.h>
++#include <KWayland/Client/surface.h>
++#include <KWayland/Client/plasmashell.h>
+
+ using namespace KWayland::Client;
+
+Submodule Telegram/lib_base contains modified content
+diff --git a/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp b/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
+index 32f0de6..30a087f 100644
+--- a/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
++++ b/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
+@@ -13,11 +13,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
+ #include <QtCore/QPointer>
+ #include <QtGui/QWindow>
+
+-#include <connection_thread.h>
+-#include <registry.h>
+-#include <surface.h>
+-#include <xdgforeign.h>
+-#include <idleinhibit.h>
++#include <KWayland/Client/connection_thread.h>
++#include <KWayland/Client/registry.h>
++#include <KWayland/Client/surface.h>
++#include <KWayland/Client/xdgforeign.h>
++#include <KWayland/Client/idleinhibit.h>
+
+ using namespace KWayland::Client;
+
+Submodule Telegram/lib_ui contains modified content
+diff --git a/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp b/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
+index 01f1e80..163cb6a 100644
+--- a/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
++++ b/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
+@@ -24,8 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
+ #include <private/qwaylandwindow_p.h>
+ #include <private/qwaylandshellsurface_p.h>
+
+-#include <connection_thread.h>
+-#include <registry.h>
++#include <KWayland/Client/connection_thread.h>
++#include <KWayland/Client/registry.h>
+
+ Q_DECLARE_METATYPE(QMargins);
+
diff --git a/tg_owt-fix.patch b/tg_owt-fix.patch
new file mode 100644
index 000000000000..8a8bedb5ce53
--- /dev/null
+++ b/tg_owt-fix.patch
@@ -0,0 +1,49 @@
+diff --git a/src/common_video/h265/h265_pps_parser.h b/src/common_video/h265/h265_pps_parser.h
+index 28c95ea9..790b0b73 100644
+--- a/src/common_video/h265/h265_pps_parser.h
++++ b/src/common_video/h265/h265_pps_parser.h
+@@ -13,6 +13,8 @@
+
+ #include "absl/types/optional.h"
+
++#include <stdint.h>
++
+ namespace rtc {
+ class BitBuffer;
+ }
+diff --git a/src/modules/audio_processing/transient/file_utils.h b/src/modules/audio_processing/transient/file_utils.h
+index b7483377..56696708 100644
+--- a/src/modules/audio_processing/transient/file_utils.h
++++ b/src/modules/audio_processing/transient/file_utils.h
+@@ -14,6 +14,7 @@
+ #include <string.h>
+
+ #include "rtc_base/system/file_wrapper.h"
++#include <cstdint>
+
+ namespace webrtc {
+
+diff --git a/src/modules/include/module_common_types_public.h b/src/modules/include/module_common_types_public.h
+index 345e45ce..8338a514 100644
+--- a/src/modules/include/module_common_types_public.h
++++ b/src/modules/include/module_common_types_public.h
+@@ -11,6 +11,7 @@
+ #ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+ #define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
+
++#include <cstdint>
+ #include <limits>
+
+ #include "absl/types/optional.h"
+diff --git a/src/rtc_base/third_party/base64/base64.h b/src/rtc_base/third_party/base64/base64.h
+index ca249541..b5cf3f73 100644
+--- a/src/rtc_base/third_party/base64/base64.h
++++ b/src/rtc_base/third_party/base64/base64.h
+@@ -16,6 +16,7 @@
+ #include <vector>
+
+ #include "rtc_base/system/rtc_export.h"
++#include <cstdint>
+
+ namespace rtc {
+