aboutsummaryrefslogtreecommitdiffstats
path: root/community/telegram-desktop/qt-plugin-path.patch
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-02-14 00:48:27 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-02-14 09:18:01 -0300
commit184355fdc44bc2e12976d65518fe029d8a6e459d (patch)
tree3d6d67b9d315d9434eea4296f25446fa892ec372 /community/telegram-desktop/qt-plugin-path.patch
parent7f54020eb59f8766522607544a4b66e89dd920e8 (diff)
downloadaports-184355fdc44bc2e12976d65518fe029d8a6e459d.tar.bz2
aports-184355fdc44bc2e12976d65518fe029d8a6e459d.tar.xz
community/telegram-desktop: move from testing
The telegram developers made great progress in making packaging Telegram Desktop a pleasant experience for Alpine Linux. - There is now a full tarball available that includes all gitmodules that before were all checked out via tarballs in the source= variable. - There is now support deciding whether to use system packages and linking it to the Telegram binary instead of statically linked checked out versions in the source tree. - The build system is now cmake, which is much better than the previous GYP meta build-system mess. Overall the change from the old to the new system reduced Alpine Linux's load by 834 lines.
Diffstat (limited to 'community/telegram-desktop/qt-plugin-path.patch')
-rw-r--r--community/telegram-desktop/qt-plugin-path.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/community/telegram-desktop/qt-plugin-path.patch b/community/telegram-desktop/qt-plugin-path.patch
new file mode 100644
index 0000000000..bb877f901d
--- /dev/null
+++ b/community/telegram-desktop/qt-plugin-path.patch
@@ -0,0 +1,24 @@
+diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp
+index 2547342..8a14dcb 100644
+--- a/Telegram/SourceFiles/core/launcher.cpp
++++ b/Telegram/SourceFiles/core/launcher.cpp
+@@ -278,6 +278,19 @@ int Launcher::exec() {
+ Platform::start();
+ Ui::DisableCustomScaling();
+
++ // I don't know why path is not in QT_PLUGIN_PATH by default
++ QCoreApplication::addLibraryPath("/usr/lib/qt5/plugins");
++ // without this Telegram doesn't start on Ubuntu 17.04 due GTK errors
++ setenv("QT_STYLE_OVERRIDE", "qwerty", false);
++ // Telegram doesn't start when extraordinary theme is set, see launchpad.net/bugs/1680943
++ unsetenv("QT_QPA_PLATFORMTHEME");
++
++ // unset QT screen scale related envvars
++ unsetenv("QT_SCREEN_SCALE_FACTORS");
++ unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR");
++ unsetenv("QT_SCALE_FACTOR");
++ unsetenv("QT_DEVICE_PIXEL_RATIO");
++
+ auto result = executeApplication();
+
+ DEBUG_LOG(("Telegram finished, result: %1").arg(result));