summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiovanni Santini2022-12-07 09:56:47 +0100
committerGiovanni Santini2022-12-07 09:56:47 +0100
commit43cb108dc50b915a735b1f0308379532be2179d9 (patch)
tree622fb3adebff764c6df686444ad01d2d9b32b303
parent9ef91d992f5326d3241ce729fe9a617e1c08f81a (diff)
downloadaur-43cb108dc50b915a735b1f0308379532be2179d9.tar.gz
upgpkg: telegram-desktop-dev 4.3.4-1
- Version bump. - Switch build tool to ninja due to missing implicit rules within make. - Ensure Qt6 is used on systems with both Qt5 and Qt6. - Remove old patches.
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD31
-rw-r--r--ensure_qt6_build.patch23
-rw-r--r--tgcalls_type_fix.diff12
-rw-r--r--use_qt6_only.diff13
5 files changed, 50 insertions, 41 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 30114e4e8bfa..7c3d6fa352c3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,13 @@
pkgbase = telegram-desktop-dev
pkgdesc = Official Telegram Desktop client - development release
- pkgver = 4.3.1
+ pkgver = 4.3.4
pkgrel = 1
url = https://desktop.telegram.org/
arch = x86_64
license = GPL3
makedepends = cmake
makedepends = git
+ makedepends = ninja
makedepends = python
makedepends = range-v3
makedepends = tl-expected
@@ -37,12 +38,14 @@ pkgbase = telegram-desktop-dev
depends = abseil-cpp
depends = libdispatch
depends = openssl-1.1
+ depends = protobuf
optdepends = webkit2gtk: embedded browser features
optdepends = xdg-desktop-portal: desktop integration
provides = telegram-desktop
conflicts = telegram-desktop
- source = tdesktop::git+https://github.com/telegramdesktop/tdesktop#tag=v4.3.1
- source = tgcalls_type_fix.diff
+ source = tdesktop::git+https://github.com/telegramdesktop/tdesktop#tag=v4.3.4
+ source = ensure_qt6_build.patch
+ source = cld3::git+https://github.com/google/cld3.git
source = cmake::git+https://github.com/desktop-app/cmake_helpers.git
source = codegen::git+https://github.com/desktop-app/codegen.git
source = dispatch::git+https://github.com/apple/swift-corelibs-libdispatch
@@ -77,7 +80,8 @@ pkgbase = telegram-desktop-dev
source = wayland-protocols::git+https://github.com/gitlab-freedesktop-mirrors/wayland-protocols.git
source = xxHash::git+https://github.com/Cyan4973/xxHash.git
sha512sums = SKIP
- sha512sums = e1328de1bf2dfc26a834aae855c9ee4734ff00e92f8c31fcfe633b0b5365456daa5ae1736a590a57889597f8703214829e0809d7e6d13e8fb02165c731b1ea88
+ sha512sums = 44b4a265cece9a197441cab7483ffdb300c9b93e46983251eed1254b1ab7aa6488e48c3e2aa02dad7f305623314c8def56ca106bc893c777af37bbe8c43f2bc7
+ sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
sha512sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 8193269e307b..6e12870b8d13 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,8 +10,10 @@
# https://raw.githubusercontent.com/archlinux/svntogit-community/packages/telegram-desktop/trunk/PKGBUILD
# Thanks to the Arch maintainers :)
+# You can pass parameters to `ninja` via MAKEFLAGS
+
pkgname=telegram-desktop-dev
-pkgver=4.3.1
+pkgver=4.3.4
pkgrel=1
pkgdesc='Official Telegram Desktop client - development release'
arch=(x86_64)
@@ -22,26 +24,27 @@ license=('GPL3')
depends=('hunspell' 'ffmpeg4.4' 'hicolor-icon-theme' 'lz4' 'minizip' 'openal' 'ttf-opensans'
'qt6-imageformats' 'qt6-svg' 'qt6-wayland' 'qt6-5compat' 'xxhash' 'glibmm-2.68'
'rnnoise' 'pipewire' 'libxtst' 'libxrandr' 'jemalloc' 'abseil-cpp' 'libdispatch'
- 'openssl-1.1')
-makedepends=('cmake' 'git' 'python' 'range-v3' 'tl-expected' 'microsoft-gsl' 'meson'
+ 'openssl-1.1' 'protobuf')
+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=(telegram-desktop)
conflicts=(telegram-desktop)
+# Specify the commit to fetch. Normally the version tag.
_commit="tag=v$pkgver"
-
# All the sources are Git repositories and might be adjusted when a build issue arise.
# These files might require modifications to be up-to-date.
# In such situation, extra patches will be added.
# An easy way to clone the repo since the last update is:
-# git clone --recurse-submodules --remote-submodules --shallow-submodules --shallow-since=vOLDVER --branch=vNEWVER https://github.com/telegramdesktop/tdesktop WORKDIR
+# git clone --recurse-submodules --shallow-submodules --shallow-since vOLDVER --branch=vNEWVER https://github.com/telegramdesktop/tdesktop WORKDIR
source=(
"tdesktop::git+https://github.com/telegramdesktop/tdesktop#$_commit"
- "tgcalls_type_fix.diff"
+ "ensure_qt6_build.patch"
# Here are all the submodule repos.
# All the submodules "source" definitions are generated them via:
# git submodule foreach --quiet 'echo \"${name##*/}::git+`git remote get-url origin`\"' | sort
+ "cld3::git+https://github.com/google/cld3.git"
"cmake::git+https://github.com/desktop-app/cmake_helpers.git"
"codegen::git+https://github.com/desktop-app/codegen.git"
"dispatch::git+https://github.com/apple/swift-corelibs-libdispatch"
@@ -77,7 +80,8 @@ source=(
"xxHash::git+https://github.com/Cyan4973/xxHash.git"
)
sha512sums=('SKIP'
- 'e1328de1bf2dfc26a834aae855c9ee4734ff00e92f8c31fcfe633b0b5365456daa5ae1736a590a57889597f8703214829e0809d7e6d13e8fb02165c731b1ea88'
+ '44b4a265cece9a197441cab7483ffdb300c9b93e46983251eed1254b1ab7aa6488e48c3e2aa02dad7f305623314c8def56ca106bc893c777af37bbe8c43f2bc7'
+ 'SKIP'
'SKIP'
'SKIP'
'SKIP'
@@ -131,6 +135,7 @@ prepare() {
git config submodule.Telegram/lib_ui.url "$srcdir/lib_ui"
git config submodule.Telegram/lib_webrtc.url "$srcdir/lib_webrtc"
git config submodule.Telegram/lib_webview.url "$srcdir/lib_webview"
+ git config submodule.Telegram/ThirdParty/cld3.url "$srcdir/cld3"
git config submodule.Telegram/ThirdParty/dispatch.url "$srcdir/dispatch"
git config submodule.Telegram/ThirdParty/expected.url "$srcdir/expected"
git config submodule.Telegram/ThirdParty/fcitx5-qt.url "$srcdir/fcitx5-qt"
@@ -166,9 +171,11 @@ prepare() {
#done
# Patch here, if needed!
# patch -Np1 -i "$srcdir/my_beautiful.patch"
- cd "$srcdir/tdesktop/Telegram/ThirdParty/tgcalls"
- patch -Np1 -i "$srcdir/tgcalls_type_fix.diff"
+ cd cmake
+ patch -Np1 -i "$srcdir/ensure_qt6_build.patch"
+ cd ..
# Official package patches
+ rm -rf Telegram/ThirdParty/libtgvoip/webrtc_dsp/absl
}
build() {
@@ -181,17 +188,17 @@ build() {
# Thanks @primeos!
cmake \
-B build \
- -G "Unix Makefiles" \
+ -G Ninja \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_BUILD_TYPE=Release \
-DTDESKTOP_API_ID=611335 \
-DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c
- make -C build -j `nproc`
+ ninja -C build $MAKEFLAGS
}
package() {
cd "$srcdir/tdesktop"
- DESTDIR="$pkgdir" make -C build install
+ DESTDIR="$pkgdir" ninja -C build install
# They botched the release and put a lot of stuff here.
rm -rf "$pkgdir/build"
}
diff --git a/ensure_qt6_build.patch b/ensure_qt6_build.patch
new file mode 100644
index 000000000000..77330c3fb793
--- /dev/null
+++ b/ensure_qt6_build.patch
@@ -0,0 +1,23 @@
+# Patch made following the issue here:
+# https://github.com/telegramdesktop/tdesktop/issues/25510
+# It seems that CMake has internal issues selecting between Qt5 and Qt6.
+# Rewrite the find_package logic in order to make sure we use Qt5 only if Qt6 is not around.
+# Thanks to @ilya-fedin for the code!
+# Will soon be official:
+# https://github.com/desktop-app/cmake_helpers/pull/245
+diff --git a/external/qt/package.cmake b/external/qt/package.cmake
+index 2faa580..939475a 100644
+--- a/external/qt/package.cmake
++++ b/external/qt/package.cmake
+@@ -25,7 +25,10 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
+ endif()
+
+ if (NOT DEFINED QT_VERSION_MAJOR)
+- find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
++ find_package(QT NAMES Qt6 COMPONENTS Core)
++ if (NOT QT_FOUND)
++ find_package(QT NAMES Qt5 COMPONENTS Core REQUIRED)
++ endif()
+ endif()
+
+ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets Network Svg REQUIRED)
diff --git a/tgcalls_type_fix.diff b/tgcalls_type_fix.diff
deleted file mode 100644
index 7b6c42191f6a..000000000000
--- a/tgcalls_type_fix.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/tgcalls/utils/gzip.h b/tgcalls/utils/gzip.h
-index a3f3ea2..056205b 100644
---- a/tgcalls/utils/gzip.h
-+++ b/tgcalls/utils/gzip.h
-@@ -1,6 +1,7 @@
- #ifndef TGCALLS_UTILS_GZIP_H
- #define TGCALLS_UTILS_GZIP_H
-
-+#include <cstdint>
- #include <absl/types/optional.h>
- #include <vector>
-
diff --git a/use_qt6_only.diff b/use_qt6_only.diff
deleted file mode 100644
index b87b250fec2c..000000000000
--- a/use_qt6_only.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/external/qt/package.cmake b/external/qt/package.cmake
-index bae8405..c732da1 100644
---- a/external/qt/package.cmake
-+++ b/external/qt/package.cmake
-@@ -23,7 +23,7 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
- endif()
-
- if (DESKTOP_APP_QT6)
-- find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
-+ find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
- else()
- find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core)
- endif()