aboutsummaryrefslogtreecommitdiffstats
path: root/testing/telegram-desktop/APKBUILD
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-07-07 10:55:19 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-07-09 06:52:52 -0300
commit877e53b3c028a5beb214d75c974fd0ce500ec97b (patch)
tree85c73b2681d37c5008f120ce801742fdcc9fed87 /testing/telegram-desktop/APKBUILD
parent841a0b258509a745b79e279404ec092f5d50385c (diff)
downloadaports-877e53b3c028a5beb214d75c974fd0ce500ec97b.tar.gz
aports-877e53b3c028a5beb214d75c974fd0ce500ec97b.tar.bz2
aports-877e53b3c028a5beb214d75c974fd0ce500ec97b.tar.xz
testing/telegram-desktop: upgrade to 1.7.14
Diffstat (limited to 'testing/telegram-desktop/APKBUILD')
-rw-r--r--testing/telegram-desktop/APKBUILD197
1 files changed, 90 insertions, 107 deletions
diff --git a/testing/telegram-desktop/APKBUILD b/testing/telegram-desktop/APKBUILD
index 723273c540..96492edaae 100644
--- a/testing/telegram-desktop/APKBUILD
+++ b/testing/telegram-desktop/APKBUILD
@@ -1,21 +1,27 @@
# Maintainer: Leo <thinkabit.ukim@gmail.com>
# Contributor: Leo <thinkabit.ukim@gmail.com>
+# TODO(Leo): remove pulseaudio dep, use system xxhash
pkgname=telegram-desktop
-pkgver=1.7.10
+pkgver=1.7.14
# https://github.com/telegramdesktop/tdesktop/blob/v$pkgver/docs/building-cmake.md
-_libtgvoip_commit=a19a0aff644127d8089f6a4ac18119ec5247dbd0
+_libtgvoip_commit=0e92a22746d15157bea46faddd61b79e9964275a
_GSL_commit=d846fe50a3f0bb7767c7e087a05f4be95f4da0ec
_variant_commit=550ac2f159ca883d360c196149b466955c77a573
-_crl_commit=d259aebc11df52cb6ff8c738580dc4d8f245d681
-_qtlottie_commit=a3fac9db920b167a5f91d678ee7968f100f6fe51
+_crl_commit=9ea870038a2a667add7f621be6252db909068386
+_rlottie_commit=40ccf084445c60a32d72d4811edf0efd0580dcaa
+_Catch2_commit=5ca44b68721833ae3731802ed99af67c6f38a53a
+_xxhash_commit=7cc9639699f64b750c0b82333dced9ea77e8436e
pkgrel=0
pkgdesc="Telegram Desktop messaging app"
options="!check" # Requires Catch2 to be packaged.
url="https://desktop.telegram.org/"
-arch="all !aarch64 !s390x" # ARM are failing due to range-v3
+arch="all !s390x" # ARM are failing due to range-v3
license="GPL-3.0-or-later WITH OpenSSL"
depends="qt5-qtimageformats"
-makedepends="cmake
+makedepends="
+ gyp
+ grep
+ cmake
zlib-dev
opus-dev
libva-dev
@@ -32,10 +38,11 @@ makedepends="cmake
alsa-lib-dev
libexecinfo-dev
python2
- xxhash-dev
range-v3-dev
- grep
rapidjson-dev
+ lz4-dev
+ pulseaudio-dev
+ qtchooser
"
source="
$pkgname-$pkgver.tar.gz::https://github.com/telegramdesktop/tdesktop/archive/v${pkgver}.tar.gz
@@ -43,28 +50,23 @@ source="
GSL-$_GSL_commit.tar.gz::https://github.com/Microsoft/GSL/archive/${_GSL_commit}.tar.gz
variant-$_variant_commit.tar.gz::https://github.com/mapbox/variant/archive/${_variant_commit}.tar.gz
crl-$_crl_commit.tar.gz::https://github.com/telegramdesktop/crl/archive/${_crl_commit}.tar.gz
- qtlottie-$_qtlottie_commit.tar.gz::https://github.com/telegramdesktop/qtlottie/archive/${_qtlottie_commit}.tar.gz
- musl.patch
- no-gtk2.patch
- no-pulse.patch
- xdg.patch
- ppc64le-enable-arch.patch
- system-wide-fonts.patch
- FindBreakpad.cmake
- Telegram.cmake
- TelegramCodegen.cmake
- TelegramCodegenTools.cmake
- TelegramTests.cmake
- ThirdParty-crl.cmake
- ThirdParty-libtgvoip-webrtc.cmake
- ThirdParty-libtgvoip.cmake
- ThirdParty-qtlottie.cmake
- PrecompiledHeader-cmake.patch
- add-private-qt-functions.patch
- fix-missing-use-of-pch.patch
- dynamic-linking-qt5.patch
- sourcefiles-lottie.patch
- submodule-lottie.patch
+ rlottie-$_rlottie_commit.tar.gz::https://github.com/john-preston/rlottie/archive/${_rlottie_commit}.tar.gz
+ Catch2-$_Catch2_commit.tar.gz::https://github.com/catchorg/Catch2/archive/${_Catch2_commit}.tar.gz
+ xxhash-${_xxhash_commit}.tar.gz::https://github.com/Cyan4973/xxHash/archive/${_xxhash_commit}.tar.gz
+ CMakeLists.inj
+ 0001-musl.patch
+ 0002-tdesktop.patch
+ 0003-fix-missing-use-of-pch.patch
+ 0004-xdg.patch
+ 0005-system-wide-fonts.patch
+ 0006-ppc64le-enable-arch.patch
+ 0007-no-gtk2.patch
+ 0009-lz4.patch
+ 0010-libtgvoip.patch
+ 0011-no-static-qt.patch
+ 0012-ffmpeg.patch
+ 0013-lz4.patch
+ 0014-clock_gettime.patch
"
builddir="$srcdir/tdesktop-$pkgver"
@@ -73,106 +75,87 @@ prepare() {
rmdir Telegram/ThirdParty/GSL
rmdir Telegram/ThirdParty/variant
rmdir Telegram/ThirdParty/crl
- rmdir Telegram/ThirdParty/qtlottie
+ rmdir Telegram/ThirdParty/rlottie
+ rmdir Telegram/ThirdParty/Catch
+ rmdir Telegram/ThirdParty/xxHash
# Copy fetched libraries to their appropriate locations
mv ../libtgvoip-${_libtgvoip_commit} "${builddir}"/Telegram/ThirdParty/libtgvoip
mv ../GSL-${_GSL_commit} "${builddir}"/Telegram/ThirdParty/GSL
mv ../variant-${_variant_commit} "${builddir}"/Telegram/ThirdParty/variant
mv ../crl-${_crl_commit} "${builddir}"/Telegram/ThirdParty/crl
- mv ../qtlottie-${_qtlottie_commit} "${builddir}"/Telegram/ThirdParty/qtlottie
-
- # Copy cmake files
- mv ../Telegram.cmake "${builddir}"/Telegram/CMakeLists.txt
- mv ../ThirdParty-crl.cmake "${builddir}"/Telegram/ThirdParty/crl/CMakeLists.txt
- mv ../ThirdParty-libtgvoip.cmake "${builddir}"/Telegram/ThirdParty/libtgvoip/CMakeLists.txt
- mv ../ThirdParty-libtgvoip-webrtc.cmake \
- "${builddir}"/Telegram/ThirdParty/libtgvoip/webrtc_dsp/CMakeLists.txt
- mv ../ThirdParty-qtlottie.cmake "${builddir}"/Telegram/ThirdParty/qtlottie/CMakeLists.txt
-
- mkdir -p "${builddir}"/Telegram/cmake
- mv ../FindBreakpad.cmake "${builddir}"/Telegram/cmake
- mv ../TelegramCodegen.cmake "${builddir}"/Telegram/cmake
- mv ../TelegramTests.cmake "${builddir}"/Telegram/cmake
-
- mkdir -p "${builddir}"/Telegram/native
- mv ../TelegramCodegenTools.cmake "${builddir}"/Telegram/native/CMakeLists.txt
+ mv ../rlottie-${_rlottie_commit} "${builddir}"/Telegram/ThirdParty/rlottie
+ mv ../Catch2-${_Catch2_commit} "${builddir}"/Telegram/ThirdParty/Catch
+ mv ../xxHash-${_xxhash_commit} "${builddir}"/Telegram/ThirdParty/xxHash
cd "$builddir/Telegram/ThirdParty"
- rm -rf minizip # we have this system-wide
+ rm -rf minizip lz4 # we have these system-wide
default_prepare
}
build() {
- cd "$builddir"/Telegram/native
- CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= cmake .
- make
+ export LANG=en_US.UTF-8
+ export GYP_DEFINES="TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE"
+ export GYP_DEFINES="${GYP_DEFINES},TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
+ export GYP_DEFINES="${GYP_DEFINES},TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION"
+ export GYP_DEFINES="${GYP_DEFINES},TDESKTOP_DISABLE_GTK_INTEGRATION"
+ export EXTRA_FLAGS="-Winvalid-pch -O2"
+ export CPPFLAGS="$CPPFLAGS $EXTRA_FLAGS"
+ export CXXFLAGS="$CXXFLAGS $EXTRA_FLAGS"
- mkdir "$builddir"/Telegram/telegram-build
- cd "$builddir"/Telegram/telegram-build
- export CPPFLAGS="$CPPFLAGS -Winvalid-pch"
- export CXXFLAGS="$CXXFLAGS -Winvalid-pch"
- export CXXFLAGS="$CXXFLAGS -DTDESKTOP_API_ID=17349"
- export CXXFLAGS="$CXXFLAGS -DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb"
+ gyp \
+ -Dapi_id=17349 \
+ -Dapi_hash=344583e45741c457fe1862106095a5eb \
+ -Dbuild_defines=${GYP_DEFINES} \
+ -Gconfig=Release \
+ --depth=Telegram/gyp --generator-output=../.. -Goutput_dir=out \
+ Telegram/gyp/Telegram.gyp --format=cmake
- if [ "$CBUILD" != "$CHOST" ]; then
- CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
- fi
- cmake \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_SHARED_LIBS=True \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS -O2" \
- -DCMAKE_C_FLAGS="$CFLAGS -O2" \
- -DENABLE_PULSEAUDIO=OFF \
- -DENABLE_CRASH_REPORTS=OFF \
- -DENABLE_GTK_INTEGRATION=OFF \
- -DBUILD_TESTS=OFF \
- ${CMAKE_CROSSOPTS} ..
+ NUM=$(( $(wc -l < out/Release/CMakeLists.txt) - 2))
+ sed -i "$NUM r ../CMakeLists.inj" out/Release/CMakeLists.txt
+
+ cd out/Release
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
make
}
package() {
- cd "$builddir"/Telegram/telegram-build
- mkdir -p "$pkgdir"/usr/bin
- make DESTDIR="$pkgdir" install
+ install -dm755 "$pkgdir"/usr/bin
+ install -m755 "$builddir/out/Release/Telegram" "$pkgdir/usr/bin/telegram-desktop"
+
+ install -d "$pkgdir/usr/share/applications"
+ install -m644 "$builddir/lib/xdg/telegramdesktop.desktop" \
+ "$pkgdir/usr/share/applications/telegramdesktop.desktop"
- # Fix name to be telegram-desktop
- mv "$pkgdir"/usr/bin/Telegram "$pkgdir"/usr/bin/telegram-desktop
+ for icon_size in 16 32 48 64 128 256 512; do
+ icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps"
- cd "${builddir}"/Telegram/Resources/art
- mkdir -p "$pkgdir"/usr/share/icons/hicolor
- for size in 16 32 48 64 128 256 512; do
- mkdir -p "$pkgdir"/usr/share/icons/hicolor/"$size"x"$size"/apps
- mv icon"$size".png "$pkgdir"/usr/share/icons/hicolor/"$size"x"$size"/apps/telegram.png
+ install -d "$icon_dir"
+ install -m644 "$builddir/Telegram/Resources/art/icon${icon_size}.png" \
+ "$icon_dir/telegram.png"
done
}
-sha512sums="f6e8849d344fd7f8af94d639900150ae87182e1e782f071d1f99aee29a366754eca74ed4062ee10d37348d1195da598a6ce77921fd480e5367b69913c443efe5 telegram-desktop-1.7.10.tar.gz
-9d7826d0996d39dcaf1f56bdd418251b3bc39ebf9ec662280a01dea97deeb02b784b69de4e0421791cda7a18680d26437fbe9d0c965c13a2b0cb971a0b3f511f libtgvoip-a19a0aff644127d8089f6a4ac18119ec5247dbd0.tar.gz
+sha512sums="b2b19aad5c276a389461964b82773f2d0380f0774557d1d81316dc0b10a915ee88b0439211ebbf8aafd8d3edc17dc0dc9d4b7ac894669fba45307a10f5fa946f telegram-desktop-1.7.14.tar.gz
+bf0f1d808b0458d081b5cddcdbf9b24d8a63a31d89c207cd20983abf4f328acea749107d1b0c021579923cfb7371da2a9a6f61d9ce008d6c5c55b3fd7052508e libtgvoip-0e92a22746d15157bea46faddd61b79e9964275a.tar.gz
83560cb0c39b6a4781e916c6081ad2728296e1b19760ca1b6426a8431fb6d7093760a882c539dd77152f5892fe081b1795af6366ea91385bb10aba6adf27170f GSL-d846fe50a3f0bb7767c7e087a05f4be95f4da0ec.tar.gz
537ce0a1731274da63a5be063311f7113c1391081e43970663a994b82a7b2e860302406c2931184789661d86343b2c60064c7014b73dc42799573f5b93bc12ff variant-550ac2f159ca883d360c196149b466955c77a573.tar.gz
-b2aac32e8964165dcf449ceb98dca9665ed9ababdd45c323252a8e39f08acac703dc14a17bafefc40f0a7e76a0c6eb7341a7581cc08e47d64a1f98c8cee50d29 crl-d259aebc11df52cb6ff8c738580dc4d8f245d681.tar.gz
-9385cd7072b2258d8ca1ed9932d953bbdee104833573e15a19f2a824c760cd43e79cd0713385c63fa10648d6ae3d201df080f9da0135f9b338a86ea10cc8a867 qtlottie-a3fac9db920b167a5f91d678ee7968f100f6fe51.tar.gz
-fc672d8168f6b2807e596570bc57f3b89296891b5d62b8e12b38193ed4919e4eb17efd72691c4086fb0ff4383de54695a9faf9874a0727a0980ef35e5ca4bee7 musl.patch
-cb01655dd097b68e89b15e6e4b1f6da10c52e8bec681eeef9807ca376283b10cb3da34acc976c790f3c8dea05acbef1ba1967612920a2e4acb3b9da79e251a0d no-gtk2.patch
-90caf4e67f1fb8bcb26455553b90e35d247cbf67097508bd430f7f790aad9e2ae1646b0ea174013c87c331fb37e60633031187a24787e6a73ca73b706d741739 no-pulse.patch
-8de8c0508177da5fcac4f2dcee4d8baef4b99f74f1dca296567bc3689a6bd17a47c1c945df504abc8811b82a687010d0709503c7c32e47d2ebb1cf0e374c80c5 xdg.patch
-3647ad5fff6326ba9c75fa98189a08c0909af8d1c2b704c8c62fd9da6603f5162af3176c37daa67eb5896bebe3814bf1fd66b9e93c78cbd9b439e472d0db4b44 ppc64le-enable-arch.patch
-ce6be003220267bac5483caf8302b492e1581892bc36d35a61236ebf9f9d766b8bd2159557a1c36256aa85f461797a38bfaae57b12da7a72101b21c0b17ed653 system-wide-fonts.patch
-8b75da50a8212cd7c77e497ad5a49290e2656a2e01037d179cd6270105337a9adb238814f98bdf7a3e954ce8661dc3183a7400533067f9a21e38133a6628563a FindBreakpad.cmake
-53a95dfeabb3a923104132c657f228ed5ae689db86a541be3604c00eeecd3e18c20615111f3682d1355713d7005107a2f938a157bb0eb29948d11a709f2ea71e Telegram.cmake
-56aaf0e35ba1989d463ffa2699e7c0a7235168599f0720f66ff159f03541920e04e5944554b4d1b3a0893cf4581ff50ff00600b54522d24d59fa7192e4f80c0a TelegramCodegen.cmake
-f6e42004d36c69497fd635f1bbd9779027fef1b44fc506cba85ff19c5e49e6b41008782ffb65d59ef4acef78dc0a671c285789ae21cb7a67a9b215c28a2c2eeb TelegramCodegenTools.cmake
-4726ba77330d61f952c7e5af82454cc5536cd92634150406ea5dbc303acfd1d33093334b9b04cf06aa4adca84d97553f28b44dcc554d10af8052352f265c9505 TelegramTests.cmake
-fe1a860184fc31888430d8efb5d12bcf57ef0ed7d64a9570159b906138e987e711e52ea87e3e0567bf749f0336d394aba8a7af9bae6b156c621a13f0aa301b6e ThirdParty-crl.cmake
-2282dedd3d6551893674272ea1308d0c36469711ecf52d1ac2cdc719ab0560a35abc968cc903678dd4e3c2454324e18bcb897b46c597a02013c6d75a7406fffe ThirdParty-libtgvoip-webrtc.cmake
-72b7e188c6787b05f68031f24d901194315243a8b8fb5c3e0c10f1e7c75554ae147810e4d47fa2a0fdf7323da07f48b1cd4a6b840cffd65af96ad9a997e4caff ThirdParty-libtgvoip.cmake
-c80e0c9f79e61b7b152e17ec69be087f1312ffadf38ea5d5eecf4f43a2eadc0cba9112e61f878d2d8eb0c44c6c33bb8338c87009c6f2d97c58357d73de1af080 ThirdParty-qtlottie.cmake
-7ddeb1040e7bf707c13686861d289b3971381bed5c66a2d91b24d0d31c94c38634c0a08916219c51629cabdf33a386e4ad57f719054b0cc3ef1a85ea5d522994 PrecompiledHeader-cmake.patch
-d7f8db23af250156b73b47ad4b1996b73643eb224c969cd1da2929eedfa23a3784ccf8a5728070f464891c621ec6f786e5da323f5bbb2a2cfba999cf80d9dec4 add-private-qt-functions.patch
-6289d5a3eb224ebb05ab64e23ca3d081e617d905cec07edbba423265dc617548005eeb643ce5dfb2fcef9ac774e9f7b64150729bd894ca0e94af0e2aea9c823b fix-missing-use-of-pch.patch
-ad7f1b811b7907b24e0708c5b8f7531891e163b3edebebb159e47cbc24a9201a6ddb5f276f4d0968f84c6d928997f1e94fe9ca678b31e9aad90cdf28449ce39f dynamic-linking-qt5.patch
-3b6fabfb23ea82ae7eb42221dd07af6ad08e4ec2e4657697148159c7ebe46c3681857f16b5445b79d5b29de36101d394e2eb6b85a45145e109cfe63e14fed9b4 sourcefiles-lottie.patch
-2aafc567e7ad4c5d7b5d3ccba3ee5c6998c0f2107ca63079471379fe27e822ccbd95c4a67cbcef77fbd2b0edca1b493ed19e80d3106f1d71cbe6fd9b05f91729 submodule-lottie.patch"
+7bb68c0b0c94bb266a765e01878a0e840fcc28922af8878ff5217da693092ef19c3e543e4ecb86efd41b2b29bb907d98e1998c0d4f3a9e3dbd65c23df4c29ece crl-9ea870038a2a667add7f621be6252db909068386.tar.gz
+54ab3c79b9e23b1d055e9bbf802d16e036d606923acfb61d13db2b620e869ce08aa8c0e2fa7728bfe45ee2221238302936698f75a26cf22c31a95604c15dc270 rlottie-40ccf084445c60a32d72d4811edf0efd0580dcaa.tar.gz
+5b151e0a8c4594b19258a8aade7132521ffbdc97233c9d4a0e5cb2ea31eb9cb3ee51769884a8a08ab821571215ff32854bd76d2929e3b4c14a39e56657109dd6 Catch2-5ca44b68721833ae3731802ed99af67c6f38a53a.tar.gz
+cada36066c14ed735f8f45a2d1e0c2d1bdb564dc18154aaabc12552d41065426d88cdeb8a67b8e697678b01f2e415c0a6caf428baa591d013739d7ac95048d4d xxhash-7cc9639699f64b750c0b82333dced9ea77e8436e.tar.gz
+069a3061649567483e4250abdd80aee69937f744aa5ef06bc465ce5bd3abb7b6d934604bd7a35312dd0593895b7709c51288b9063c2919d260909aefab73b3e9 CMakeLists.inj
+74e8adfe9cb6c224b12fb653798be1abb55cff40f326a9542e5ae23fb82b57a117b5f74dc8a2af80efcd8e261bbbc46c8e5c10fdb6a55ae3196429fd67afd183 0001-musl.patch
+06da4b11ecbaba1f7c46e0afed97abc4b9817349492d947834d40e9e81a4dde43a5223721a6350f5fb34df0997d6ee0ae50558e0899c2ccccfabce5bbb7ddf90 0002-tdesktop.patch
+6289d5a3eb224ebb05ab64e23ca3d081e617d905cec07edbba423265dc617548005eeb643ce5dfb2fcef9ac774e9f7b64150729bd894ca0e94af0e2aea9c823b 0003-fix-missing-use-of-pch.patch
+8de8c0508177da5fcac4f2dcee4d8baef4b99f74f1dca296567bc3689a6bd17a47c1c945df504abc8811b82a687010d0709503c7c32e47d2ebb1cf0e374c80c5 0004-xdg.patch
+ce6be003220267bac5483caf8302b492e1581892bc36d35a61236ebf9f9d766b8bd2159557a1c36256aa85f461797a38bfaae57b12da7a72101b21c0b17ed653 0005-system-wide-fonts.patch
+3647ad5fff6326ba9c75fa98189a08c0909af8d1c2b704c8c62fd9da6603f5162af3176c37daa67eb5896bebe3814bf1fd66b9e93c78cbd9b439e472d0db4b44 0006-ppc64le-enable-arch.patch
+cb01655dd097b68e89b15e6e4b1f6da10c52e8bec681eeef9807ca376283b10cb3da34acc976c790f3c8dea05acbef1ba1967612920a2e4acb3b9da79e251a0d 0007-no-gtk2.patch
+d4ef17600e095b753bcbc4df0078cc025dd235056a8f4946183fc5416e0452bceac020badda60221b98b410261c5aaef72d18e8abc82781257e8075a133908f6 0009-lz4.patch
+7d5642672f42f435e206acd047a20b7e38346ed95548f16c0059913546e4e4f54a58927fccb8c1da8e43b6a691bbce2a9608d0db032774d7874d4800e7202d53 0010-libtgvoip.patch
+216f8fd0deae38d18d92815b84b4a945a2b83231117d5addd0aa9338acf5cb471c29b2fdfb86ca22c237230f61fbeac14f0445379db4daaddd512cf5e546166e 0011-no-static-qt.patch
+30df0fbe5849bbcadb2d28483944f1a5397c056feb0bb4785d481e3e02cad10bb89566b4fb83e0692ca8080963b3d6b817c6ad275bbfebfe74d752a5f5c55c61 0012-ffmpeg.patch
+aaff642634f42ba017ac94a2c2cd7df595d0a304a62f5f46dbec82e2c88c00a8cfd6346b2809013228f47f301aedf94e10e77197eebefa26b6df81267e8b1a64 0013-lz4.patch
+ab6ef737712cbc934a908aabb57332a4d207c223f50f0108668b8c3c9fd07cd840845ef99c0dc18dca2139f476fcb0309f99058af710ffaf1272023d1d2f1ab4 0014-clock_gettime.patch"