summarylogtreecommitdiffstats
path: root/aur-fixes.diff
blob: de6824015ba6145c82ed03da94e0e56c8db27696 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
diff --git a/Telegram/SourceFiles/qt_static_plugins.cpp b/Telegram/SourceFiles/qt_static_plugins.cpp
index b975c7a8..5ad461a4 100644
--- a/Telegram/SourceFiles/qt_static_plugins.cpp
+++ b/Telegram/SourceFiles/qt_static_plugins.cpp
@@ -30,6 +30,7 @@ Q_IMPORT_PLUGIN(QGenericEnginePlugin)
 #elif defined Q_OS_LINUX // Q_OS_WIN | Q_OS_MAC
 Q_IMPORT_PLUGIN(QWebpPlugin)
 Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
+Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin)
 Q_IMPORT_PLUGIN(QConnmanEnginePlugin)
 Q_IMPORT_PLUGIN(QGenericEnginePlugin)
 Q_IMPORT_PLUGIN(QNetworkManagerEnginePlugin)
diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp
index 80160d16..68a0622c 100644
--- a/Telegram/gyp/Telegram.gyp
+++ b/Telegram/gyp/Telegram.gyp
@@ -83,24 +83,20 @@
     ],
 
     'defines': [
-      'AL_LIBTYPE_STATIC',
       'AL_ALEXT_PROTOTYPES',
       'TGVOIP_USE_CXX11_LIB',
       '<!@(python -c "for s in \'<(build_defines)\'.split(\',\'): print(s)")',
+      '__STDC_FORMAT_MACROS',
+      'TDESKTOP_DISABLE_AUTOUPDATE',
+      'TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME',
     ],
 
     'include_dirs': [
       '<(src_loc)',
       '<(SHARED_INTERMEDIATE_DIR)',
-      '<(libs_loc)/breakpad/src',
-      '<(libs_loc)/lzma/C',
-      '<(libs_loc)/libexif-0.6.20',
-      '<(libs_loc)/zlib-1.2.8',
-      '<(libs_loc)/ffmpeg',
-      '<(libs_loc)/openal-soft/include',
-      '<(libs_loc)/opus/include',
       '<(minizip_loc)',
       '<(sp_media_key_tap_loc)',
+      '/usr/include/breakpad',
       '<(submodules_loc)/GSL/include',
       '<(submodules_loc)/variant/include',
     ],
diff --git a/Telegram/gyp/qt.gypi b/Telegram/gyp/qt.gypi
index 81c13a18..caa93b5b 100644
--- a/Telegram/gyp/qt.gypi
+++ b/Telegram/gyp/qt.gypi
@@ -38,7 +38,6 @@
             'Qt5Network',
             'Qt5Widgets',
             'Qt5Gui',
-            'qtharfbuzzng',
           ],
           'qt_version%': '<(qt_version)',
           'conditions': [
@@ -97,20 +96,9 @@
               '<@(qt_libs)',
               'Qt5DBus',
               'Qt5Core',
-              'qtpcre',
-              'Xi',
-              'Xext',
-              'Xfixes',
-              'SM',
-              'ICE',
-              'fontconfig',
-              'expat',
-              'freetype',
-              'z',
-              'xcb-shm',
-              'xcb-xfixes',
-              'xcb-render',
-              'xcb-static',
+              'Qt5WaylandClient',
+              'qwayland-generic',
+              'qwayland-egl',
             ],
           }],
         ],
@@ -200,6 +188,7 @@
     '<(qt_loc)/include/QtGui/<(qt_version)',
     '<(qt_loc)/include/QtCore/<(qt_version)/QtCore',
     '<(qt_loc)/include/QtGui/<(qt_version)/QtGui',
+    '/usr/include/openssl-1.0',
   ],
   'library_dirs': [
     '<(qt_loc)/lib',
@@ -220,7 +209,6 @@
         '<(qt_loc)/plugins/platforminputcontexts',
       ],
       'libraries': [
-        '<(linux_path_xkbcommon)/lib/libxkbcommon.a',
         '<@(qt_libs_release)',
         '<(linux_lib_ssl)',
         '<(linux_lib_crypto)',
@@ -233,12 +221,32 @@
         'gthread-2.0',
         'glib-2.0',
         'pthread',
+
+        'Xi',
+        'Xext',
+        'Xfixes',
+        'SM',
+        'ICE',
+        'fontconfig',
+        'expat',
+        'freetype',
+
+        '<!(pkg-config 2> /dev/null --libs xkbcommon xkbcommon-x11)',
+        '<!(pkg-config 2> /dev/null --libs harfbuzz)',
+        '<!(pkg-config 2> /dev/null --libs libpcre16)',
+        '<!(pkg-config 2> /dev/null --libs zlib)',
+        '<!(pkg-config 2> /dev/null --libs libpng16)',
+        '<!(pkg-config 2> /dev/null --libs libjpeg)',
+        '<!(pkg-config 2> /dev/null --libs libwebp)',
+        '<!(pkg-config 2> /dev/null --libs xcb-shm xcb-xfixes xcb-render xcb-renderutil xcb-sync xcb-randr xcb-xinerama xcb-xkb xcb-icccm xcb-image xcb-shape xcb-keysyms xcb-util)',
+        '<!(pkg-config 2> /dev/null --libs wayland-client wayland-cursor)',
+        'proxy',
+        'GL',
       ],
       'include_dirs': [
         '<(qt_loc)/mkspecs/linux-g++',
       ],
       'ldflags': [
-        '-static-libstdc++',
         '-pthread',
         '-g',
         '-rdynamic',
diff --git a/Telegram/gyp/settings_linux.gypi b/Telegram/gyp/settings_linux.gypi
index fde88dcd..1fd1b9cb 100644
--- a/Telegram/gyp/settings_linux.gypi
+++ b/Telegram/gyp/settings_linux.gypi
@@ -25,7 +25,6 @@
           '-pipe',
           '-g',
           '-Wall',
-          '-Werror',
           '-W',
           '-fPIC',
           '-Wno-unused-variable',
diff --git a/Telegram/gyp/telegram_linux.gypi b/Telegram/gyp/telegram_linux.gypi
index 2c464928..2112496b 100644
--- a/Telegram/gyp/telegram_linux.gypi
+++ b/Telegram/gyp/telegram_linux.gypi
@@ -21,11 +21,20 @@
   'conditions': [[ 'build_linux', {
     'variables': {
       'pkgconfig_libs': [
-# In order to work libxkbcommon must be linked statically,
-# PKGCONFIG links it like "-L/usr/local/lib -lxkbcommon"
-# which makes a dynamic link which leads to segfault in
-# QApplication() -> createPlatformIntegration -> QXcbIntegrationPlugin::create
-        #'xkbcommon',
+        'liblzma',
+        'openal',
+        'libavformat',
+        'libavcodec',
+        'libswresample',
+        'libswscale',
+        'libavutil',
+        'opus',
+        'libva-x11',
+        'libva-drm',
+        'libva',
+        'vdpau',
+        'libdrm',
+        'zlib',
       ],
       'linux_path_ffmpeg%': '/usr/local',
       'linux_path_openal%': '/usr/local',
@@ -36,20 +45,11 @@
       'linux_path_opus_include%': '<(libs_loc)/opus/include',
     },
     'include_dirs': [
-      '/usr/local/include',
-      '<(linux_path_ffmpeg)/include',
-      '<(linux_path_openal)/include',
-      '<(linux_path_breakpad)/include/breakpad',
       '<(linux_path_opus_include)',
+      '/usr/include',
     ],
     'library_dirs': [
-      '/usr/local/lib',
-      '<(linux_path_ffmpeg)/lib',
-      '<(linux_path_openal)/lib',
-      '<(linux_path_libexif_lib)',
-      '<(linux_path_va)/lib',
-      '<(linux_path_vdpau)/lib',
-      '<(linux_path_breakpad)/lib',
+      '/usr/lib',
     ],
     'libraries': [
       'breakpad_client',
@@ -57,27 +57,14 @@
       'ibusplatforminputcontextplugin',
       'fcitxplatforminputcontextplugin',
       'himeplatforminputcontextplugin',
-      'liblzma.a',
-      'libopenal.a',
-      'libavformat.a',
-      'libavcodec.a',
-      'libswresample.a',
-      'libswscale.a',
-      'libavutil.a',
-      'libopus.a',
-      'libva-x11.a',
-      'libva-drm.a',
-      'libva.a',
-      'libvdpau.a',
-      'libdrm.a',
-      'libz.a',
-#      '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))',
+      '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))',
     ],
     'cflags_cc': [
       '<!(pkg-config 2> /dev/null --cflags appindicator-0.1)',
       '<!(pkg-config 2> /dev/null --cflags gtk+-2.0)',
       '<!(pkg-config 2> /dev/null --cflags glib-2.0)',
       '<!(pkg-config 2> /dev/null --cflags dee-1.0)',
+      '<!(pkg-config 2> /dev/null --cflags <@(pkgconfig_libs))',
     ],
     'configurations': {
       'Release': {