1 |
commit: 10178f81e58442231dda913dfd878491d1515e0b |
2 |
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Oct 22 11:18:31 2016 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 26 18:00:09 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10178f81 |
7 |
|
8 |
media-video/vlc: Fix build with Qt 5.7.0 |
9 |
|
10 |
Gentoo-bug: 589396 |
11 |
|
12 |
Package-Manager: portage-2.3.0 |
13 |
|
14 |
media-video/vlc/files/vlc-2.2.4-cxx0x.patch | 11 ++ |
15 |
media-video/vlc/files/vlc-2.2.4-qt57.patch | 284 ++++++++++++++++++++++++++++ |
16 |
media-video/vlc/vlc-2.2.4.ebuild | 4 + |
17 |
media-video/vlc/vlc-2.2.9999.ebuild | 3 + |
18 |
4 files changed, 302 insertions(+) |
19 |
|
20 |
diff --git a/media-video/vlc/files/vlc-2.2.4-cxx0x.patch b/media-video/vlc/files/vlc-2.2.4-cxx0x.patch |
21 |
new file mode 100644 |
22 |
index 00000000..cb3d635 |
23 |
--- /dev/null |
24 |
+++ b/media-video/vlc/files/vlc-2.2.4-cxx0x.patch |
25 |
@@ -0,0 +1,11 @@ |
26 |
+--- a/configure.ac 2016-09-21 07:10:58.885508665 +0200 |
27 |
++++ b/configure.ac 2016-09-21 07:19:17.835725004 +0200 |
28 |
+@@ -3746,7 +3746,7 @@ |
29 |
+ PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [ |
30 |
+ PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [ |
31 |
+ VLC_ADD_LIBS([qt4],[${QTX11_LIBS}]) |
32 |
+- VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11]) |
33 |
++ VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11 -std=c++0x]) |
34 |
+ PKG_CHECK_MODULES([XI], [xi], [ |
35 |
+ VLC_ADD_LIBS([qt4], [${XI_LIBS}]) |
36 |
+ VLC_ADD_CXXFLAGS([qt4], [${XI_CFLAGS} -DHAVE_XI]) |
37 |
|
38 |
diff --git a/media-video/vlc/files/vlc-2.2.4-qt57.patch b/media-video/vlc/files/vlc-2.2.4-qt57.patch |
39 |
new file mode 100644 |
40 |
index 00000000..97472a6 |
41 |
--- /dev/null |
42 |
+++ b/media-video/vlc/files/vlc-2.2.4-qt57.patch |
43 |
@@ -0,0 +1,284 @@ |
44 |
+As the 2.2 headers are still using vlc_atomics (picture) |
45 |
+we cannot have a way to avoid collisions with early |
46 |
+or late <atomic> inclusion when using GCC >= 4.7 |
47 |
+ |
48 |
+Conditionals in vlc_atomic won't work. |
49 |
+ |
50 |
+Happens in ProjectM and Qt5. |
51 |
+--- |
52 |
+ modules/gui/qt4/actions_manager.cpp | 2 ++ |
53 |
+ modules/gui/qt4/adapters/seekpoints.cpp | 4 +-- |
54 |
+ modules/gui/qt4/adapters/seekpoints.hpp | 4 +-- |
55 |
+ modules/gui/qt4/components/controller.cpp | 2 ++ |
56 |
+ .../gui/qt4/components/playlist/playlist_model.hpp | 4 +-- |
57 |
+ modules/gui/qt4/components/playlist/views.cpp | 6 ++++ |
58 |
+ modules/gui/qt4/dialogs/messages.cpp | 2 ++ |
59 |
+ modules/gui/qt4/dialogs/vlm.cpp | 4 --- |
60 |
+ modules/gui/qt4/dialogs/vlm.hpp | 4 ++- |
61 |
+ modules/gui/qt4/input_manager.cpp | 2 ++ |
62 |
+ modules/gui/qt4/input_manager.hpp | 3 +- |
63 |
+ modules/gui/qt4/menus.cpp | 2 ++ |
64 |
+ modules/gui/qt4/qt4.hpp | 32 ++++++++++++++++++---- |
65 |
+ modules/gui/qt4/util/pictureflow.cpp | 2 ++ |
66 |
+ modules/visualization/projectm.cpp | 4 +++ |
67 |
+ 15 files changed, 56 insertions(+), 21 deletions(-) |
68 |
+ |
69 |
+diff --git a/modules/gui/qt4/actions_manager.cpp b/modules/gui/qt4/actions_manager.cpp |
70 |
+index eff40d9..b7ca967 100644 |
71 |
+--- a/modules/gui/qt4/actions_manager.cpp |
72 |
++++ b/modules/gui/qt4/actions_manager.cpp |
73 |
+@@ -25,6 +25,8 @@ |
74 |
+ # include "config.h" |
75 |
+ #endif |
76 |
+ |
77 |
++#include "qt4.hpp" |
78 |
++ |
79 |
+ #include <vlc_vout.h> |
80 |
+ #include <vlc_keys.h> |
81 |
+ |
82 |
+diff --git a/modules/gui/qt4/adapters/seekpoints.cpp b/modules/gui/qt4/adapters/seekpoints.cpp |
83 |
+index fbf2957..a3564bb 100644 |
84 |
+--- a/modules/gui/qt4/adapters/seekpoints.cpp |
85 |
++++ b/modules/gui/qt4/adapters/seekpoints.cpp |
86 |
+@@ -19,14 +19,12 @@ |
87 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
88 |
+ *****************************************************************************/ |
89 |
+ |
90 |
++#include "seekpoints.hpp" |
91 |
+ |
92 |
+ #include "recents.hpp" |
93 |
+ #include "dialogs_provider.hpp" |
94 |
+ #include "menus.hpp" |
95 |
+ |
96 |
+-#include "seekpoints.hpp" |
97 |
+- |
98 |
+-#include "qt4.hpp" |
99 |
+ #include "input_manager.hpp" |
100 |
+ |
101 |
+ SeekPoints::SeekPoints( QObject *parent, intf_thread_t *p_intf_ ) : |
102 |
+diff --git a/modules/gui/qt4/adapters/seekpoints.hpp b/modules/gui/qt4/adapters/seekpoints.hpp |
103 |
+index 0083989..bbb9214 100644 |
104 |
+--- a/modules/gui/qt4/adapters/seekpoints.hpp |
105 |
++++ b/modules/gui/qt4/adapters/seekpoints.hpp |
106 |
+@@ -22,9 +22,7 @@ |
107 |
+ #ifndef SEEKPOINTS_HPP |
108 |
+ #define SEEKPOINTS_HPP |
109 |
+ |
110 |
+-#ifdef HAVE_CONFIG_H |
111 |
+-#include "config.h" |
112 |
+-#endif |
113 |
++#include "qt4.hpp" |
114 |
+ |
115 |
+ #include <vlc_common.h> |
116 |
+ #include <vlc_interface.h> |
117 |
+diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp |
118 |
+index d93e0db..c43d929 100644 |
119 |
+--- a/modules/gui/qt4/components/controller.cpp |
120 |
++++ b/modules/gui/qt4/components/controller.cpp |
121 |
+@@ -26,6 +26,8 @@ |
122 |
+ # include "config.h" |
123 |
+ #endif |
124 |
+ |
125 |
++#include "qt4.hpp" |
126 |
++ |
127 |
+ #include <vlc_vout.h> /* vout_thread_t for FSC */ |
128 |
+ |
129 |
+ /* Widgets */ |
130 |
+diff --git a/modules/gui/qt4/components/playlist/playlist_model.hpp b/modules/gui/qt4/components/playlist/playlist_model.hpp |
131 |
+index f9d1d0c..1f71ac9 100644 |
132 |
+--- a/modules/gui/qt4/components/playlist/playlist_model.hpp |
133 |
++++ b/modules/gui/qt4/components/playlist/playlist_model.hpp |
134 |
+@@ -25,9 +25,7 @@ |
135 |
+ #ifndef _PLAYLIST_MODEL_H_ |
136 |
+ #define _PLAYLIST_MODEL_H_ |
137 |
+ |
138 |
+-#ifdef HAVE_CONFIG_H |
139 |
+-# include "config.h" |
140 |
+-#endif |
141 |
++#include "qt4.hpp" |
142 |
+ |
143 |
+ #include <vlc_input.h> |
144 |
+ #include <vlc_playlist.h> |
145 |
+diff --git a/modules/gui/qt4/components/playlist/views.cpp b/modules/gui/qt4/components/playlist/views.cpp |
146 |
+index 59f6535..0066205 100644 |
147 |
+--- a/modules/gui/qt4/components/playlist/views.cpp |
148 |
++++ b/modules/gui/qt4/components/playlist/views.cpp |
149 |
+@@ -21,6 +21,12 @@ |
150 |
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
151 |
+ *****************************************************************************/ |
152 |
+ |
153 |
++#ifdef HAVE_CONFIG_H |
154 |
++#include "config.h" |
155 |
++#endif |
156 |
++ |
157 |
++#include "qt4.hpp" |
158 |
++ |
159 |
+ #include "components/playlist/views.hpp" |
160 |
+ #include "components/playlist/vlc_model.hpp" /* VLCModel */ |
161 |
+ #include "components/playlist/sorting.h" /* Columns List */ |
162 |
+diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp |
163 |
+index 30793a2..9c79c99 100644 |
164 |
+--- a/modules/gui/qt4/dialogs/messages.cpp |
165 |
++++ b/modules/gui/qt4/dialogs/messages.cpp |
166 |
+@@ -24,6 +24,8 @@ |
167 |
+ # include "config.h" |
168 |
+ #endif |
169 |
+ |
170 |
++#include "qt4.hpp" |
171 |
++ |
172 |
+ #include "dialogs/messages.hpp" |
173 |
+ |
174 |
+ #include <QPlainTextEdit> |
175 |
+diff --git a/modules/gui/qt4/dialogs/vlm.cpp b/modules/gui/qt4/dialogs/vlm.cpp |
176 |
+index 0da88cc..595f015 100644 |
177 |
+--- a/modules/gui/qt4/dialogs/vlm.cpp |
178 |
++++ b/modules/gui/qt4/dialogs/vlm.cpp |
179 |
+@@ -23,10 +23,6 @@ |
180 |
+ * Foundation, Inc., 51 Franklin street, Fifth Floor, Boston MA 02110-1301, USA. |
181 |
+ *****************************************************************************/ |
182 |
+ |
183 |
+-#ifdef HAVE_CONFIG_H |
184 |
+-# include "config.h" |
185 |
+-#endif |
186 |
+- |
187 |
+ #include "dialogs/vlm.hpp" |
188 |
+ |
189 |
+ #ifdef ENABLE_VLM |
190 |
+diff --git a/modules/gui/qt4/dialogs/vlm.hpp b/modules/gui/qt4/dialogs/vlm.hpp |
191 |
+index a3c6e5d..dcf7110 100644 |
192 |
+--- a/modules/gui/qt4/dialogs/vlm.hpp |
193 |
++++ b/modules/gui/qt4/dialogs/vlm.hpp |
194 |
+@@ -25,8 +25,10 @@ |
195 |
+ #ifndef QVLC_VLM_DIALOG_H_ |
196 |
+ #define QVLC_VLM_DIALOG_H_ 1 |
197 |
+ |
198 |
++#include "qt4.hpp" |
199 |
++ |
200 |
+ #ifdef HAVE_CONFIG_H |
201 |
+-# include "config.h" |
202 |
++#include "config.h" |
203 |
+ #endif |
204 |
+ |
205 |
+ #ifdef ENABLE_VLM |
206 |
+diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp |
207 |
+index fd45f4a..c50cb6c 100644 |
208 |
+--- a/modules/gui/qt4/input_manager.cpp |
209 |
++++ b/modules/gui/qt4/input_manager.cpp |
210 |
+@@ -30,6 +30,8 @@ |
211 |
+ # include "config.h" |
212 |
+ #endif |
213 |
+ |
214 |
++#include "qt4.hpp" |
215 |
++ |
216 |
+ #include "input_manager.hpp" |
217 |
+ #include "recents.hpp" |
218 |
+ |
219 |
+diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp |
220 |
+index 7d3b76a..4fbecbb 100644 |
221 |
+--- a/modules/gui/qt4/input_manager.hpp |
222 |
++++ b/modules/gui/qt4/input_manager.hpp |
223 |
+@@ -29,9 +29,10 @@ |
224 |
+ # include "config.h" |
225 |
+ #endif |
226 |
+ |
227 |
++#include "qt4.hpp" |
228 |
++ |
229 |
+ #include <vlc_input.h> |
230 |
+ |
231 |
+-#include "qt4.hpp" |
232 |
+ #include "util/singleton.hpp" |
233 |
+ #include "adapters/variables.hpp" |
234 |
+ |
235 |
+diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp |
236 |
+index 116e98c..46240b0 100644 |
237 |
+--- a/modules/gui/qt4/menus.cpp |
238 |
++++ b/modules/gui/qt4/menus.cpp |
239 |
+@@ -34,6 +34,8 @@ |
240 |
+ # include "config.h" |
241 |
+ #endif |
242 |
+ |
243 |
++#include "qt4.hpp" |
244 |
++ |
245 |
+ #include <vlc_common.h> |
246 |
+ #include <vlc_intf_strings.h> |
247 |
+ #include <vlc_vout.h> /* vout_thread_t */ |
248 |
+diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp |
249 |
+index 44d7db6..5aec957 100644 |
250 |
+--- a/modules/gui/qt4/qt4.hpp |
251 |
++++ b/modules/gui/qt4/qt4.hpp |
252 |
+@@ -29,12 +29,7 @@ |
253 |
+ # include "config.h" |
254 |
+ #endif |
255 |
+ |
256 |
+-#include <vlc_common.h> /* VLC_COMMON_MEMBERS for vlc_interface.h */ |
257 |
+-#include <vlc_interface.h> /* intf_thread_t */ |
258 |
+-#include <vlc_playlist.h> /* playlist_t */ |
259 |
+- |
260 |
+-#define QT_NO_CAST_TO_ASCII |
261 |
+-#include <QString> |
262 |
++#include <QtGlobal> |
263 |
+ |
264 |
+ #if ( QT_VERSION < 0x040600 ) |
265 |
+ # error Update your Qt version to at least 4.6.0 |
266 |
+@@ -43,6 +38,31 @@ |
267 |
+ #define HAS_QT47 ( QT_VERSION >= 0x040700 ) |
268 |
+ #define HAS_QT5 ( QT_VERSION >= 0x050000 ) |
269 |
+ |
270 |
++#if HAS_QT5 |
271 |
++ #include <QtCore/qcompilerdetection.h> |
272 |
++ #if defined(Q_COMPILER_ATOMICS) && \ |
273 |
++ ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7 ) ) |
274 |
++ #define VLC_ATOMIC_H |
275 |
++ #include <atomic> |
276 |
++ using namespace std; |
277 |
++ # define atomic_store(object,desired) \ |
278 |
++ do { \ |
279 |
++ *(object) = (desired); \ |
280 |
++ __sync_synchronize(); \ |
281 |
++ } while (0) |
282 |
++ |
283 |
++ # define atomic_load(object) \ |
284 |
++ (__sync_synchronize(), *(object)) |
285 |
++ #endif |
286 |
++#endif |
287 |
++ |
288 |
++#include <vlc_common.h> /* VLC_COMMON_MEMBERS for vlc_interface.h */ |
289 |
++#include <vlc_interface.h> /* intf_thread_t */ |
290 |
++#include <vlc_playlist.h> /* playlist_t */ |
291 |
++ |
292 |
++#define QT_NO_CAST_TO_ASCII |
293 |
++#include <QString> |
294 |
++ |
295 |
+ enum { |
296 |
+ DialogEventTypeOffset = 0, |
297 |
+ IMEventTypeOffset = 100, |
298 |
+diff --git a/modules/gui/qt4/util/pictureflow.cpp b/modules/gui/qt4/util/pictureflow.cpp |
299 |
+index 9318953..a7e6a01 100644 |
300 |
+--- a/modules/gui/qt4/util/pictureflow.cpp |
301 |
++++ b/modules/gui/qt4/util/pictureflow.cpp |
302 |
+@@ -29,6 +29,8 @@ |
303 |
+ THE SOFTWARE. |
304 |
+ */ |
305 |
+ |
306 |
++#include "qt4.hpp" |
307 |
++ |
308 |
+ #include "pictureflow.hpp" |
309 |
+ |
310 |
+ #include <QApplication> |
311 |
+diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp |
312 |
+index e80fbf4..96d532d 100644 |
313 |
+--- a/modules/visualization/projectm.cpp |
314 |
++++ b/modules/visualization/projectm.cpp |
315 |
+@@ -30,6 +30,10 @@ |
316 |
+ #endif |
317 |
+ |
318 |
+ #include <assert.h> |
319 |
++#if defined(__GNUC__) && \ |
320 |
++ ( __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7 ) ) |
321 |
++ #define VLC_ATOMIC_H /* Ensure C atomics wont collide with old intrinsics */ |
322 |
++#endif |
323 |
+ |
324 |
+ #include <vlc_common.h> |
325 |
+ #include <vlc_plugin.h> |
326 |
+-- |
327 |
+2.7.4 |
328 |
|
329 |
diff --git a/media-video/vlc/vlc-2.2.4.ebuild b/media-video/vlc/vlc-2.2.4.ebuild |
330 |
index 61ac596..a165e1d 100644 |
331 |
--- a/media-video/vlc/vlc-2.2.4.ebuild |
332 |
+++ b/media-video/vlc/vlc-2.2.4.ebuild |
333 |
@@ -230,6 +230,10 @@ PATCHES=( |
334 |
# Bug #575072 |
335 |
"${FILESDIR}"/${PN}-2.2.4-relax_ffmpeg.patch |
336 |
"${FILESDIR}"/${PN}-2.2.4-ffmpeg3.patch |
337 |
+ |
338 |
+ # Bug #589396 |
339 |
+ "${FILESDIR}"/${PN}-2.2.4-qt57.patch |
340 |
+ "${FILESDIR}"/${PN}-2.2.4-cxx0x.patch |
341 |
) |
342 |
|
343 |
DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt ) |
344 |
|
345 |
diff --git a/media-video/vlc/vlc-2.2.9999.ebuild b/media-video/vlc/vlc-2.2.9999.ebuild |
346 |
index 004ccdd..7047721 100644 |
347 |
--- a/media-video/vlc/vlc-2.2.9999.ebuild |
348 |
+++ b/media-video/vlc/vlc-2.2.9999.ebuild |
349 |
@@ -221,6 +221,9 @@ PATCHES=( |
350 |
|
351 |
# Allow QT5.5 since Gentoo has a patched QTwidgets |
352 |
"${FILESDIR}"/${PN}-2.2.2-qt5widgets.patch |
353 |
+ |
354 |
+ # Bug #589396 |
355 |
+ "${FILESDIR}"/${PN}-2.2.4-cxx0x.patch |
356 |
) |
357 |
|
358 |
DOCS=( AUTHORS THANKS NEWS README doc/fortunes.txt doc/intf-vcd.txt ) |