diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2022-07-03 17:12:43 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2022-10-21 18:34:02 -0500 |
commit | 9ac6bc00a1563dc270d2464054709bdfd0592af0 (patch) | |
tree | 4de9184024cc83be041c79ce0b1acf4da9448e7d /legacy/telegram | |
parent | 8a240ed95da6e3299fd0542d2799499866080494 (diff) | |
download | packages-9ac6bc00a1563dc270d2464054709bdfd0592af0.tar.gz packages-9ac6bc00a1563dc270d2464054709bdfd0592af0.tar.bz2 packages-9ac6bc00a1563dc270d2464054709bdfd0592af0.tar.xz packages-9ac6bc00a1563dc270d2464054709bdfd0592af0.zip |
user/telegram: Move to legacy/
Big-endian support never landed, which takes out two architectures.
Telegram never built properly on ARMv7, which takes out another one.
This violates our policy of packages in user/ being available for a
minimum of 5 of 6 architectures unless it is a system-specific package.
Additionally, there have been internal disagreements on how to approach
handling of the API key material.
On the personal side, I don't have a lot of time to chase upstream, and
I don't want to ship something potentially security-sensitive in such a
state.
Diffstat (limited to 'legacy/telegram')
-rw-r--r-- | legacy/telegram/APKBUILD | 63 | ||||
-rw-r--r-- | legacy/telegram/endian.patch | 25 | ||||
-rw-r--r-- | legacy/telegram/rlottie.patch | 16 |
3 files changed, 104 insertions, 0 deletions
diff --git a/legacy/telegram/APKBUILD b/legacy/telegram/APKBUILD new file mode 100644 index 000000000..46cc4a9c1 --- /dev/null +++ b/legacy/telegram/APKBUILD @@ -0,0 +1,63 @@ +# Contributor: A. Wilcox <awilfox@adelielinux.org> +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=telegram +pkgver=2.0.1 +pkgrel=0 +pkgdesc="Telegram messaging app" +url="https://telegram.org/" +arch="all" +options="!check" # No test suite. +license="GPL-3.0-only WITH OpenSSL-exception" +depends="qt5-qtimageformats" +makedepends="cmake enchant-dev ffmpeg-dev hunspell-dev libdbusmenu-qt-dev + lz4-dev minizip-dev openal-soft-dev openssl-dev opus-dev pulseaudio-dev + python3 qt5-qtbase-dev range-v3 xxhash-dev xz-dev zlib-dev" +subpackages="" +source="https://github.com/telegramdesktop/tdesktop/releases/download/v$pkgver/tdesktop-$pkgver-full.tar.gz + endian.patch + " +builddir="$srcdir/tdesktop-$pkgver-full" + +build() { + [ -f "$HOME/telegram_credentials.sh" ] || die "You need to have a Telegram API ID." + + . $HOME/telegram_credentials.sh + + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + # Can't use packaged rlottie, API mismatch. + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_BUILD_TYPE=RelWithDebugInfo \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \ + -DDESKTOP_APP_USE_GLIBC_WRAPS=OFF \ + -DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF \ + -DDESKTOP_APP_USE_PACKAGED_GSL=OFF \ + -DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF \ + -DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF \ + -DTDESKTOP_API_ID="${TELEGRAM_API_ID}" \ + -DTDESKTOP_API_HASH="${TELEGRAM_API_HASH}" \ + -DTDESKTOP_DISABLE_GTK_INTEGRATION=ON \ + -DTDESKTOP_LAUNCHER_BASENAME=telegramdesktop \ + -DTDESKTOP_USE_PACKAGED_TGVOIP=OFF \ + -Ddisable_autoupdate=1 \ + ${CMAKE_CROSSOPTS} \ + . + make +} + +package() { + install -D -m755 "$builddir"/bin/telegram-desktop "$pkgdir"/usr/bin/telegram-desktop + install -D -m644 "$builddir"/lib/xdg/telegramdesktop.desktop "$pkgdir"/usr/share/applications/telegramdesktop.desktop + for _icon in 16 32 48 64 128 256 512; do + install -D -m644 "$builddir"/Telegram/Resources/art/icon$_icon.png \ + "$pkgdir"/usr/share/icons/hicolor/${_icon}x${_icon}/apps/telegram.png + done +} + +sha512sums="99cd7c5ca1e9dd75ecd98d272522b0e4aab2d46525e3d0c306503b7a00c9d25c1646e9d7462182682a58947c7435864af805a3b6f85906d8b21e5675cc8383cb tdesktop-2.0.1-full.tar.gz +c478bd59187493d60172d805ca19e9e09fa2c81b87d5dbbd5f3cd9aae0f207b463d127e06f2053f7b7b6ac00b3191d59e36ec6c5453a1da4d6535d1caad27242 endian.patch" diff --git a/legacy/telegram/endian.patch b/legacy/telegram/endian.patch new file mode 100644 index 000000000..40a3b4478 --- /dev/null +++ b/legacy/telegram/endian.patch @@ -0,0 +1,25 @@ +From d4c11502175e2a7821dbd92e029a90d54498e3e8 Mon Sep 17 00:00:00 2001 +From: John Zimmermann <johnz@posteo.net> +Date: Thu, 2 Jan 2020 12:57:33 +0100 +Subject: [PATCH] Build on big endian + +--- + Telegram/SourceFiles/config.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git Telegram/SourceFiles/config.h Telegram/SourceFiles/config.h +index fb7b54e4d..6a873fbd7 100644 +--- a/Telegram/SourceFiles/config.h ++++ b/Telegram/SourceFiles/config.h +@@ -162,7 +162,7 @@ constexpr auto ApiHash = "344583e45741c457fe1862106095a5eb"; + #endif // TDESKTOP_API_ID && TDESKTOP_API_HASH + + #if Q_BYTE_ORDER == Q_BIG_ENDIAN +-#error "Only little endian is supported!" ++#warning "Only little endian is supported!" + #endif // Q_BYTE_ORDER == Q_BIG_ENDIAN + + #if (TDESKTOP_ALPHA_VERSION != 0) +-- +2.24.1 + diff --git a/legacy/telegram/rlottie.patch b/legacy/telegram/rlottie.patch new file mode 100644 index 000000000..6bd2ff6c3 --- /dev/null +++ b/legacy/telegram/rlottie.patch @@ -0,0 +1,16 @@ +No CMake config exists for rlottie; use pkgconf instead. + +--- a/cmake/external/rlottie/CMakeLists.txt 2020-01-17 18:21:17.000000000 +0100 ++++ b/cmake/external/rlottie/CMakeLists.txt 2020-01-18 00:37:40.280438388 +0100 +@@ -8,8 +8,9 @@ + add_library(external_rlottie INTERFACE IMPORTED GLOBAL) + add_library(desktop-app::external_rlottie ALIAS external_rlottie) + +- find_package(rlottie REQUIRED) +- target_link_libraries(external_rlottie INTERFACE rlottie::rlottie) ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(RLOTTIE REQUIRED rlottie) ++ target_link_libraries(external_rlottie INTERFACE ${RLOTTIE_LIBRARIES}) + else() + add_library(external_rlottie OBJECT) + add_library(desktop-app::external_rlottie ALIAS external_rlottie) |