aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-01-02 08:43:41 +0100
committerLeo <thinkabit.ukim@gmail.com>2020-01-02 08:49:55 +0100
commitd5448a5817e5ea7bc288cbf897c1368553bc16ab (patch)
treed91137d17facc6ce1211b9147e18588dcc49caba
parent5711a53f69ae53a67391178e57a36b8891a47cc3 (diff)
downloadaports-d5448a5817e5ea7bc288cbf897c1368553bc16ab.tar.gz
aports-d5448a5817e5ea7bc288cbf897c1368553bc16ab.tar.bz2
aports-d5448a5817e5ea7bc288cbf897c1368553bc16ab.tar.xz
testing/telegram-desktop: use cmake files instead of patches
-rw-r--r--testing/telegram-desktop/APKBUILD53
-rw-r--r--testing/telegram-desktop/breakpad-loc.patch27
-rw-r--r--testing/telegram-desktop/breakpad.cmake7
-rw-r--r--testing/telegram-desktop/ffmpeg.cmake14
-rw-r--r--testing/telegram-desktop/ffmpeg.patch41
-rw-r--r--testing/telegram-desktop/lz4.cmake7
-rw-r--r--testing/telegram-desktop/lz4.patch35
-rw-r--r--testing/telegram-desktop/openal.cmake7
-rw-r--r--testing/telegram-desktop/openal.patch45
-rw-r--r--testing/telegram-desktop/openssl.cmake11
-rw-r--r--testing/telegram-desktop/openssl.patch61
-rw-r--r--testing/telegram-desktop/opus.cmake8
-rw-r--r--testing/telegram-desktop/opus.patch48
-rw-r--r--testing/telegram-desktop/qt.cmake43
-rw-r--r--testing/telegram-desktop/qt.patch245
-rw-r--r--testing/telegram-desktop/range-v3.cmake9
-rw-r--r--testing/telegram-desktop/range-v3.patch24
-rw-r--r--testing/telegram-desktop/zlib.cmake9
-rw-r--r--testing/telegram-desktop/zlib.patch55
19 files changed, 148 insertions, 601 deletions
diff --git a/testing/telegram-desktop/APKBUILD b/testing/telegram-desktop/APKBUILD
index 9acb84229b..3a0cb782a5 100644
--- a/testing/telegram-desktop/APKBUILD
+++ b/testing/telegram-desktop/APKBUILD
@@ -3,12 +3,13 @@
# TODO(Leo): remove pulseaudio dep
pkgname=telegram-desktop
pkgver=1.9.3
-pkgrel=0
+pkgrel=1
_breakpad_commit=dbd454dbe47e584571388fc3533193416bdce67f
pkgdesc="Telegram Desktop messaging app"
options="!check" # Requires Catch2 to be packaged.
url="https://desktop.telegram.org/"
arch="all !s390x" # Need support on lib_base
+arch="$arch !armhf !armv7 !x86" # Not enough memory to link
license="GPL-3.0-or-later WITH OpenSSL"
depends="qt5-qtimageformats libappindicator"
makedepends="
@@ -30,8 +31,8 @@ makedepends="
libexecinfo-dev
rapidjson-dev
lz4-dev
- pulseaudio-dev
qtchooser
+ pulseaudio-dev
libdbusmenu-glib-dev
libappindicator-dev
xxhash-dev
@@ -43,20 +44,20 @@ source="
https://github.com/telegramdesktop/tdesktop/releases/download/v$pkgver/tdesktop-$pkgver-full.tar.gz
breakpad-$_breakpad_commit.tar.gz::https://github.com/google/breakpad/archive/$_breakpad_commit.tar.gz
xdg.patch
- lz4.patch
- zlib.patch
- opus.patch
- openal.patch
- openssl.patch
- ffmpeg.patch
- qt.patch
- range-v3.patch
+ lz4.cmake
+ zlib.cmake
+ opus.cmake
+ openal.cmake
+ openssl.cmake
+ ffmpeg.cmake
+ qt.cmake
+ range-v3.cmake
+ breakpad.cmake
musl-basename.patch
updater.patch
default-shared.patch
exotic-arch-compat.patch
werror-o2.patch
- breakpad-loc.patch
qt_functions.patch
ppc.patch
qt-plugin-path.patch
@@ -70,8 +71,20 @@ prepare() {
mv "$srcdir"/breakpad-$_breakpad_commit "$builddir"/Telegram/ThirdParty/breakpad
+ # Copy our file over
cp -L "$srcdir"/qt_functions.cpp "$builddir"/Telegram/SourceFiles
+ # Install our cmake files
+ mv "$srcdir"/lz4.cmake "$builddir"/cmake/external/lz4/CMakeLists.txt
+ mv "$srcdir"/zlib.cmake "$builddir"/cmake/external/zlib/CMakeLists.txt
+ mv "$srcdir"/opus.cmake "$builddir"/cmake/external/opus/CMakeLists.txt
+ mv "$srcdir"/openal.cmake "$builddir"/cmake/external/openal/CMakeLists.txt
+ mv "$srcdir"/openssl.cmake "$builddir"/cmake/external/openssl/CMakeLists.txt
+ mv "$srcdir"/ffmpeg.cmake "$builddir"/cmake/external/ffmpeg/CMakeLists.txt
+ mv "$srcdir"/qt.cmake "$builddir"/cmake/external/qt/CMakeLists.txt
+ mv "$srcdir"/range-v3.cmake "$builddir"/cmake/external/ranges/CMakeLists.txt
+ mv "$srcdir"/breakpad.cmake "$builddir"/cmake/external/crash_reports/breakpad/CMakeLists.txt
+
default_prepare
mkdir "$builddir"/build
@@ -123,20 +136,20 @@ package() {
sha512sums="af8e5d2c74d0b990958edd75a01f40b70bc21c0f69074acfb943f44fdb1f1e84465b461765a1a584513e54ab30045817b42b6839ad16cb4c1043fda89ea600f7 tdesktop-1.9.3-full.tar.gz
af8c9e8cf151b6aaa94a11b1f3f4d73c117fa25d7ba3b603c25170278bb0a99a9da10facc3b140fa0e3c2c0747a1f5bdcfb1120dfd48913a0d84f78701abb9fc breakpad-dbd454dbe47e584571388fc3533193416bdce67f.tar.gz
8de8c0508177da5fcac4f2dcee4d8baef4b99f74f1dca296567bc3689a6bd17a47c1c945df504abc8811b82a687010d0709503c7c32e47d2ebb1cf0e374c80c5 xdg.patch
-438d8008a3513a182ba21aa2f008ee889ff5de24e0a722ea4d690ddba98fba4e781456095801cb4f8eebbce345e86d7a5fdaf1aa8e1f7697b77f1f87b4851d91 lz4.patch
-c814f4b944c210cac34964d4261fc838fd3891892cb57d9d9c8ed09bbb317e8e8be9d635b73f720bd9a99cbb71c896b052da4851cec8e4e28ec25b586f4bb152 zlib.patch
-f8a22d356dccaf9bfcca5566ecd90c9c6db1566af1f51878cd6239d4b0c893f3c2535e2144f69dd3e19744120b417ebc744a02de185de99e9ef12599de150414 opus.patch
-0f714a1c0f0b2b83c39bd699f0b7995ee1bccd9bdf0f5b401bc92ff722837d0f500eb3a410b881ca7e3656256ee1f930c6f7a020e54119045c0539e377b8d63d openal.patch
-f808d3c3670415b75b9569276f51f5464ced5146535104826d5736f5febabd1c7587181bb30f6876ae753618fbffa3bf5013ecd4a6e2dadd9cc4ca6ee1957215 openssl.patch
-b5ed0d2697491c1008431b596997b7c9b273772efae603d99c8539d8a678e339f9f8e01f63533ac3474c7e3a82619037a33bc25a760cf2204887caca4c521412 ffmpeg.patch
-48a6460c24f6bda5b492d26fbff99f7a9ff953e43e856e2669b25cbd6a942ae009d4dbd07462e7fdbd431662bfbd6fd8414d052b78a93bb2cd02a912d88012c7 qt.patch
-1852ac9326d73055118ab5cbbd3bf2af1d72523d12913a6378b797551d405d0f397b05d1918494a741864614c3f605bff8a5f595e8c286e46db9696b3220103e range-v3.patch
+15e7328bdfb1ddae0357d30ded5448fb785f3ef0e148f47df8e66d5716999afb73bbc1caed21c5babd283db40017d1939066ae4d7d5989053cd41088ee7d5c91 lz4.cmake
+f53c7194e62e22e0e197599ceffb37f1d742da83402257503c8f529e00187ed59d241d7880aa410ddbeac0540dc1ec6809700cf2c94c0c41db73809c712b1624 zlib.cmake
+0149ed6db6d92ed933f83ca385d2a06d4d6a960a2768134b3967a5e0a9bd58af83ac93fe45b3033e3da6767f90fea26037f6db17ba219dbe09f8942ba4903a84 opus.cmake
+48a6f5de0a03357d5f13a065c06b279021e8ebb872ea96d59f5ccb2bc8efd5e1f2d2850dddc22cdc0da0ac53cf0eb407ca0f53eebba8f68cf51224bb624c1b23 openal.cmake
+f3c13e996b8456a79a418380c9e78c8d871f53c9da6dbe030ebb25817f232c7b511255a6c618aabc6afe6aba3b636b1058986d8fede9d06ad354bf6c1e46bb9f openssl.cmake
+c0afecd5d75d385e4e3d3d3e1273b12afebaaec38375a72edb17cb4c17666b3c45301cb0f06806a264798909ffd15517b7ed4d698cb00aa5c2d10bd6bd6ad12a ffmpeg.cmake
+c15a8da42d5248ee48fd3663913c010476cedd0fde86c6b133770c41ee6cdab33637732ac24bcc34d9b3a9e2a202147eed08fbfa7bffcf0ca4a2681f519a52bb qt.cmake
+f99017a119efb1b534cece9580d2b6cf4d88c0c3285eac8ac826008eec25a4fe43c846a9e1523f5af2aec57c13cf6abc549cdd8242ce266e43c3e61928e61d2a range-v3.cmake
+bcb1ed7ecc7ca5c0282337fad9c341d7468537d0f1ae2dc296d63c34508c9768cd7120a135fea27a752a9e8c9e6eaa223fa661f488c7f8a565d9cc2b2eab7be4 breakpad.cmake
6062602d02e20917c06f17d12bb21bd4a94b23c2a6744a8a05c2c93d41747ba413e110edd344ecd130c28ebaf997ae46b347d239e69f5856ead42318bd5b01cd musl-basename.patch
3182d2da588fd50c771047550e0d4805cce404836ecc6a4f9ccc95b21c6915391ab3f4d75cd745737836d6c483eac84974659b97e9514384efd032ef33044125 updater.patch
4fb0f0a8c0a57436a10a79d7d1a45c1045d3ac30b9437e65025a4867400b52e52b38c61d447b1392bdf2bd6b241ed25a2c73851c67e08b9198a922c22a316345 default-shared.patch
b40c9948bab21253d54cbf6c609f82f97c80b064ddc2a5b8347b6322e26836c55a9c3eaab429a46f058bac1c7a7f57fd63979a318af13063ce9039fe29bcfd14 exotic-arch-compat.patch
d321da9c960641cd7d8159a0f076670b366afb847607a9f05525d17e3751ddcae2f3fa8b0d5f0f4780f7831033f48ce32373104ab35f8d2762e31e1097b20188 werror-o2.patch
-838c5891084344b06fc1b140928e0fed804a8acbb8374147418094d164b5f42d84f72a0fd0941844366f5949ed73301915a78d09de7c309d128852f44cbcd8a9 breakpad-loc.patch
835f5735d6fc52ad0a3b99f21a0a06cb310f21981a6036f4c9b76312eb947af7fa065ef7f530bcd63ee9271d293778cc8ddf098764c2878a8500aa04ee05c2b1 qt_functions.patch
9a3e491e2b2a9ea3f15da3766a2d743bafead7ae1e6a6ca3e6e9c7352dc268221311acd73664e5452622e2bc91cc88a2a7d3b4ebe6634b4da74c54b3bde0bb7f ppc.patch
183767e9a291dd605797cdc46382d8cb6a73a342348a40df7d52864ea27b3aa8709808cd51c46f5e611c247229ed336cb569bed1185c4c97b03171b56bbe5653 qt-plugin-path.patch
diff --git a/testing/telegram-desktop/breakpad-loc.patch b/testing/telegram-desktop/breakpad-loc.patch
deleted file mode 100644
index 56281e6e26..0000000000
--- a/testing/telegram-desktop/breakpad-loc.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git a/cmake/external/crash_reports/breakpad/CMakeLists.txt b/cmake/external/crash_reports/breakpad/CMakeLists.txt
-index c09243d..89d59f8 100644
---- a/cmake/external/crash_reports/breakpad/CMakeLists.txt
-+++ b/cmake/external/crash_reports/breakpad/CMakeLists.txt
-@@ -9,21 +9,5 @@ add_library(desktop-app::external_breakpad ALIAS external_breakpad)
-
- target_include_directories(external_breakpad SYSTEM
- INTERFACE
-- ${libs_loc}/breakpad/src
-+ ${third_party_loc}/breakpad/src
- )
--
--set(breakpad_lib_loc ${libs_loc}/breakpad/src/out/$<IF:$<CONFIG:Debug>,Debug,Release>/obj/client)
--
--if (WIN32)
-- target_link_libraries(external_breakpad
-- INTERFACE
-- ${breakpad_lib_loc}/windows/common.lib
-- ${breakpad_lib_loc}/windows/handler/exception_handler.lib
-- ${breakpad_lib_loc}/windows/crash_generation/crash_generation_client.lib
-- )
--elseif (LINUX)
-- target_link_static_libraries(external_breakpad
-- INTERFACE
-- breakpad_client
-- )
--endif()
diff --git a/testing/telegram-desktop/breakpad.cmake b/testing/telegram-desktop/breakpad.cmake
new file mode 100644
index 0000000000..007943d1a3
--- /dev/null
+++ b/testing/telegram-desktop/breakpad.cmake
@@ -0,0 +1,7 @@
+add_library(external_breakpad INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_breakpad ALIAS external_breakpad)
+
+target_include_directories(external_breakpad SYSTEM
+INTERFACE
+ ${third_party_loc}/breakpad/src
+)
diff --git a/testing/telegram-desktop/ffmpeg.cmake b/testing/telegram-desktop/ffmpeg.cmake
new file mode 100644
index 0000000000..3f97fcb698
--- /dev/null
+++ b/testing/telegram-desktop/ffmpeg.cmake
@@ -0,0 +1,14 @@
+# This file is part of Desktop App Toolkit,
+# a set of libraries for developing nice desktop applications.
+#
+# For license and copyright information please follow this link:
+# https://github.com/desktop-app/legal/blob/master/LEGAL
+
+add_library(external_ffmpeg INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_ffmpeg ALIAS external_ffmpeg)
+
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(FFMPEG REQUIRED libavcodec libavformat libavutil libswresample libswscale)
+
+target_include_directories(external_ffmpeg SYSTEM INTERFACE ${FFMPEG_INCLUDE_DIR})
+target_link_libraries(external_ffmpeg INTERFACE ${FFMPEG_LIBRARIES})
diff --git a/testing/telegram-desktop/ffmpeg.patch b/testing/telegram-desktop/ffmpeg.patch
deleted file mode 100644
index c106571b2d..0000000000
--- a/testing/telegram-desktop/ffmpeg.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/cmake/external/ffmpeg/CMakeLists.txt b/cmake/external/ffmpeg/CMakeLists.txt
-index 014fb06..84a3011 100644
---- a/cmake/external/ffmpeg/CMakeLists.txt
-+++ b/cmake/external/ffmpeg/CMakeLists.txt
-@@ -7,32 +7,8 @@
- add_library(external_ffmpeg INTERFACE IMPORTED GLOBAL)
- add_library(desktop-app::external_ffmpeg ALIAS external_ffmpeg)
-
--target_include_directories(external_ffmpeg SYSTEM
--INTERFACE
-- ${libs_loc}/ffmpeg
--)
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(FFMPEG REQUIRED libavcodec libavformat libavutil libswresample libswscale)
-
--set(ffmpeg_lib_loc ${libs_loc}/ffmpeg)
--
--target_link_libraries(external_ffmpeg
--INTERFACE
-- ${ffmpeg_lib_loc}/libavformat/libavformat.a
-- ${ffmpeg_lib_loc}/libavcodec/libavcodec.a
-- ${ffmpeg_lib_loc}/libswresample/libswresample.a
-- ${ffmpeg_lib_loc}/libswscale/libswscale.a
-- ${ffmpeg_lib_loc}/libavutil/libavutil.a
--)
--if (LINUX)
-- target_link_static_libraries(external_ffmpeg
-- INTERFACE
-- va-x11
-- va-drm
-- va
-- vdpau
-- drm
-- Xi
-- Xext
-- Xfixes
-- Xrender
-- )
--endif()
-+target_include_directories(external_ffmpeg SYSTEM INTERFACE ${FFMPEG_INCLUDE_DIR})
-+target_link_libraries(external_ffmpeg INTERFACE ${FFMPEG_LIBRARIES})
diff --git a/testing/telegram-desktop/lz4.cmake b/testing/telegram-desktop/lz4.cmake
new file mode 100644
index 0000000000..28f36dcc0f
--- /dev/null
+++ b/testing/telegram-desktop/lz4.cmake
@@ -0,0 +1,7 @@
+add_library(external_lz4 INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_lz4 ALIAS external_lz4)
+
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(LZ4 REQUIRED liblz4)
+
+target_link_libraries(external_lz4 INTERFACE ${LZ4_LIBRARIES})
diff --git a/testing/telegram-desktop/lz4.patch b/testing/telegram-desktop/lz4.patch
deleted file mode 100644
index dd7ad977a6..0000000000
--- a/testing/telegram-desktop/lz4.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/cmake/external/lz4/CMakeLists.txt b/cmake/external/lz4/CMakeLists.txt
-index 49821af..d7bd1d7 100644
---- a/cmake/external/lz4/CMakeLists.txt
-+++ b/cmake/external/lz4/CMakeLists.txt
-@@ -4,26 +4,10 @@
- # For license and copyright information please follow this link:
- # https://github.com/desktop-app/legal/blob/master/LEGAL
-
--add_library(external_lz4 OBJECT)
-+add_library(external_lz4 INTERFACE IMPORTED GLOBAL)
- add_library(desktop-app::external_lz4 ALIAS external_lz4)
--init_target(external_lz4 "(external)")
-
--set(lz4_loc ${third_party_loc}/lz4/lib)
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(LZ4 REQUIRED liblz4)
-
--target_sources(external_lz4
--PRIVATE
-- ${lz4_loc}/lz4.c
-- ${lz4_loc}/lz4.h
-- ${lz4_loc}/lz4frame.c
-- ${lz4_loc}/lz4frame.h
-- ${lz4_loc}/lz4frame_static.h
-- ${lz4_loc}/lz4hc.c
-- ${lz4_loc}/lz4hc.h
-- ${lz4_loc}/xxhash.c
-- ${lz4_loc}/xxhash.h
--)
--
--target_include_directories(external_lz4
--PUBLIC
-- ${lz4_loc}
--)
-+target_link_libraries(external_lz4 INTERFACE ${LZ4_LIBRARIES})
diff --git a/testing/telegram-desktop/openal.cmake b/testing/telegram-desktop/openal.cmake
new file mode 100644
index 0000000000..c598e1d5ca
--- /dev/null
+++ b/testing/telegram-desktop/openal.cmake
@@ -0,0 +1,7 @@
+add_library(external_openal INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_openal ALIAS external_openal)
+
+find_package(OpenAL REQUIRED)
+
+target_include_directories(external_openal SYSTEM INTERFACE ${OPENAL_INCLUDE_DIR})
+target_link_libraries(external_openal INTERFACE ${OPENAL_LIBRARY})
diff --git a/testing/telegram-desktop/openal.patch b/testing/telegram-desktop/openal.patch
deleted file mode 100644
index 000cec8803..0000000000
--- a/testing/telegram-desktop/openal.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff --git a/cmake/external/openal/CMakeLists.txt b/cmake/external/openal/CMakeLists.txt
-index e2e4992..d047e96 100644
---- a/cmake/external/openal/CMakeLists.txt
-+++ b/cmake/external/openal/CMakeLists.txt
-@@ -7,37 +7,7 @@
- add_library(external_openal INTERFACE IMPORTED GLOBAL)
- add_library(desktop-app::external_openal ALIAS external_openal)
-
--if (WIN32)
-- target_include_directories(external_openal SYSTEM
-- INTERFACE
-- ${libs_loc}/openal-soft/include
-- )
-- target_link_libraries(external_openal
-- INTERFACE
-- ${libs_loc}/openal-soft/build/$<IF:$<CONFIG:Debug>,Debug,Release>/OpenAL32.lib
-- )
--elseif(APPLE AND NOT build_osx)
-- target_include_directories(external_openal SYSTEM
-- INTERFACE
-- /usr/local/macos/include
-- )
-- target_link_libraries(external_openal
-- INTERFACE
-- /usr/local/macos/lib/libopenal.a
-- )
--else()
-- target_include_directories(external_openal SYSTEM
-- INTERFACE
-- /usr/local/include
-- )
-- target_link_static_libraries(external_openal
-- INTERFACE
-- openal
-- )
--endif()
-+find_package(OpenAL REQUIRED)
-
--target_compile_definitions(external_openal
--INTERFACE
-- AL_LIBTYPE_STATIC
-- AL_ALEXT_PROTOTYPES
--)
-+target_include_directories(external_openal SYSTEM INTERFACE ${OPENAL_INCLUDE_DIR})
-+target_link_libraries(external_openal INTERFACE ${OPENAL_LIBRARY})
diff --git a/testing/telegram-desktop/openssl.cmake b/testing/telegram-desktop/openssl.cmake
new file mode 100644
index 0000000000..44235645c9
--- /dev/null
+++ b/testing/telegram-desktop/openssl.cmake
@@ -0,0 +1,11 @@
+add_library(external_openssl INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_openssl ALIAS external_openssl)
+
+find_package(OpenSSL REQUIRED)
+
+target_include_directories(external_openssl SYSTEM INTERFACE ${OpenSSL_INCLUDE_DIR})
+target_link_libraries(external_openssl
+INTERFACE
+ OpenSSL::Crypto
+ OpenSSL::SSL
+)
diff --git a/testing/telegram-desktop/openssl.patch b/testing/telegram-desktop/openssl.patch
deleted file mode 100644
index a85090db01..0000000000
--- a/testing/telegram-desktop/openssl.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff --git a/cmake/external/openssl/CMakeLists.txt b/cmake/external/openssl/CMakeLists.txt
-index bcbcbfa..4cd7b55 100644
---- a/cmake/external/openssl/CMakeLists.txt
-+++ b/cmake/external/openssl/CMakeLists.txt
-@@ -7,52 +7,12 @@
- add_library(external_openssl INTERFACE IMPORTED GLOBAL)
- add_library(desktop-app::external_openssl ALIAS external_openssl)
-
--if (LINUX)
-- target_include_directories(external_openssl SYSTEM
-- INTERFACE
-- /usr/local/desktop-app/openssl-1.1.1/include
-- )
--elseif (NOT APPLE OR NOT build_osx)
-- target_include_directories(external_openssl SYSTEM
-- INTERFACE
-- ${libs_loc}/openssl_1_1_1/include
-- )
--else()
-- target_include_directories(external_openssl SYSTEM
-- INTERFACE
-- ${libs_loc}/openssl/include
-- )
--endif()
--
--if (WIN32)
-- set(openssl_lib_ext lib)
-- set(openssl_lib_loc ${libs_loc}/openssl_1_1_1/out32$<$<CONFIG:Debug>:.dbg>)
--else()
-- set(openssl_lib_ext a)
-- if (APPLE)
-- if (NOT build_osx)
-- set(openssl_lib_loc ${libs_loc}/openssl_1_1_1)
-- else()
-- set(openssl_lib_loc ${libs_loc}/openssl)
-- endif()
-- else()
-- set(openssl_lib_loc /usr/local/desktop-app/openssl-1.1.1/lib)
-- endif()
--endif()
-+find_package(OpenSSL REQUIRED)
-
-+target_include_directories(external_openssl SYSTEM INTERFACE ${OpenSSL_INCLUDE_DIR})
- target_link_libraries(external_openssl
- INTERFACE
-- ${openssl_lib_loc}/libssl.${openssl_lib_ext}
-- ${openssl_lib_loc}/libcrypto.${openssl_lib_ext}
-+ OpenSSL::Crypto
-+ OpenSSL::SSL
- )
-
--if (LINUX)
-- if (DESKTOP_APP_USE_GLIBC_WRAPS)
-- target_link_libraries(external_openssl
-- INTERFACE
-- desktop-app::linux_glibc_wraps
-- $<TARGET_FILE:desktop-app::linux_glibc_wraps>
-- )
-- endif()
-- target_link_libraries(external_openssl INTERFACE pthread)
--endif()
diff --git a/testing/telegram-desktop/opus.cmake b/testing/telegram-desktop/opus.cmake
new file mode 100644
index 0000000000..5044239970
--- /dev/null
+++ b/testing/telegram-desktop/opus.cmake
@@ -0,0 +1,8 @@
+add_library(external_opus INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_opus ALIAS external_opus)
+
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(OPUS REQUIRED opus)
+
+target_include_directories(external_opus SYSTEM INTERFACE ${OPUS_INCLUDE_DIRS})
+target_link_libraries(external_opus INTERFACE ${OPUS_LIBRARIES})
diff --git a/testing/telegram-desktop/opus.patch b/testing/telegram-desktop/opus.patch
deleted file mode 100644
index af6068471a..0000000000
--- a/testing/telegram-desktop/opus.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff --git a/cmake/external/opus/CMakeLists.txt b/cmake/external/opus/CMakeLists.txt
-index 00c2508..35c029a 100644
---- a/cmake/external/opus/CMakeLists.txt
-+++ b/cmake/external/opus/CMakeLists.txt
-@@ -7,39 +7,8 @@
- add_library(external_opus INTERFACE IMPORTED GLOBAL)
- add_library(desktop-app::external_opus ALIAS external_opus)
-
--target_include_directories(external_opus SYSTEM
--INTERFACE
-- ${libs_loc}/opus/include
--)
-+find_package(PkgConfig REQUIRED)
-+pkg_check_modules(OPUS REQUIRED opus)
-
--if (WIN32)
-- set(opus_lib_loc ${libs_loc}/opus/win32/VS2015/Win32/$<IF:$<CONFIG:Debug>,Debug,Release>)
--
-- target_link_libraries(external_opus
-- INTERFACE
-- ${opus_lib_loc}/opus.lib
-- )
--elseif (APPLE AND NOT build_osx)
-- target_include_directories(external_opus
-- INTERFACE
-- /usr/local/macos/include
-- )
-- target_link_libraries(external_opus
-- INTERFACE
-- /usr/local/macos/lib/libopus.a
-- )
--elseif (APPLE)
-- target_include_directories(external_opus
-- INTERFACE
-- /usr/local/include
-- )
-- target_link_libraries(external_opus
-- INTERFACE
-- /usr/local/lib/libopus.a
-- )
--else()
-- target_link_static_libraries(external_opus
-- INTERFACE
-- opus
-- )
--endif()
-+target_include_directories(external_opus SYSTEM INTERFACE ${OPUS_INCLUDE_DIRS})
-+target_link_libraries(external_opus INTERFACE ${OPUS_LIBRARIES})
diff --git a/testing/telegram-desktop/qt.cmake b/testing/telegram-desktop/qt.cmake
new file mode 100644
index 0000000000..f569b2573d
--- /dev/null
+++ b/testing/telegram-desktop/qt.cmake
@@ -0,0 +1,43 @@
+add_library(external_qt INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_qt ALIAS external_qt)
+
+find_package(Qt5 REQUIRED COMPONENTS Core DBus Gui Widgets Network)
+get_target_property(QTCORE_INCLUDE_DIRS Qt5::Core INTERFACE_INCLUDE_DIRECTORIES)
+list(GET QTCORE_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
+
+foreach(__qt_module IN ITEMS QtCore QtGui)
+ list(APPEND QT_PRIVATE_INCLUDE_DIRS
+ ${QT_INCLUDE_DIR}/${__qt_module}/${Qt5_VERSION}
+ ${QT_INCLUDE_DIR}/${__qt_module}/${Qt5_VERSION}/${__qt_module}
+ )
+endforeach()
+message(STATUS "Using Qt private include directories: ${QT_PRIVATE_INCLUDE_DIRS}")
+
+if (LINUX)
+ if (NOT build_linux32)
+ target_compile_definitions(external_qt INTERFACE Q_OS_LINUX64)
+ else()
+ target_compile_definitions(external_qt INTERFACE Q_OS_LINUX32)
+ endif()
+endif()
+
+target_compile_definitions(external_qt
+INTERFACE
+ _REENTRANT
+ QT_PLUGIN
+ QT_WIDGETS_LIB
+ QT_NETWORK_LIB
+ QT_GUI_LIB
+ QT_CORE_LIB
+)
+
+target_include_directories(external_qt SYSTEM
+INTERFACE
+ ${QT_PRIVATE_INCLUDE_DIRS}
+)
+target_link_libraries(external_qt
+INTERFACE
+ Qt5::DBus
+ Qt5::Network
+ Qt5::Widgets
+)
diff --git a/testing/telegram-desktop/qt.patch b/testing/telegram-desktop/qt.patch
deleted file mode 100644
index a1e4fb0843..0000000000
--- a/testing/telegram-desktop/qt.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-diff --git a/cmake/external/qt/CMakeLists.txt b/cmake/external/qt/CMakeLists.txt
-index 1a56319..8f9eb74 100644
---- a/cmake/external/qt/CMakeLists.txt
-+++ b/cmake/external/qt/CMakeLists.txt
-@@ -7,211 +7,43 @@
- add_library(external_qt INTERFACE IMPORTED GLOBAL)
- add_library(desktop-app::external_qt ALIAS external_qt)
-
-+find_package(Qt5 REQUIRED COMPONENTS Core DBus Gui Widgets Network)
-+get_target_property(QTCORE_INCLUDE_DIRS Qt5::Core INTERFACE_INCLUDE_DIRECTORIES)
-+list(GET QTCORE_INCLUDE_DIRS 0 QT_INCLUDE_DIR)
-+
-+foreach(__qt_module IN ITEMS QtCore QtGui)
-+ list(APPEND QT_PRIVATE_INCLUDE_DIRS
-+ ${QT_INCLUDE_DIR}/${__qt_module}/${Qt5_VERSION}
-+ ${QT_INCLUDE_DIR}/${__qt_module}/${Qt5_VERSION}/${__qt_module}
-+ )
-+endforeach()
-+message(STATUS "Using Qt private include directories: ${QT_PRIVATE_INCLUDE_DIRS}")
-+
- if (LINUX)
-- if (NOT build_linux32)
-- target_compile_definitions(external_qt INTERFACE Q_OS_LINUX64)
-- else()
-- target_compile_definitions(external_qt INTERFACE Q_OS_LINUX32)
-- endif()
-+ if (NOT build_linux32)
-+ target_compile_definitions(external_qt INTERFACE Q_OS_LINUX64)
-+ else()
-+ target_compile_definitions(external_qt INTERFACE Q_OS_LINUX32)
-+ endif()
- endif()
-
--target_include_directories(external_qt SYSTEM
--INTERFACE
-- ${qt_loc}/include
-- ${qt_loc}/include/QtCore
-- ${qt_loc}/include/QtGui
-- ${qt_loc}/include/QtDBus
-- ${qt_loc}/include/QtCore/${qt_version}
-- ${qt_loc}/include/QtGui/${qt_version}
-- ${qt_loc}/include/QtCore/${qt_version}/QtCore
-- ${qt_loc}/include/QtGui/${qt_version}/QtGui
--)
--
- target_compile_definitions(external_qt
- INTERFACE
-- _REENTRANT
-- QT_STATICPLUGIN
-- QT_PLUGIN
-- QT_WIDGETS_LIB
-- QT_NETWORK_LIB
-- QT_GUI_LIB
-- QT_CORE_LIB
-+ _REENTRANT
-+ QT_PLUGIN
-+ QT_WIDGETS_LIB
-+ QT_NETWORK_LIB
-+ QT_GUI_LIB
-+ QT_CORE_LIB
- )
-
--if (WIN32)
-- set(qt_lib_prefix "")
-- set(qt_lib_suffix $<$<CONFIG:Debug>:d>.lib)
--else()
-- set(qt_lib_prefix lib)
-- if (APPLE)
-- set(qt_lib_suffix $<$<CONFIG:Debug>:_debug>.a)
-- else()
-- set(qt_lib_suffix .a)
-- endif()
--endif()
--
--set(common_qt_libs
-- plugins/imageformats/${qt_lib_prefix}qwebp
-- plugins/imageformats/${qt_lib_prefix}qgif
-- plugins/imageformats/${qt_lib_prefix}qjpeg
-- lib/${qt_lib_prefix}Qt5PrintSupport
-- lib/${qt_lib_prefix}Qt5AccessibilitySupport
-- lib/${qt_lib_prefix}Qt5FontDatabaseSupport
-- lib/${qt_lib_prefix}Qt5EventDispatcherSupport
-- lib/${qt_lib_prefix}Qt5ThemeSupport
-- lib/${qt_lib_prefix}Qt5Network
-- lib/${qt_lib_prefix}Qt5Widgets
-- lib/${qt_lib_prefix}Qt5Gui
-- lib/${qt_lib_prefix}qtharfbuzz
-- lib/${qt_lib_prefix}qtlibpng
-+target_include_directories(external_qt SYSTEM
-+INTERFACE
-+ ${QT_PRIVATE_INCLUDE_DIRS}
- )
--
--set(qt_libs_list "")
--if (WIN32)
-- set(qt_libs
-- ${common_qt_libs}
-- lib/${qt_lib_prefix}Qt5Core
-- lib/${qt_lib_prefix}Qt5WindowsUIAutomationSupport
-- lib/${qt_lib_prefix}qtmain
-- lib/${qt_lib_prefix}qtfreetype
-- lib/${qt_lib_prefix}qtpcre2
-- plugins/platforms/${qt_lib_prefix}qwindows
-- )
-- foreach (lib ${qt_libs})
-- list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
-- endforeach()
--elseif (APPLE)
-- if (NOT build_osx)
-- set(qt_libs
-- ${common_qt_libs}
-- lib/${qt_lib_prefix}Qt5Core
-- lib/${qt_lib_prefix}Qt5GraphicsSupport
-- lib/${qt_lib_prefix}Qt5ClipboardSupport
-- lib/${qt_lib_prefix}qtfreetype
-- lib/${qt_lib_prefix}qtpcre2
-- plugins/platforms/${qt_lib_prefix}qcocoa
-- plugins/bearer/${qt_lib_prefix}qgenericbearer
-- )
-- else()
-- set(qt_libs
-- lib/${qt_lib_prefix}Qt5PrintSupport
-- lib/${qt_lib_prefix}Qt5PlatformSupport
-- lib/${qt_lib_prefix}Qt5Network
-- lib/${qt_lib_prefix}Qt5Widgets
-- lib/${qt_lib_prefix}Qt5Gui
-- lib/${qt_lib_prefix}Qt5Core
-- lib/${qt_lib_prefix}qtharfbuzzng
-- lib/${qt_lib_prefix}qtfreetype
-- lib/${qt_lib_prefix}qtpcre
-- plugins/platforms/${qt_lib_prefix}qcocoa
-- plugins/imageformats/${qt_lib_prefix}qwebp
-- plugins/bearer/${qt_lib_prefix}qgenericbearer
-- )
-- endif()
-- foreach (lib ${qt_libs})
-- list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
-- endforeach()
-- target_link_libraries(external_qt
-- INTERFACE
-- desktop-app::external_zlib
-- cups
-- )
--else()
-- set(qt_libs
-- plugins/platforminputcontexts/${qt_lib_prefix}composeplatforminputcontextplugin
-- plugins/platforminputcontexts/${qt_lib_prefix}ibusplatforminputcontextplugin
-- plugins/platforminputcontexts/${qt_lib_prefix}fcitxplatforminputcontextplugin
-- plugins/platforminputcontexts/${qt_lib_prefix}himeplatforminputcontextplugin
-- plugins/platforminputcontexts/${qt_lib_prefix}nimfplatforminputcontextplugin
-- plugins/platforms/${qt_lib_prefix}qxcb
-- lib/${qt_lib_prefix}Qt5XcbQpa
-- lib/${qt_lib_prefix}Qt5LinuxAccessibilitySupport
-- lib/${qt_lib_prefix}Qt5ServiceSupport
-- lib/${qt_lib_prefix}Qt5EdidSupport
-- plugins/bearer/${qt_lib_prefix}qconnmanbearer
-- plugins/bearer/${qt_lib_prefix}qgenericbearer
-- plugins/bearer/${qt_lib_prefix}qnmbearer
-- ${common_qt_libs}
-- lib/${qt_lib_prefix}Qt5DBus
-- lib/${qt_lib_prefix}Qt5Core
-- lib/${qt_lib_prefix}qtpcre2
-- lib/${qt_lib_prefix}xcb-static
-- )
-- foreach (lib ${qt_libs})
-- list(APPEND qt_libs_list "${qt_loc}/${lib}${qt_lib_suffix}")
-- endforeach()
--endif()
--
- target_link_libraries(external_qt
- INTERFACE
-- ${qt_libs_list}
-+ Qt5::DBus
-+ Qt5::Network
-+ Qt5::Widgets
- )
--
--if (LINUX)
-- target_include_directories(external_qt SYSTEM
-- INTERFACE
-- ${qt_loc}/mkspecs/linux-g++
-- )
-- target_link_options(external_qt
-- INTERFACE
-- -static-libstdc++
-- -pthread
-- -rdynamic
-- )
-- if (DESKTOP_APP_USE_GLIBC_WRAPS)
-- target_link_options(external_qt
-- INTERFACE
-- -Wl,-wrap,aligned_alloc
-- -Wl,-wrap,secure_getenv
-- -Wl,-wrap,clock_gettime
-- -Wl,--no-as-needed,-lrt
-- )
-- if (NOT build_linux32)
-- target_link_options(external_qt
-- INTERFACE
-- -Wl,-wrap,__divmodti4
-- )
-- else()
-- target_link_options(external_qt
-- INTERFACE
-- -Wl,-wrap,__divmoddi4
-- )
-- endif()
-- endif()
-- target_link_static_libraries(external_qt
-- INTERFACE
-- SM
-- ICE
-- fontconfig
-- freetype
-- expat
-- z
-- xcb-shm
-- xcb-xfixes
-- xcb-render
-- xkbcommon
-- xkbcommon-x11
-- Xrender
-- icutu
-- icui18n
-- icuuc
-- icudata
-- )
-- if (DESKTOP_APP_USE_GLIBC_WRAPS)
-- target_link_libraries(external_qt
-- INTERFACE
-- desktop-app::linux_glibc_wraps
-- $<TARGET_FILE:desktop-app::linux_glibc_wraps>
-- )
-- endif()
-- target_link_libraries(external_qt
-- INTERFACE
-- xcb
-- X11
-- X11-xcb
-- dbus-1
-- dl
-- glib-2.0
-- pthread
-- )
--endif()
diff --git a/testing/telegram-desktop/range-v3.cmake b/testing/telegram-desktop/range-v3.cmake
new file mode 100644
index 0000000000..f622f5edb1
--- /dev/null
+++ b/testing/telegram-desktop/range-v3.cmake
@@ -0,0 +1,9 @@
+add_library(external_ranges INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_ranges ALIAS external_ranges)
+
+find_package(range-v3 REQUIRED)
+
+target_include_directories(external_ranges SYSTEM
+INTERFACE
+ ${RANGE_V3_INCLUDE_DIRS}
+)
diff --git a/testing/telegram-desktop/range-v3.patch b/testing/telegram-desktop/range-v3.patch
deleted file mode 100644
index 3a444c04a7..0000000000
--- a/testing/telegram-desktop/range-v3.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/cmake/external/ranges/CMakeLists.txt b/cmake/external/ranges/CMakeLists.txt
-index 4c75ecb..fc6febc 100644
---- a/cmake/external/ranges/CMakeLists.txt
-+++ b/cmake/external/ranges/CMakeLists.txt
-@@ -7,15 +7,9 @@
- add_library(external_ranges INTERFACE IMPORTED GLOBAL)
- add_library(desktop-app::external_ranges ALIAS external_ranges)
-
-+find_package(range-v3 REQUIRED)
-+
- target_include_directories(external_ranges SYSTEM
- INTERFACE
-- ${libs_loc}/range-v3/include
-+ ${RANGE_V3_INCLUDE_DIRS}
- )
--
--if (WIN32)
-- target_compile_options(external_ranges
-- INTERFACE
-- /experimental:preprocessor # need for range-v3 see https://github.com/ericniebler/range-v3#supported-compilers
-- /wd5105 # needed for `/experimental:preprocessor`, suppressing C5105 "macro expansion producing 'defined' has undefined behavior"
-- )
--endif()
-\ No newline at end of file
diff --git a/testing/telegram-desktop/zlib.cmake b/testing/telegram-desktop/zlib.cmake
new file mode 100644
index 0000000000..8684c71cab
--- /dev/null
+++ b/testing/telegram-desktop/zlib.cmake
@@ -0,0 +1,9 @@
+add_library(external_zlib INTERFACE IMPORTED GLOBAL)
+add_library(desktop-app::external_zlib ALIAS external_zlib)
+
+find_package(PkgConfig REQUIRED)
+find_package(ZLIB REQUIRED)
+pkg_check_modules(MINIZIP REQUIRED minizip)
+
+target_include_directories(external_zlib SYSTEM INTERFACE ${ZLIB_INCLUDE_DIR} ${MINIZIP_INCLUDE_DIRS})
+target_link_libraries (external_zlib INTERFACE ${ZLIB_LIBRARY_RELEASE} ${MINIZIP_LIBRARIES})
diff --git a/testing/telegram-desktop/zlib.patch b/testing/telegram-desktop/zlib.patch
deleted file mode 100644
index 8e474f67df..0000000000
--- a/testing/telegram-desktop/zlib.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff --git a/cmake/external/zlib/CMakeLists.txt b/cmake/external/zlib/CMakeLists.txt
-index d2bc1fc..8bf38a9 100644
---- a/cmake/external/zlib/CMakeLists.txt
-+++ b/cmake/external/zlib/CMakeLists.txt
-@@ -7,45 +7,9 @@
- add_library(external_zlib INTERFACE IMPORTED GLOBAL)
- add_library(desktop-app::external_zlib ALIAS external_zlib)
-
--if (NOT WIN32)
-- add_library(external_minizip STATIC)
-- init_target(external_minizip "(external)")
-+find_package(PkgConfig REQUIRED)
-+find_package(ZLIB REQUIRED)
-+pkg_check_modules(MINIZIP REQUIRED minizip)
-
-- set(minizip_loc ${third_party_loc}/minizip)
--
-- target_sources(external_minizip
-- PRIVATE
-- ${minizip_loc}/crypt.h
-- ${minizip_loc}/ioapi.c
-- ${minizip_loc}/ioapi.h
-- ${minizip_loc}/zip.c
-- ${minizip_loc}/zip.h
-- ${minizip_loc}/unzip.c
-- ${minizip_loc}/unzip.h
-- )
--
-- target_include_directories(external_minizip SYSTEM
-- INTERFACE
-- ${minizip_loc}
-- )
--
-- target_link_libraries(external_zlib INTERFACE external_minizip)
--endif()
--
--target_include_directories(external_zlib SYSTEM
--INTERFACE
-- ${libs_loc}/zlib
-- ${libs_loc}/zlib/contrib/minizip
--)
--
--if (WIN32)
-- target_compile_definitions(external_zlib INTERFACE ZLIB_WINAPI)
--
-- set(zlib_lib_loc ${libs_loc}/zlib/contrib/vstudio/vc14/x86/ZlibStat$<IF:$<CONFIG:Debug>,Debug,ReleaseWithoutAsm>)
--
-- target_link_libraries(external_zlib INTERFACE ${zlib_lib_loc}/zlibstat.lib)
--elseif (APPLE)
-- target_link_libraries(external_zlib INTERFACE /usr/local/lib/libz.a)
--else()
-- target_link_static_libraries(external_zlib INTERFACE z)
--endif()
-+target_include_directories(external_zlib SYSTEM INTERFACE ${ZLIB_INCLUDE_DIR} ${MINIZIP_INCLUDE_DIRS})
-+target_link_libraries (external_zlib INTERFACE ${ZLIB_LIBRARY_RELEASE} ${MINIZIP_LIBRARIES})