From f68ba8c3746ac357a162cbaf6bea171f6a59dd49 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 6 Jul 2019 22:33:09 +1000 Subject: [PATCH] Telegram: bump version --- ...elegram_desktop-1.7.12-libtgvoip.patchset} | 2 +- ...=> telegram_desktop-1.7.12-systemqt.patch} | 0 ...chset => telegram_desktop-1.7.12.patchset} | 186 +++++++++++++++--- ....recipe => telegram_desktop-1.7.12.recipe} | 31 +-- 4 files changed, 173 insertions(+), 46 deletions(-) rename net-im/telegram-desktop/patches/{telegram_desktop-1.7.10-libtgvoip.patchset => telegram_desktop-1.7.12-libtgvoip.patchset} (99%) rename net-im/telegram-desktop/patches/{telegram_desktop-1.7.10-systemqt.patch => telegram_desktop-1.7.12-systemqt.patch} (100%) rename net-im/telegram-desktop/patches/{telegram_desktop-1.7.10.patchset => telegram_desktop-1.7.12.patchset} (95%) rename net-im/telegram-desktop/{telegram_desktop-1.7.10.recipe => telegram_desktop-1.7.12.recipe} (86%) diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.7.10-libtgvoip.patchset b/net-im/telegram-desktop/patches/telegram_desktop-1.7.12-libtgvoip.patchset similarity index 99% rename from net-im/telegram-desktop/patches/telegram_desktop-1.7.10-libtgvoip.patchset rename to net-im/telegram-desktop/patches/telegram_desktop-1.7.12-libtgvoip.patchset index af54a403e..4962eed03 100644 --- a/net-im/telegram-desktop/patches/telegram_desktop-1.7.10-libtgvoip.patchset +++ b/net-im/telegram-desktop/patches/telegram_desktop-1.7.12-libtgvoip.patchset @@ -1,4 +1,4 @@ -From 6c602a7f2dcce50a8ac9db790e22a85158a2d23c Mon Sep 17 00:00:00 2001 +From 9b4f5aa546148062c75e29f82251eb34ab778361 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Mon, 24 Jun 2019 22:45:12 +1000 Subject: Add mediakit support diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.7.10-systemqt.patch b/net-im/telegram-desktop/patches/telegram_desktop-1.7.12-systemqt.patch similarity index 100% rename from net-im/telegram-desktop/patches/telegram_desktop-1.7.10-systemqt.patch rename to net-im/telegram-desktop/patches/telegram_desktop-1.7.12-systemqt.patch diff --git a/net-im/telegram-desktop/patches/telegram_desktop-1.7.10.patchset b/net-im/telegram-desktop/patches/telegram_desktop-1.7.12.patchset similarity index 95% rename from net-im/telegram-desktop/patches/telegram_desktop-1.7.10.patchset rename to net-im/telegram-desktop/patches/telegram_desktop-1.7.12.patchset index bc13c155c..2fc322541 100644 --- a/net-im/telegram-desktop/patches/telegram_desktop-1.7.10.patchset +++ b/net-im/telegram-desktop/patches/telegram_desktop-1.7.12.patchset @@ -1,6 +1,6 @@ -From 1088e1c28d6ee28fc77e772fb5b555f1df199f3f Mon Sep 17 00:00:00 2001 +From 4ac3bdd0d3e21e77669b793df650c4ffe9054772 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Tue, 25 Jun 2019 18:41:38 +1000 +Date: Fri, 5 Jul 2019 20:52:58 +1000 Subject: Add Haiku support @@ -84,7 +84,7 @@ index 786dc49..b1ed887 100644 #include "base/flags.h" diff --git a/Telegram/SourceFiles/base/flat_map_tests.cpp b/Telegram/SourceFiles/base/flat_map_tests.cpp -index 7dad013..1cb7036 100644 +index e1372c4..facee18 100644 --- a/Telegram/SourceFiles/base/flat_map_tests.cpp +++ b/Telegram/SourceFiles/base/flat_map_tests.cpp @@ -5,7 +5,11 @@ the official desktop application for the Telegram messaging service. @@ -185,7 +185,7 @@ index 5d550c5..f676909 100644 } // namespace Core diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp -index 6916e0b..8fdcb39 100644 +index fe025f0..c04f6eb 100644 --- a/Telegram/SourceFiles/core/update_checker.cpp +++ b/Telegram/SourceFiles/core/update_checker.cpp @@ -501,6 +501,8 @@ bool ParseCommonMap( @@ -2091,10 +2091,10 @@ index 692f4b4..a40f830 100644 #include "platform/win/notifications_manager_win.h" #endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN diff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h -index 5700cc9..ad1206b 100644 +index 330ba48..d58b688 100644 --- a/Telegram/SourceFiles/platform/platform_specific.h +++ b/Telegram/SourceFiles/platform/platform_specific.h -@@ -57,6 +57,8 @@ void finish(); +@@ -60,6 +60,8 @@ void finish(); #include "platform/mac/specific_mac.h" #elif defined Q_OS_LINUX // Q_OS_MAC #include "platform/linux/specific_linux.h" @@ -2210,6 +2210,21 @@ index 4d522a9..1ca7dd0 100644 return "tests_storage"; #endif // Q_OS_WIN }(); +diff --git a/Telegram/SourceFiles/ui/style/style_core_font.cpp b/Telegram/SourceFiles/ui/style/style_core_font.cpp +index 11655ab..ed6db17 100644 +--- a/Telegram/SourceFiles/ui/style/style_core_font.cpp ++++ b/Telegram/SourceFiles/ui/style/style_core_font.cpp +@@ -59,8 +59,8 @@ FontData::FontData(int size, uint32 flags, int family, Font *other) + f.setPixelSize(size); + if (_flags & FontBold) { + f.setBold(true); +- //} else if (fontFamilies[family] == "Open Sans Semibold") { +- // f.setWeight(QFont::DemiBold); ++ } else if (fontFamilies[family] == "Open Sans Semibold") { ++ f.setWeight(QFont::DemiBold); + } + f.setItalic(_flags & FontItalic); + f.setUnderline(_flags & FontUnderline); diff --git a/Telegram/ThirdParty/minizip/ioapi.c b/Telegram/ThirdParty/minizip/ioapi.c index 7f5c191..649255c 100644 --- a/Telegram/ThirdParty/minizip/ioapi.c @@ -2224,7 +2239,7 @@ index 7f5c191..649255c 100644 #define FOPEN_FUNC(filename, mode) fopen(filename, mode) #define FTELLO_FUNC(stream) ftello(stream) diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp -index 2333bca..ba2675b 100644 +index 7fbc349..c09d5a9 100644 --- a/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp @@ -61,6 +61,7 @@ @@ -2235,7 +2250,7 @@ index 2333bca..ba2675b 100644 'openssl.gypi', 'qt.gypi', 'qt_moc.gypi', -@@ -96,7 +97,7 @@ +@@ -97,7 +98,7 @@ '<(src_loc)', '<(SHARED_INTERMEDIATE_DIR)', '<(emoji_suggestions_loc)', @@ -2333,18 +2348,18 @@ index f73aabd..07c6b35 100644 '<(submodules_loc)/variant/include', '<(submodules_loc)/crl/src', diff --git a/Telegram/gyp/lib_lottie.gyp b/Telegram/gyp/lib_lottie.gyp -index 6ca841f..f797144 100644 +index ada149e..b96bd98 100644 --- a/Telegram/gyp/lib_lottie.gyp +++ b/Telegram/gyp/lib_lottie.gyp -@@ -43,7 +43,7 @@ +@@ -46,7 +46,7 @@ 'include_dirs': [ '<(src_loc)', '<(SHARED_INTERMEDIATE_DIR)', - '<(libs_loc)/range-v3/include', + '<(submodules_loc)/range/include', '<(libs_loc)/zlib', - '<(lottie_loc)', - '<(lottie_loc)/bodymovin', + '<(libs_loc)/ffmpeg', + '<(rlottie_loc)', diff --git a/Telegram/gyp/lib_storage.gyp b/Telegram/gyp/lib_storage.gyp index d72f4b5..e8740b9 100644 --- a/Telegram/gyp/lib_storage.gyp @@ -2664,10 +2679,10 @@ index d9147d6..16c9d3f 100644 'variables': { 'qrc_files': [ diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt -index a6c82cb..33be044 100644 +index 8e92e72..78b8477 100644 --- a/Telegram/gyp/telegram_sources.txt +++ b/Telegram/gyp/telegram_sources.txt -@@ -588,6 +588,20 @@ +@@ -587,6 +587,20 @@ <(src_loc)/platform/linux/notifications_manager_linux.h <(src_loc)/platform/linux/specific_linux.cpp <(src_loc)/platform/linux/specific_linux.h @@ -2710,27 +2725,134 @@ index bd46332..d85a403 100644 2.21.0 -From 4e3352f235a57fdbca3c807de4ce92af9fbdc5c9 Mon Sep 17 00:00:00 2001 +From e98a6bd4bb76fb5b887f6ddff825449d496b434f Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Tue, 25 Jun 2019 23:15:28 +1000 -Subject: Fix for bold font +Date: Sat, 6 Jul 2019 22:26:25 +1000 +Subject: Disable static Qt for Haiku -diff --git a/Telegram/SourceFiles/ui/style/style_core_font.cpp b/Telegram/SourceFiles/ui/style/style_core_font.cpp -index 060b0ab..5ed9f6f 100644 ---- a/Telegram/SourceFiles/ui/style/style_core_font.cpp -+++ b/Telegram/SourceFiles/ui/style/style_core_font.cpp -@@ -59,8 +59,8 @@ FontData::FontData(int size, uint32 flags, int family, Font *other) - f.setPixelSize(size); - if (_flags & FontBold) { - f.setBold(true); -- //} else if (fontFamilies[family] == "Open Sans Semibold") { -- // f.setWeight(QFont::DemiBold); -+ } else if (fontFamilies[family] == "Open Sans Semibold") { -+ f.setWeight(QFont::DemiBold); - } - f.setItalic(_flags & FontItalic); - f.setUnderline(_flags & FontUnderline); +diff --git a/Telegram/gyp/lib_rlottie.gyp b/Telegram/gyp/lib_rlottie.gyp +index 4d3a7ab..eae76f9 100644 +--- a/Telegram/gyp/lib_rlottie.gyp ++++ b/Telegram/gyp/lib_rlottie.gyp +@@ -110,7 +110,7 @@ + '<(rlottie_src)/vector/vstackallocator.h', + '<(rlottie_src)/vector/vtaskqueue.h', + ], +- 'conditions': [[ 'not build_win', { ++ 'conditions': [[ 'not build_win and not build_haiku', { + 'defines': [ + 'RLOTTIE_WITH_STATIC_QT', + ] +-- +2.21.0 + + +From 47d47c353658f84b5b9c0a4e5b5540d327755173 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 6 Jul 2019 22:27:19 +1000 +Subject: Add UseMainQueueGeneric function for Haiku backend + + +diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.h b/Telegram/SourceFiles/platform/haiku/specific_haiku.h +index 6788e70..3995ab2 100644 +--- a/Telegram/SourceFiles/platform/haiku/specific_haiku.h ++++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.h +@@ -45,6 +45,10 @@ inline std::optional LastUserInputTime() { + return std::nullopt; + } + ++inline constexpr bool UseMainQueueGeneric() { ++ return true; ++} ++ + } // namespace Platform + + inline QString psServerPrefix() { +-- +2.21.0 + + +From 29943f5a358dd30a074c9bf0b979f6025a3922da Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 6 Jul 2019 22:27:58 +1000 +Subject: Fixes for Qt 5.13 + + +diff --git a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp +index 5d0e509..df3e17c 100644 +--- a/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp ++++ b/Telegram/SourceFiles/ffmpeg/ffmpeg_utility.cpp +@@ -355,64 +355,14 @@ QImage CreateFrameStorage(QSize size) { + } + + void UnPremultiply(QImage &to, const QImage &from) { +- // This creates QImage::Format_ARGB32_Premultiplied, but we use it +- // as an image in QImage::Format_ARGB32 format. +- if (!GoodStorageForFrame(to, from.size())) { +- to = CreateFrameStorage(from.size()); +- } +- +- const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; +- const auto convert = layout->convertFromARGB32PM; +- const auto fromPerLine = from.bytesPerLine(); +- const auto toPerLine = to.bytesPerLine(); +- const auto width = from.width(); +- if (fromPerLine != width * 4 || toPerLine != width * 4) { +- auto fromBytes = from.bits(); +- auto toBytes = to.bits(); +- for (auto i = 0; i != to.height(); ++i) { +- convert( +- reinterpret_cast(toBytes), +- reinterpret_cast(fromBytes), +- width, +- layout, +- nullptr); +- fromBytes += fromPerLine; +- toBytes += toPerLine; +- } +- } else { +- convert( +- reinterpret_cast(to.bits()), +- reinterpret_cast(from.bits()), +- from.width() * from.height(), +- layout, +- nullptr); +- } ++ to = from.convertToFormat(QImage::Format_ARGB32); + } + + void PremultiplyInplace(QImage &image) { +- const auto layout = &qPixelLayouts[QImage::Format_ARGB32]; +- const auto convert = layout->convertToARGB32PM; +- const auto perLine = image.bytesPerLine(); +- const auto width = image.width(); +- if (perLine != width * 4) { +- auto bytes = image.bits(); +- for (auto i = 0; i != image.height(); ++i) { +- convert( +- reinterpret_cast(bytes), +- reinterpret_cast(bytes), +- width, +- layout, +- nullptr); +- bytes += perLine; +- } +- } else { +- convert( +- reinterpret_cast(image.bits()), +- reinterpret_cast(image.bits()), +- image.width() * image.height(), +- layout, +- nullptr); +- } ++ QImage temp(image.size(), QImage::Format_ARGB32); ++ if (image.sizeInBytes() == temp.sizeInBytes()) ++ memcpy(temp.bits(), image.bits(), image.sizeInBytes()); ++ image = temp.convertToFormat(QImage::Format_ARGB32_Premultiplied); + } + + } // namespace FFmpeg -- 2.21.0 diff --git a/net-im/telegram-desktop/telegram_desktop-1.7.10.recipe b/net-im/telegram-desktop/telegram_desktop-1.7.12.recipe similarity index 86% rename from net-im/telegram-desktop/telegram_desktop-1.7.10.recipe rename to net-im/telegram-desktop/telegram_desktop-1.7.12.recipe index 99bd5338a..ca0d05f1d 100644 --- a/net-im/telegram-desktop/telegram_desktop-1.7.10.recipe +++ b/net-im/telegram-desktop/telegram_desktop-1.7.12.recipe @@ -5,7 +5,7 @@ COPYRIGHT="2013-2019 Telegram" LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="https://github.com/telegramdesktop/tdesktop/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="54032b9dd864424eac2a1a95f3f4254666fc99745b90be10195eb10052ed5d67" +CHECKSUM_SHA256="db594ca57bf68745bb00459ddf215222a85a87851492a038c7cf9b919762ed22" SOURCE_FILENAME="tdesktop-$portVersion.tar.gz" SOURCE_DIR="tdesktop-$portVersion" srcGitRev_2="0e92a22746d15157bea46faddd61b79e9964275a" @@ -24,9 +24,9 @@ srcGitRev_5="5ca44b68721833ae3731802ed99af67c6f38a53a" SOURCE_URI_5="https://github.com/philsquared/Catch/archive/$srcGitRev_5.tar.gz" CHECKSUM_SHA256_5="d24e6d9df2b8aa5739d3b9077c6b0ff0ef4d5ef8acc52c3a57e32893854d8d18" SOURCE_FILENAME_5="Catch-$srcGitRev_5.tar.gz" -srcGitRev_6="d259aebc11df52cb6ff8c738580dc4d8f245d681" +srcGitRev_6="9ea870038a2a667add7f621be6252db909068386" SOURCE_URI_6="https://github.com/telegramdesktop/crl/archive/$srcGitRev_6.tar.gz" -CHECKSUM_SHA256_6="f5ea3aeeda0290a44ac49b6300b033d171e67a5b27039fea2f8ae0cb3fc71253" +CHECKSUM_SHA256_6="5844fbd5647c1605d8f7b1391e583e484054884cc1a71681e3abeb153b8ec5b4" SOURCE_FILENAME_6="crl-$srcGitRev_6.tar.gz" srcGitRev_7="4b10be9cbadd7d0880437f48f875185589fd86d3" SOURCE_URI_7="https://github.com/ericniebler/range-v3/archive/$srcGitRev_7.tar.gz" @@ -36,12 +36,16 @@ srcGitRev_8="7cc9639699f64b750c0b82333dced9ea77e8436e" SOURCE_URI_8="https://github.com/Cyan4973/xxHash/archive/$srcGitRev_8.tar.gz" CHECKSUM_SHA256_8="0d1e2b4ae15f98acc49084e23ba94853dba2b0f654865ecedb1072b3959421bf" SOURCE_FILENAME_8="xxHash-$srcGitRev_8.tar.gz" -srcGitRev_9="eeeb4edb2a087c3f8175dafafcad330864d3efc0" -SOURCE_URI_9="https://github.com/telegramdesktop/qtlottie/archive/$srcGitRev_9.tar.gz" -CHECKSUM_SHA256_9="7084bceb5644a3bb07266d03a645bb66feba19eb840616e3db395036d845c0bb" -SOURCE_FILENAME_9="qtlottie-$srcGitRev_9.tar.gz" -SOURCE_URI_10="https://salsa.debian.org/debian/telegram-desktop/raw/debian/master/debian/rules#noarchive" -CHECKSUM_SHA256_10="86382a56ef7163eedbfae7e4daf491e9d3e7a8811ff2c769e6d7c143def7727f" +srcGitRev_9="8983925c3f9aaf82eb061b2e86c5bd1e22705a73" +SOURCE_URI_9="https://github.com/john-preston/rlottie/archive/$srcGitRev_9.zip" +CHECKSUM_SHA256_9="d7073fb16e090b169b2c0191e2c042558575ac70a05822ec6f59a2ffdda55da0" +SOURCE_FILENAME_9="rlottie-$srcGitRev_9.zip" +srcGitRev_10="9a2a9f2d0f38a39c5ec9b329042ca5f060b058e0" +SOURCE_URI_10="https://github.com/lz4/lz4/archive/$srcGitRev_10.tar.gz" +CHECKSUM_SHA256_10="fb17b28934ea7f85bd381dd183d765973f7e90a7e2ebc2415af61fe6848741cc" +SOURCE_FILENAME_10="lz4-$srcGitRev_10.tar.gz" +SOURCE_URI_11="https://salsa.debian.org/debian/telegram-desktop/raw/debian/master/debian/rules#noarchive" +CHECKSUM_SHA256_11="86382a56ef7163eedbfae7e4daf491e9d3e7a8811ff2c769e6d7c143def7727f" PATCHES=" telegram_desktop-$portVersion-systemqt.patch @@ -126,7 +130,7 @@ PATCH() BUILD() { # link submodules - rm -rf Telegram/ThirdParty/{libtgvoip,variant,GSL,Catch,crl,range,xxHash,qtlottie} + rm -rf Telegram/ThirdParty/{libtgvoip,variant,GSL,Catch,crl,range,xxHash,rlottie,lz4} ln -sfn $sourceDir2/libtgvoip-$srcGitRev_2 Telegram/ThirdParty/libtgvoip ln -sfn $sourceDir3/variant-$srcGitRev_3 Telegram/ThirdParty/variant ln -sfn $sourceDir4/GSL-$srcGitRev_4 Telegram/ThirdParty/GSL @@ -134,11 +138,12 @@ BUILD() ln -sfn $sourceDir6/crl-$srcGitRev_6 Telegram/ThirdParty/crl ln -sfn $sourceDir7/range-v3-$srcGitRev_7 Telegram/ThirdParty/range ln -sfn $sourceDir8/xxHash-$srcGitRev_8 Telegram/ThirdParty/xxHash - ln -sfn $sourceDir9/qtlottie-$srcGitRev_9 Telegram/ThirdParty/qtlottie + ln -sfn $sourceDir9/rlottie-$srcGitRev_9 Telegram/ThirdParty/rlottie + ln -sfn $sourceDir10/lz4-$srcGitRev_10 Telegram/ThirdParty/lz4 # get API_ID and API_HASH from Debian - local TELEGRAM_API_ID=`sed -n 's/TELEGRAM_API_ID = \(.*\)/\1/p' < $sourceDir10/rules` - local TELEGRAM_API_HASH=`sed -n 's/TELEGRAM_API_HASH = \(.*\)/\1/p' < $sourceDir10/rules` + local TELEGRAM_API_ID=`sed -n 's/TELEGRAM_API_ID = \(.*\)/\1/p' < $sourceDir11/rules` + local TELEGRAM_API_HASH=`sed -n 's/TELEGRAM_API_HASH = \(.*\)/\1/p' < $sourceDir11/rules` if [ -z $TELEGRAM_API_ID ] || [ -z $TELEGRAM_API_HASH ]; then TELEGRAM_API_ID="17349"