Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/mixxx/, media-sound/mixxx/files/
Date: Sat, 06 May 2017 22:51:11
Message-Id: 1494111063.13cb9bf35c722ff7207da51ecdd16d24df710aab.polynomial-c@gentoo
1 commit: 13cb9bf35c722ff7207da51ecdd16d24df710aab
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 6 22:50:37 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sat May 6 22:51:03 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13cb9bf3
7
8 media-sound/mixxx: Revbump to fix compilation with gcc-6 (bug #595090).
9
10 This revbump also comes with a couple of fixes backported and provided
11 by David Guglielmi (sunny-overlay) in bug #608430.
12
13 Package-Manager: Portage-2.3.5, Repoman-2.3.2
14
15 ...nate-unnecessary-heap-allocation-of-qtime.patch | 55 ++++
16 ...xx-2.0.0-fix-formatting-of-time-durations.patch | 24 ++
17 ...x-2.0.0-fix-formatting-of-time-durations2.patch | 139 ++++++++++
18 ...-2.0.0-fix-missing-pointer-initialization.patch | 271 ++++++++++++++++++++
19 media-sound/mixxx/files/mixxx-2.0.0-gcc62.patch | 24 ++
20 ...n-of-time-formatseconds-into-dot-cpp-file.patch | 88 +++++++
21 ...xx-2.0.0-rmx2-backport-controller-scripts.patch | 280 +++++++++++++++++++++
22 media-sound/mixxx/mixxx-2.0.0-r4.ebuild | 140 +++++++++++
23 8 files changed, 1021 insertions(+)
24
25 diff --git a/media-sound/mixxx/files/mixxx-2.0.0-eliminate-unnecessary-heap-allocation-of-qtime.patch b/media-sound/mixxx/files/mixxx-2.0.0-eliminate-unnecessary-heap-allocation-of-qtime.patch
26 new file mode 100644
27 index 00000000000..04538a01e15
28 --- /dev/null
29 +++ b/media-sound/mixxx/files/mixxx-2.0.0-eliminate-unnecessary-heap-allocation-of-qtime.patch
30 @@ -0,0 +1,55 @@
31 +diff -dNur a/src/analyserwaveform.cpp b/src/analyserwaveform.cpp
32 +--- a/src/analyserwaveform.cpp 2015-12-29 17:10:41.000000000 +0100
33 ++++ b/src/analyserwaveform.cpp 2017-02-04 21:12:30.127952910 +0100
34 +@@ -1,6 +1,3 @@
35 +-#include <QImage>
36 +-#include <QtDebug>
37 +-#include <QTime>
38 + #include <QtDebug>
39 +
40 + #include "analyserwaveform.h"
41 +@@ -40,7 +37,6 @@
42 + }
43 + }
44 +
45 +- m_timer = new QTime();
46 + m_analysisDao = new AnalysisDao(m_database, pConfig);
47 + }
48 +
49 +@@ -48,14 +44,13 @@
50 + qDebug() << "AnalyserWaveform::~AnalyserWaveform()";
51 + destroyFilters();
52 + m_database.close();
53 +- delete m_timer;
54 + delete m_analysisDao;
55 + }
56 +
57 + bool AnalyserWaveform::initialise(TrackPointer tio, int sampleRate, int totalSamples) {
58 + m_skipProcessing = false;
59 +
60 +- m_timer->start();
61 ++ m_timer.start();
62 +
63 + if (totalSamples == 0) {
64 + qWarning() << "AnalyserWaveform::initialise - no waveform/waveform summary";
65 +@@ -320,7 +315,7 @@
66 + #endif
67 +
68 + qDebug() << "Waveform generation for track" << tio->getId() << "done"
69 +- << m_timer->elapsed()/1000.0 << "s";
70 ++ << m_timer.elapsed()/1000.0 << "s";
71 + }
72 +
73 + void AnalyserWaveform::storeIfGreater(float* pDest, float source) {
74 +diff -dNur a/src/analyserwaveform.h b/src/analyserwaveform.h
75 +--- a/src/analyserwaveform.h 2015-12-29 17:10:41.000000000 +0100
76 ++++ b/src/analyserwaveform.h 2017-02-04 21:12:45.367713395 +0100
77 +@@ -171,7 +171,7 @@
78 + EngineFilterIIRBase* m_filter[FilterCount];
79 + std::vector<float> m_buffers[FilterCount];
80 +
81 +- QTime* m_timer;
82 ++ QTime m_timer;
83 + QSqlDatabase m_database;
84 + AnalysisDao* m_analysisDao;
85 +
86
87 diff --git a/media-sound/mixxx/files/mixxx-2.0.0-fix-formatting-of-time-durations.patch b/media-sound/mixxx/files/mixxx-2.0.0-fix-formatting-of-time-durations.patch
88 new file mode 100644
89 index 00000000000..654c01f53b9
90 --- /dev/null
91 +++ b/media-sound/mixxx/files/mixxx-2.0.0-fix-formatting-of-time-durations.patch
92 @@ -0,0 +1,24 @@
93 +From 76c53b0f0a2be7b5cf85fa523f3521a5725affb2 Mon Sep 17 00:00:00 2001
94 +From: Uwe Klotz <uwe_klotz@×××.de>
95 +Date: Fri, 8 Jan 2016 18:22:33 +0100
96 +Subject: [PATCH] Fix formatting of time durations
97 +
98 +---
99 + src/util/time.h | 4 +++-
100 + 1 file changed, 3 insertions(+), 1 deletion(-)
101 +
102 +diff --git a/src/util/time.h b/src/util/time.h
103 +index 29187ad..7b38eb4 100644
104 +--- a/src/util/time.h
105 ++++ b/src/util/time.h
106 +@@ -75,7 +75,9 @@ class Time {
107 + const int days = static_cast<int>(dSeconds) / kSecondsPerDay;
108 + dSeconds -= days * kSecondsPerDay;
109 +
110 +- QTime t = QTime().addMSecs(dSeconds * kMillisPerSecond);
111 ++ // NOTE(uklotzde): Time() constructs a 'null' object, but
112 ++ // we need 'zero' here.
113 ++ QTime t = QTime(0, 0).addMSecs(dSeconds * kMillisPerSecond);
114 +
115 + QString formatString =
116 + (days > 0 ? (QString::number(days) %
117
118 diff --git a/media-sound/mixxx/files/mixxx-2.0.0-fix-formatting-of-time-durations2.patch b/media-sound/mixxx/files/mixxx-2.0.0-fix-formatting-of-time-durations2.patch
119 new file mode 100644
120 index 00000000000..f8c041e4043
121 --- /dev/null
122 +++ b/media-sound/mixxx/files/mixxx-2.0.0-fix-formatting-of-time-durations2.patch
123 @@ -0,0 +1,139 @@
124 +diff -dNur a/src/library/basesqltablemodel.cpp b/src/library/basesqltablemodel.cpp
125 +--- a/src/library/basesqltablemodel.cpp 2015-12-29 17:10:41.000000000 +0100
126 ++++ b/src/library/basesqltablemodel.cpp 2017-02-04 21:33:39.403861857 +0100
127 +@@ -559,7 +559,7 @@
128 + if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_DURATION)) {
129 + int duration = value.toInt();
130 + if (duration > 0) {
131 +- value = Time::formatSeconds(duration, false);
132 ++ value = Time::formatSeconds(duration);
133 + } else {
134 + value = QString();
135 + }
136 +diff -dNur a/src/library/browse/browsethread.cpp b/src/library/browse/browsethread.cpp
137 +--- a/src/library/browse/browsethread.cpp 2015-12-29 17:10:41.000000000 +0100
138 ++++ b/src/library/browse/browsethread.cpp 2017-02-04 21:32:23.605066421 +0100
139 +@@ -185,8 +185,7 @@
140 + item->setData(item->text(), Qt::UserRole);
141 + row_data.insert(COLUMN_COMMENT, item);
142 +
143 +- QString duration = Time::formatSeconds(qVariantValue<int>(
144 +- tio.getDuration()), false);
145 ++ QString duration = Time::formatSeconds(tio.getDuration());
146 + item = new QStandardItem(duration);
147 + item->setToolTip(item->text());
148 + item->setData(item->text(), Qt::UserRole);
149 +diff -dNur a/src/library/cratefeature.cpp b/src/library/cratefeature.cpp
150 +--- a/src/library/cratefeature.cpp 2015-12-29 17:10:41.000000000 +0100
151 ++++ b/src/library/cratefeature.cpp 2017-02-04 21:30:54.962474898 +0100
152 +@@ -493,7 +493,7 @@
153 + crateListTableModel.index(row, durationColumn)).toInt();
154 + m_crateList.append(qMakePair(id, QString("%1 (%2) %3")
155 + .arg(name, QString::number(count),
156 +- Time::formatSeconds(duration, false))));
157 ++ Time::formatSeconds(duration))));
158 + }
159 + }
160 +
161 +diff -dNur a/src/library/playlistfeature.cpp b/src/library/playlistfeature.cpp
162 +--- a/src/library/playlistfeature.cpp 2015-12-29 17:10:41.000000000 +0100
163 ++++ b/src/library/playlistfeature.cpp 2017-02-04 21:33:06.920378091 +0100
164 +@@ -168,7 +168,7 @@
165 + playlistTableModel.index(row, durationColumn)).toInt();
166 + m_playlistList.append(qMakePair(id, QString("%1 (%2) %3")
167 + .arg(name, QString::number(count),
168 +- Time::formatSeconds(duration, false))));
169 ++ Time::formatSeconds(duration))));
170 + }
171 + }
172 +
173 +diff -dNur a/src/trackinfoobject.cpp b/src/trackinfoobject.cpp
174 +--- a/src/trackinfoobject.cpp 2015-12-29 17:10:41.000000000 +0100
175 ++++ b/src/trackinfoobject.cpp 2017-02-04 21:42:36.423323807 +0100
176 +@@ -293,7 +293,7 @@
177 + int iDuration = m_iDuration;
178 + lock.unlock();
179 +
180 +- return Time::formatSeconds(iDuration, false);
181 ++ return Time::formatSeconds(iDuration);
182 + }
183 +
184 + void TrackInfoObject::setLocation(const QString& location) {
185 +diff -dNur a/src/util/time.cpp b/src/util/time.cpp
186 +--- a/src/util/time.cpp 2017-02-04 21:29:44.439595305 +0100
187 ++++ b/src/util/time.cpp 2017-02-04 21:37:54.739803100 +0100
188 +@@ -1,5 +1,7 @@
189 + #include "util/time.h"
190 +
191 ++#include "util/assert.h"
192 ++
193 + // static
194 + LLTIMER Time::s_timer;
195 + // static
196 +@@ -8,7 +10,7 @@
197 + qint64 Time::s_testElapsed_nsecs = 0;
198 +
199 + // static
200 +-QString Time::formatSeconds(double dSeconds, bool showCentis) {
201 ++QString Time::formatSeconds(double dSeconds, Precision precision) {
202 + if (dSeconds < 0) {
203 + return "?";
204 + }
205 +@@ -24,13 +26,14 @@
206 + (days > 0 ? (QString::number(days) %
207 + QLatin1String("'d', ")) : QString()) %
208 + QLatin1String(days > 0 || t.hour() > 0 ? "hh:mm:ss" : "mm:ss") %
209 +- QLatin1String(showCentis ? ".zzz" : "");
210 ++ QLatin1String(Precision::SECONDS == precision ? "" : ".zzz");
211 +
212 + QString timeString = t.toString(formatString);
213 +
214 + // The format string gives us milliseconds but we want
215 + // centiseconds. Slice one character off.
216 +- if (showCentis) {
217 ++ if (Precision::CENTISECONDS == precision) {
218 ++ DEBUG_ASSERT(1 <= timeString.length());
219 + timeString = timeString.left(timeString.length() - 1);
220 + }
221 +
222 +diff -dNur a/src/util/time.h b/src/util/time.h
223 +--- a/src/util/time.h 2017-02-04 21:29:44.439595305 +0100
224 ++++ b/src/util/time.h 2017-02-04 21:41:01.476833822 +0100
225 +@@ -55,10 +55,17 @@
226 + s_testElapsed_nsecs = elapsed * 1000000;
227 + }
228 +
229 +- // The standard way of formatting a time in seconds. Used for display of
230 +- // track duration, etc. showCentis indicates whether to include
231 +- // centisecond-precision or to round to the nearest second.
232 +- static QString formatSeconds(double dSeconds, bool showCentis);
233 ++ enum class Precision {
234 ++ SECONDS,
235 ++ CENTISECONDS,
236 ++ MILLISECONDS
237 ++ };
238 ++
239 ++ // The standard way of formatting a time in seconds. Used for display
240 ++ // of track duration, etc.
241 ++ static QString formatSeconds(
242 ++ double dSeconds,
243 ++ Precision precision = Time::Precision::SECONDS);
244 +
245 + private:
246 + static LLTIMER s_timer;
247 +diff -dNur a/src/widget/wnumberpos.cpp b/src/widget/wnumberpos.cpp
248 +--- a/src/widget/wnumberpos.cpp 2015-12-29 17:10:41.000000000 +0100
249 ++++ b/src/widget/wnumberpos.cpp 2017-02-04 21:41:57.023950430 +0100
250 +@@ -92,10 +92,10 @@
251 + QString valueString;
252 + if (valueMillis >= 0) {
253 + valueString = m_skinText % Time::formatSeconds(
254 +- valueMillis / Time::kMillisPerSecond, true);
255 ++ valueMillis / Time::kMillisPerSecond, Time::Precision::MILLISECONDS);
256 + } else {
257 + valueString = m_skinText % QLatin1String("-") % Time::formatSeconds(
258 +- -valueMillis / Time::kMillisPerSecond, true);
259 ++ -valueMillis / Time::kMillisPerSecond, Time::Precision::CENTISECONDS);
260 + }
261 + setText(valueString);
262 + }
263
264 diff --git a/media-sound/mixxx/files/mixxx-2.0.0-fix-missing-pointer-initialization.patch b/media-sound/mixxx/files/mixxx-2.0.0-fix-missing-pointer-initialization.patch
265 new file mode 100644
266 index 00000000000..3364995ce4f
267 --- /dev/null
268 +++ b/media-sound/mixxx/files/mixxx-2.0.0-fix-missing-pointer-initialization.patch
269 @@ -0,0 +1,271 @@
270 +diff -dNur a/src/analyserwaveform.cpp b/src/analyserwaveform.cpp
271 +--- a/src/analyserwaveform.cpp 2017-02-04 21:14:33.266016824 +0100
272 ++++ b/src/analyserwaveform.cpp 2017-02-04 21:19:09.205671982 +0100
273 +@@ -11,8 +11,8 @@
274 +
275 + AnalyserWaveform::AnalyserWaveform(ConfigObject<ConfigValue>* pConfig) :
276 + m_skipProcessing(false),
277 +- m_waveformData(NULL),
278 +- m_waveformSummaryData(NULL),
279 ++ m_waveformData(nullptr),
280 ++ m_waveformSummaryData(nullptr),
281 + m_stride(0, 0),
282 + m_currentStride(0),
283 + m_currentSummaryStride(0) {
284 +@@ -37,14 +37,13 @@
285 + }
286 + }
287 +
288 +- m_analysisDao = new AnalysisDao(m_database, pConfig);
289 ++ m_pAnalysisDao = std::make_unique<AnalysisDao>(m_database, pConfig);
290 + }
291 +
292 + AnalyserWaveform::~AnalyserWaveform() {
293 + qDebug() << "AnalyserWaveform::~AnalyserWaveform()";
294 + destroyFilters();
295 + m_database.close();
296 +- delete m_analysisDao;
297 + }
298 +
299 + bool AnalyserWaveform::initialise(TrackPointer tio, int sampleRate, int totalSamples) {
300 +@@ -115,7 +114,7 @@
301 +
302 + if (trackId != -1 && (missingWaveform || missingWavesummary)) {
303 + QList<AnalysisDao::AnalysisInfo> analyses =
304 +- m_analysisDao->getAnalysesForTrack(trackId);
305 ++ m_pAnalysisDao->getAnalysesForTrack(trackId);
306 +
307 + QListIterator<AnalysisDao::AnalysisInfo> it(analyses);
308 + while (it.hasNext()) {
309 +@@ -130,7 +129,7 @@
310 + missingWaveform = false;
311 + } else if (vc != WaveformFactory::VC_KEEP) {
312 + // remove all other Analysis except that one we should keep
313 +- m_analysisDao->deleteAnalysis(analysis.analysisId);
314 ++ m_pAnalysisDao->deleteAnalysis(analysis.analysisId);
315 + }
316 + } if (analysis.type == AnalysisDao::TYPE_WAVESUMMARY) {
317 + vc = WaveformFactory::waveformSummaryVersionToVersionClass(analysis.version);
318 +@@ -140,7 +139,7 @@
319 + missingWavesummary = false;
320 + } else if (vc != WaveformFactory::VC_KEEP) {
321 + // remove all other Analysis except that one we should keep
322 +- m_analysisDao->deleteAnalysis(analysis.analysisId);
323 ++ m_pAnalysisDao->deleteAnalysis(analysis.analysisId);
324 + }
325 + }
326 + }
327 +@@ -273,13 +272,13 @@
328 + tio->setWaveform(ConstWaveformPointer());
329 + // Since clear() could delete the waveform, clear our pointer to the
330 + // waveform's vector data first.
331 +- m_waveformData = NULL;
332 ++ m_waveformData = nullptr;
333 + m_waveform.clear();
334 +
335 + tio->setWaveformSummary(ConstWaveformPointer());
336 + // Since clear() could delete the waveform, clear our pointer to the
337 + // waveform's vector data first.
338 +- m_waveformSummaryData = NULL;
339 ++ m_waveformSummaryData = nullptr;
340 + m_waveformSummary.clear();
341 + }
342 +
343 +@@ -295,7 +294,7 @@
344 + m_waveform->setDescription(WaveformFactory::currentWaveformDescription());
345 + // Since clear() could delete the waveform, clear our pointer to the
346 + // waveform's vector data first.
347 +- m_waveformData = NULL;
348 ++ m_waveformData = nullptr;
349 + m_waveform.clear();
350 + }
351 +
352 +@@ -306,7 +305,7 @@
353 + m_waveformSummary->setDescription(WaveformFactory::currentWaveformSummaryDescription());
354 + // Since clear() could delete the waveform, clear our pointer to the
355 + // waveform's vector data first.
356 +- m_waveformSummaryData = NULL;
357 ++ m_waveformSummaryData = nullptr;
358 + m_waveformSummary.clear();
359 + }
360 +
361 +diff -dNur a/src/analyserwaveform.h b/src/analyserwaveform.h
362 +--- a/src/analyserwaveform.h 2017-02-04 21:14:33.266016824 +0100
363 ++++ b/src/analyserwaveform.h 2017-02-04 21:20:17.308598419 +0100
364 +@@ -4,12 +4,14 @@
365 + #include <QTime>
366 + #include <QImage>
367 + #include <QSqlDatabase>
368 ++
369 + #include <limits>
370 +
371 + #include "configobject.h"
372 + #include "analyser.h"
373 + #include "waveform/waveform.h"
374 + #include "util/math.h"
375 ++#include "util/memory.h"
376 +
377 + //NOTS vrince some test to segment sound, to apply color in the waveform
378 + //#define TEST_HEAT_MAP
379 +@@ -173,7 +175,7 @@
380 +
381 + QTime m_timer;
382 + QSqlDatabase m_database;
383 +- AnalysisDao* m_analysisDao;
384 ++ std::unique_ptr<AnalysisDao> m_pAnalysisDao;
385 +
386 + #ifdef TEST_HEAT_MAP
387 + QImage* test_heatMap;
388 +diff -dNur a/src/util/memory.h b/src/util/memory.h
389 +--- a/src/util/memory.h 1970-01-01 01:00:00.000000000 +0100
390 ++++ b/src/util/memory.h 2017-02-04 22:19:41.846922929 +0100
391 +@@ -0,0 +1,149 @@
392 ++// Taken from https://github.com/bstreiff/cppbits
393 ++// Thank you Brandon Streiff!
394 ++
395 ++// Implementation of C++14's make_unique for C++11 compilers.
396 ++//
397 ++// This has been tested with:
398 ++// - MSVC 11.0 (Visual Studio 2012)
399 ++// - gcc 4.6.3
400 ++// - Xcode 4.4 (with clang "4.0")
401 ++//
402 ++// It is based off an implementation proposed by Stephan T. Lavavej for
403 ++// inclusion in the C++14 standard:
404 ++// http://isocpp.org/files/papers/N3656.txt
405 ++// Where appropriate, it borrows the use of MSVC's _VARIADIC_EXPAND_0X macro
406 ++// machinery to compensate for lack of variadic templates.
407 ++//
408 ++// This file injects make_unique into the std namespace, which I acknowledge is
409 ++// technically forbidden ([C++11: 17.6.4.2.2.1/1]), but is necessary in order
410 ++// to have syntax compatibility with C++14.
411 ++//
412 ++// I perform compiler version checking for MSVC, gcc, and clang to ensure that
413 ++// we don't add make_unique if it is already there (instead, we include
414 ++// <memory> to get the compiler-provided one). You can override the compiler
415 ++// version checking by defining the symbol COMPILER_SUPPORTS_MAKE_UNIQUE.
416 ++//
417 ++//
418 ++// ===============================================================================
419 ++// This file is released into the public domain. See LICENCE for more information.
420 ++// ===============================================================================
421 ++
422 ++#ifndef MIXXX_UTIL_MEMORY_H
423 ++#define MIXXX_UTIL_MEMORY_H
424 ++
425 ++// If user hasn't specified COMPILER_SUPPORTS_MAKE_UNIQUE then try to figure out
426 ++// based on compiler version if std::make_unique is provided.
427 ++#if !defined(COMPILER_SUPPORTS_MAKE_UNIQUE)
428 ++ // Compiling with -std=c++11 sets __cplusplus=201103L and disables
429 ++ // std::make_unique() from C++14! We need to take this into account.
430 ++ #define CPLUSPLUS_SUPPORTS_MAKE_UNIQUE (__cplusplus > 201103L)
431 ++ #if defined(_MSC_VER)
432 ++ // std::make_unique was added in MSVC 12.0
433 ++ #if _MSC_VER >= 1800 // MSVC 12.0 (Visual Studio 2013)
434 ++ #define COMPILER_SUPPORTS_MAKE_UNIQUE
435 ++ #endif
436 ++ #elif defined(__clang__)
437 ++ // std::make_unique was added in clang 3.4, but not until Xcode 6.
438 ++ // Annoyingly, Apple makes the clang version defines match the version
439 ++ // of Xcode, not the version of clang.
440 ++ #define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
441 ++ #if defined(__APPLE__) && CLANG_VERSION >= 60000 && CPLUSPLUS_SUPPORTS_MAKE_UNIQUE
442 ++ #define COMPILER_SUPPORTS_MAKE_UNIQUE
443 ++ #elif !defined(__APPLE__) && CLANG_VERSION >= 30400 && CPLUSPLUS_SUPPORTS_MAKE_UNIQUE
444 ++ #define COMPILER_SUPPORTS_MAKE_UNIQUE
445 ++ #endif
446 ++ #elif defined(__GNUC__)
447 ++ // std::make_unique was added in gcc 4.9
448 ++ #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
449 ++ #if GCC_VERSION >= 40900 && CPLUSPLUS_SUPPORTS_MAKE_UNIQUE
450 ++ #define COMPILER_SUPPORTS_MAKE_UNIQUE
451 ++ #endif
452 ++ #endif
453 ++#endif
454 ++
455 ++#if defined(COMPILER_SUPPORTS_MAKE_UNIQUE)
456 ++
457 ++// If the compiler supports std::make_unique, then pull in <memory> to get it.
458 ++#include <memory>
459 ++
460 ++#else
461 ++
462 ++// Otherwise, the compiler doesn't provide it, so implement it ourselves.
463 ++
464 ++#include <cstddef>
465 ++#include <memory>
466 ++#include <type_traits>
467 ++#include <utility>
468 ++
469 ++namespace std {
470 ++
471 ++template<class _Ty> struct _Unique_if {
472 ++ typedef unique_ptr<_Ty> _Single_object;
473 ++};
474 ++
475 ++template<class _Ty> struct _Unique_if<_Ty[]> {
476 ++ typedef unique_ptr<_Ty[]> _Unknown_bound;
477 ++};
478 ++
479 ++template<class _Ty, size_t N> struct _Unique_if<_Ty[N]> {
480 ++ typedef void _Known_bound;
481 ++};
482 ++
483 ++//
484 ++// template< class T, class... Args >
485 ++// unique_ptr<T> make_unique( Args&&... args);
486 ++//
487 ++
488 ++#if defined(_MSC_VER) && (_MSC_VER < 1800)
489 ++
490 ++// Macro machinery because MSVC 11.0 doesn't support variadic templates.
491 ++// The _VARIADIC_EXPAND_0X stuff is defined in <xstddef>
492 ++#define _MAKE_UNIQUE( \
493 ++ TEMPLATE_LIST, PADDING_LIST, LIST, COMMA, X1, X2, X3, X4) \
494 ++ template<class _Ty COMMA LIST(_CLASS_TYPE)> inline \
495 ++ typename _Unique_if<_Ty>::_Single_object make_unique(LIST(_TYPE_REFREF_ARG)) \
496 ++ { \
497 ++ return unique_ptr<_Ty>(new _Ty(LIST(_FORWARD_ARG))); \
498 ++ } \
499 ++
500 ++_VARIADIC_EXPAND_0X(_MAKE_UNIQUE, , , , )
501 ++#undef _MAKE_UNIQUE
502 ++
503 ++#else // not MSVC 11.0 or earlier
504 ++
505 ++template<class _Ty, class... Args>
506 ++ typename _Unique_if<_Ty>::_Single_object
507 ++ make_unique(Args&&... args) {
508 ++ return unique_ptr<_Ty>(new _Ty(std::forward<Args>(args)...));
509 ++ }
510 ++
511 ++#endif
512 ++
513 ++// template< class T >
514 ++// unique_ptr<T> make_unique( std::size_t size );
515 ++
516 ++template<class _Ty>
517 ++ typename _Unique_if<_Ty>::_Unknown_bound
518 ++ make_unique(size_t n) {
519 ++ typedef typename remove_extent<_Ty>::type U;
520 ++ return unique_ptr<_Ty>(new U[n]());
521 ++ }
522 ++
523 ++// template< class T, class... Args >
524 ++// /* unspecified */ make_unique( Args&&... args ) = delete;
525 ++
526 ++// MSVC 11.0 doesn't support deleted functions, so the best we can do
527 ++// is simply not define the function.
528 ++#if !(defined(_MSC_VER) && (_MSC_VER < 1800))
529 ++
530 ++template<class T, class... Args>
531 ++ typename _Unique_if<T>::_Known_bound
532 ++ make_unique(Args&&...) = delete;
533 ++
534 ++#endif
535 ++
536 ++} // namespace std
537 ++
538 ++#endif // !COMPILER_SUPPORTS_MAKE_UNIQUE
539 ++
540 ++#endif /* MIXXX_UTIL_MEMORY_H */
541
542 diff --git a/media-sound/mixxx/files/mixxx-2.0.0-gcc62.patch b/media-sound/mixxx/files/mixxx-2.0.0-gcc62.patch
543 new file mode 100644
544 index 00000000000..c19c914b330
545 --- /dev/null
546 +++ b/media-sound/mixxx/files/mixxx-2.0.0-gcc62.patch
547 @@ -0,0 +1,24 @@
548 +--- a/src/util/math.h 2015-12-29 17:10:41.000000000 +0100
549 ++++ b/src/util/math.h 2016-09-25 12:54:18.345291146 +0200
550 +@@ -3,8 +3,20 @@
551 +
552 + // Causes MSVC to define M_PI and friends.
553 + // http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx
554 ++// Our SConscript defines this but check anyway.
555 ++#ifdef __WINDOWS__
556 ++#ifndef _USE_MATH_DEFINES
557 + #define _USE_MATH_DEFINES
558 +-#include <cmath>
559 ++#endif
560 ++#endif
561 ++
562 ++#include <math.h>
563 ++#include <cmath>
564 ++// Note: Because of our fpclassify hack, we actualy need to inlude both,
565 ++// the c and the c++ version of the math header.
566 ++// From GCC 6.1.1 math.h depends on cmath, which failes to compile if included
567 ++// after our fpclassify hack
568 ++
569 + #include <algorithm>
570 +
571 + #include "util/assert.h"
572
573 diff --git a/media-sound/mixxx/files/mixxx-2.0.0-move-definition-of-time-formatseconds-into-dot-cpp-file.patch b/media-sound/mixxx/files/mixxx-2.0.0-move-definition-of-time-formatseconds-into-dot-cpp-file.patch
574 new file mode 100644
575 index 00000000000..9a95a5d675e
576 --- /dev/null
577 +++ b/media-sound/mixxx/files/mixxx-2.0.0-move-definition-of-time-formatseconds-into-dot-cpp-file.patch
578 @@ -0,0 +1,88 @@
579 +From c2af9e6eeb469718b9aa069b90a719fac80dd0d9 Mon Sep 17 00:00:00 2001
580 +From: Uwe Klotz <uwe_klotz@×××.de>
581 +Date: Fri, 8 Jan 2016 19:25:58 +0100
582 +Subject: [PATCH] Move definition of Time::formatSeconds() into .cpp file
583 +
584 +---
585 + src/util/time.cpp | 30 ++++++++++++++++++++++++++++++
586 + src/util/time.h | 29 +----------------------------
587 + 2 files changed, 31 insertions(+), 28 deletions(-)
588 +
589 +diff --git a/src/util/time.cpp b/src/util/time.cpp
590 +index 998fa73..d8a122b 100644
591 +--- a/src/util/time.cpp
592 ++++ b/src/util/time.cpp
593 +@@ -6,3 +6,33 @@ LLTIMER Time::s_timer;
594 + bool Time::s_testMode = false;
595 + // static
596 + qint64 Time::s_testElapsed_nsecs = 0;
597 ++
598 ++// static
599 ++QString Time::formatSeconds(double dSeconds, bool showCentis) {
600 ++ if (dSeconds < 0) {
601 ++ return "?";
602 ++ }
603 ++
604 ++ const int days = static_cast<int>(dSeconds) / kSecondsPerDay;
605 ++ dSeconds -= days * kSecondsPerDay;
606 ++
607 ++ // NOTE(uklotzde): Time() constructs a 'null' object, but
608 ++ // we need 'zero' here.
609 ++ QTime t = QTime(0, 0).addMSecs(dSeconds * kMillisPerSecond);
610 ++
611 ++ QString formatString =
612 ++ (days > 0 ? (QString::number(days) %
613 ++ QLatin1String("'d', ")) : QString()) %
614 ++ QLatin1String(days > 0 || t.hour() > 0 ? "hh:mm:ss" : "mm:ss") %
615 ++ QLatin1String(showCentis ? ".zzz" : "");
616 ++
617 ++ QString timeString = t.toString(formatString);
618 ++
619 ++ // The format string gives us milliseconds but we want
620 ++ // centiseconds. Slice one character off.
621 ++ if (showCentis) {
622 ++ timeString = timeString.left(timeString.length() - 1);
623 ++ }
624 ++
625 ++ return timeString;
626 ++}
627 +diff --git a/src/util/time.h b/src/util/time.h
628 +index 7b38eb4..b4e2c2d 100644
629 +--- a/src/util/time.h
630 ++++ b/src/util/time.h
631 +@@ -67,34 +67,7 @@ class Time {
632 + // The standard way of formatting a time in seconds. Used for display of
633 + // track duration, etc. showCentis indicates whether to include
634 + // centisecond-precision or to round to the nearest second.
635 +- static QString formatSeconds(double dSeconds, bool showCentis) {
636 +- if (dSeconds < 0) {
637 +- return "?";
638 +- }
639 +-
640 +- const int days = static_cast<int>(dSeconds) / kSecondsPerDay;
641 +- dSeconds -= days * kSecondsPerDay;
642 +-
643 +- // NOTE(uklotzde): Time() constructs a 'null' object, but
644 +- // we need 'zero' here.
645 +- QTime t = QTime(0, 0).addMSecs(dSeconds * kMillisPerSecond);
646 +-
647 +- QString formatString =
648 +- (days > 0 ? (QString::number(days) %
649 +- QLatin1String("'d', ")) : QString()) %
650 +- QLatin1String(days > 0 || t.hour() > 0 ? "hh:mm:ss" : "mm:ss") %
651 +- QLatin1String(showCentis ? ".zzz" : "");
652 +-
653 +- QString timeString = t.toString(formatString);
654 +-
655 +- // The format string gives us milliseconds but we want
656 +- // centiseconds. Slice one character off.
657 +- if (showCentis) {
658 +- timeString = timeString.left(timeString.length() - 1);
659 +- }
660 +-
661 +- return timeString;
662 +- }
663 ++ static QString formatSeconds(double dSeconds, bool showCentis);
664 +
665 + private:
666 + static LLTIMER s_timer;
667
668 diff --git a/media-sound/mixxx/files/mixxx-2.0.0-rmx2-backport-controller-scripts.patch b/media-sound/mixxx/files/mixxx-2.0.0-rmx2-backport-controller-scripts.patch
669 new file mode 100644
670 index 00000000000..a82f27166ab
671 --- /dev/null
672 +++ b/media-sound/mixxx/files/mixxx-2.0.0-rmx2-backport-controller-scripts.patch
673 @@ -0,0 +1,280 @@
674 +diff -dNur a/res/controllers/Hercules-DJ-Console-RMX-2-scripts.js b/res/controllers/Hercules-DJ-Console-RMX-2-scripts.js
675 +--- a/res/controllers/Hercules-DJ-Console-RMX-2-scripts.js 2015-12-29 17:10:41.000000000 +0100
676 ++++ b/res/controllers/Hercules-DJ-Console-RMX-2-scripts.js 2017-02-04 22:01:01.629506434 +0100
677 +@@ -1,128 +1,159 @@
678 +-/*╔══:::Made Lovingly By Circuitfry:::═════════════════════════════════╗
679 +- ║ Hercules DJConsole RMX 2 Mapping Scripts v. 0.1.3 ║
680 +- ╚════════════════════════════════════════════════════════════════════╝
681 +- * Version 0.1.0: Basic Midi Wizard Mapping
682 +- * Version 0.1.1: Partially-Functional platters (version 1).
683 +- * Version 0.1.2: Functional platters (version 1)
684 +- * Version 0.1.3: Functional EQ Kill/Pitch Bending buttons
685 +- Functional Looping/Sample/Effect pads
686 +- Bugfix: Source 2 Gain knob doesn't load tracks.
687 +- Overhaul: MIDI Scripting file.
688 +- Worklog: Need to implement Microphone/Source1/Source2 input.
689 +- * Note 1: [DEP] Means the command is meant for Mixxx v1.10.x + below.
690 +- * Note 2: [FUT] Means the command is meant for Mixxx v1.11.x + above.
691 +-*/
692 +-function DJCRMX2(){}
693 +-DJCRMX2.scratching = [];
694 ++/* ╔══:::Made Lovingly By Circuitfry:::═════════════════════════════════╗
695 ++ * ║ Hercules DJConsole RMX 2 Mapping Scripts ║
696 ++ * ╚════════════════════════════════════════════════════════════════════╝
697 ++ */
698 +
699 +-/* [ Function init ] - Version 0.1.3
700 +- * Initiates some global variables and assigns an ID. Required.
701 +-*/
702 +-DJCRMX2.init = function(id){
703 +- DJCRMX2.id = id;
704 +- DJCRMX2.scratching[1]=false;
705 +- DJCRMX2.scratching[2]=false;
706 +- engine.setValue("[Microphone]","enabled",0);
707 +- engine.setValue("[Microphone]","talkover",0);
708 ++function DJCRMX2() {}
709 ++DJCRMX2.decks = [];
710 ++
711 ++/* [ Function init ]
712 ++ * Initiates some global variables and assigns an ID. Required.
713 ++ */
714 ++DJCRMX2.init = function (id) {
715 ++ DJCRMX2.id = id;
716 ++ DJCRMX2.decks[1] = new DJCRMX2.Deck(1);
717 ++ DJCRMX2.decks[2] = new DJCRMX2.Deck(2);
718 ++ engine.setValue("[Microphone]", "enabled", 0);
719 ++ engine.setValue("[Microphone]", "talkover", 0);
720 + }
721 +
722 +-/* [ Function wheelPress ] - Version 0.1.2
723 +- * Detects whether a jog wheel is pressed or not and sets a specific
724 +- * variable on and off accordingly.
725 +-*/
726 +-DJCRMX2.wheelPress = function (channel, control, value, status, group){
727 +- if (status == 0x90) // If status #144 is active (2 possibilities)
728 +- {
729 +- if (value == 0x7F) // And the jog wheel is pressed down:
730 +- { /* engine.scratchEnable(int,int,float,float,float,bool);
731 +- * [ int deck ] Which track/platter is playing?
732 +- * [ int intervalsPerRev ] # of MIDI signals sent in 1 spin.
733 +- * [ float rpm ] Imaginary vinyl rotation speed.
734 +- * [ float alpha ] Just a fine-tuning variable.
735 +- * [ float beta ] Just a fine-tuning variable.
736 +- * [ bool ramp ] As far as I know, nothing...
737 +- */
738 +- var alpha = 1.0/8;
739 +- var beta = alpha/32;
740 +- if(group=="[Channel1]")
741 +- {
742 +- engine.scratchEnable(1, 250, 50, alpha, beta);
743 +- DJCRMX2.scratching[1] = true; //[DEP]
744 +- }
745 +- if(group=="[Channel2]")
746 +- {
747 +- engine.scratchEnable(2, 250, 50, alpha, beta);
748 +- DJCRMX2.scratching[2] = true; //[DEP]
749 +- }
750 +-
751 +- }
752 +- if (value == 0x00 ) // If the jog wheel is released:
753 +- {
754 +- if(group=="[Channel1]")
755 +- {
756 +- DJCRMX2.scratching[1] = false; // <- v1.10.x and below
757 +- engine.scratchDisable(1);
758 +- }
759 +- if(group=="[Channel2]")
760 +- {
761 +- DJCRMX2.scratching[2] = false; // <- v1.10.x and below
762 +- engine.scratchDisable(2);
763 +- }
764 +- }
765 +- }
766 +- else //Default setting where button is not held down.
767 +- {
768 +- DJCRMX2.scratching[1] = false; // Only for v1.10.x and below
769 +- DJCRMX2.scratching[2] = false; // Only for v1.10.x and below
770 +- engine.scratchDisable(1);
771 +- engine.scratchDisable(2);
772 +- }
773 +- return;
774 ++////////////////////////////////////////////////////////////////////////
775 ++// Decks //
776 ++////////////////////////////////////////////////////////////////////////
777 ++
778 ++DJCRMX2.Deck = function(number) {
779 ++ this.number = number;
780 ++ this.group = "[Channel" + this.number + "]";
781 ++ this.scratchTimer = 0;
782 ++};
783 ++
784 ++DJCRMX2.Deck.prototype.wheelPress = function (value) {
785 ++ if (this.scratchTimer != 0) {
786 ++ // The wheel was touched again, reset the timer.
787 ++ engine.stopTimer(this.scratchTimer);
788 ++ this.scratchTimer = 0;
789 ++ }
790 ++ if (value == 0x7F) {
791 ++ // And the jog wheel is pressed down:
792 ++
793 ++ /* engine.scratchEnable(int,int,float,float,float,bool);
794 ++ * [ int deck ] Which track/platter is playing?
795 ++ * [ int intervalsPerRev ] # of MIDI signals sent in 1 spin.
796 ++ * [ float rpm ] Imaginary vinyl rotation speed.
797 ++ * [ float alpha ] Just a fine-tuning variable.
798 ++ * [ float beta ] Just a fine-tuning variable.
799 ++ * [ bool ramp ] As far as I know, nothing...
800 ++ */
801 ++
802 ++ var alpha = 1.0 / 8;
803 ++ var beta = alpha / 32;
804 ++ engine.scratchEnable(this.number, 256, 33 + 1/3, alpha, beta);
805 ++ } else {
806 ++ // The wheel touch sensor can be overly sensitive, so don't release scratch mode right away.
807 ++ // Depending on how fast the platter was moving, lengthen the time we'll wait.
808 ++ var scratchRate = Math.abs(engine.getValue(this.group, "scratch2"));
809 ++ var inertiaTime = Math.pow(1.8, scratchRate) * 50;
810 ++ if (inertiaTime < 100) {
811 ++ // Just do it now.
812 ++ this.finishWheelPress();
813 ++ } else {
814 ++ this.scratchTimer = engine.beginTimer(
815 ++ 100, "DJCRMX2.decks[" + this.number + "].finishWheelPress()", true);
816 ++ }
817 ++ }
818 ++}
819 ++
820 ++DJCRMX2.Deck.prototype.finishWheelPress = function() {
821 ++ this.scratchTimer = 0;
822 ++ var play = engine.getValue(this.group, "play");
823 ++ if (play != 0) {
824 ++ // If we are playing, just hand off to the engine.
825 ++ engine.scratchDisable(this.number, true);
826 ++ } else {
827 ++ // If things are paused, there will be a non-smooth handoff between scratching and jogging.
828 ++ // Instead, keep scratch on until the platter is not moving.
829 ++ var scratchRate = Math.abs(engine.getValue(this.group, "scratch2"));
830 ++ if (scratchRate < 0.01) {
831 ++ // The platter is basically stopped, now we can disable scratch and hand off to jogging.
832 ++ engine.scratchDisable(this.number, false);
833 ++ } else {
834 ++ // Check again soon.
835 ++ this.scratchTimer = engine.beginTimer(
836 ++ 100, "DJCRMX2.decks[" + this.number + "].finishWheelPress()", true);
837 ++ }
838 ++ }
839 ++};
840 ++
841 ++
842 ++/* [ Function wheelTurn ]
843 ++ * Pays attention to the current deck, checks scratching, affects the
844 ++ * song accordingly.
845 ++ */
846 ++DJCRMX2.Deck.prototype.wheelTurn = function (value) {
847 ++ var newValue = 0;
848 ++ // Spinning backwards = 127 or less (less meaning faster)
849 ++ // Spinning forwards = 1 or more (more meaning faster)
850 ++ if (value - 64 > 0) {
851 ++ newValue = value - 128;
852 ++ } else {
853 ++ newValue = value;
854 ++ }
855 ++
856 ++ if (engine.isScratching(this.number)) {
857 ++ engine.scratchTick(this.number, newValue);
858 ++ } else {
859 ++ engine.setValue(this.group, "jog", newValue);
860 ++ }
861 + }
862 ++
863 ++/* [ Function wheelPress ]
864 ++ * Detects whether a jog wheel is pressed or not and sets a specific
865 ++ * variable on and off accordingly.
866 ++ */
867 ++DJCRMX2.wheelPress = function (channel, control, value, status, group) {
868 ++ var deck = 0;
869 ++ if (group == "[Channel1]") {
870 ++ deck = 1;
871 ++ } else if (group == "[Channel2]") {
872 ++ deck = 2;
873 ++ } else {
874 ++ return;
875 ++ }
876 ++ DJCRMX2.decks[deck].wheelPress(value);
877 ++}
878 ++
879 +
880 +-/* [ Function wheelTurn ] - Version 0.1.2
881 +- * Pays attention to the current deck, checks scratching, affects the
882 +- * song accordingly.
883 +-*/
884 +-DJCRMX2.wheelTurn = function (channel, control, value, status, group){
885 +- var newValue=0;
886 +- // Spinning backwards = 127 or less (less meaning faster)
887 +- // Spinning forwards = 1 or more (more meaning faster)
888 +- if (value-64 > 0) newValue = (value-128);
889 +- else newValue=value;
890 +- //if (!engine.isScratching(DJCRMX2.currentDeck)) // [FUT]
891 +- if(group=="[Channel1]")
892 +- {
893 +- if(DJCRMX2.scratching[1]==true) {engine.scratchTick(1,newValue);return;}
894 +- }
895 +- else if(group=="[Channel2]")
896 +- {
897 +- if(DJCRMX2.scratching[2]==true) {engine.scratchTick(2,newValue);return;}
898 +- }
899 +- engine.setValue(group, "jog", newValue);
900 +- return;
901 ++/* [ Function wheelTurn ]
902 ++ * Pays attention to the current deck, checks scratching, affects the
903 ++ * song accordingly.
904 ++ */
905 ++DJCRMX2.wheelTurn = function (channel, control, value, status, group) {
906 ++ var deck = 0;
907 ++ if (group == "[Channel1]") {
908 ++ deck = 1;
909 ++ } else if (group == "[Channel2]") {
910 ++ deck = 2;
911 ++ } else {
912 ++ return;
913 ++ }
914 ++ DJCRMX2.decks[deck].wheelTurn(value);
915 + }
916 +
917 +-DJCRMX2.micSwitch = function (channel, control, value, status) //???
918 ++DJCRMX2.micSwitch = function (channel, control, value, status)
919 + {
920 +- if(status == 0x90 && control == 0x48 && value == 0x7F)
921 +- {
922 +- engine.setValue("[Microphone]","enabled",1);
923 +- engine.setValue("[Microphone]","talkover",1);
924 +- }
925 +- if(status == 0x90 && control == 0x48 && value == 0x00)
926 +- {
927 +- engine.setValue("[Microphone]","enabled",0);
928 +- engine.setValue("[Microphone]","talkover",0);
929 +- }
930 ++ if (status == 0x90 && control == 0x48 && value == 0x7F) {
931 ++ engine.setValue("[Microphone]","enabled",1);
932 ++ engine.setValue("[Microphone]","talkover",1);
933 ++ } else if (status == 0x90 && control == 0x48 && value == 0x00) {
934 ++ engine.setValue("[Microphone]","enabled",0);
935 ++ engine.setValue("[Microphone]","talkover",0);
936 ++ }
937 + }
938 +
939 +-/* [ Function shutdown ] - Version 0.1.3
940 +- * Sets variables down for shutoff.
941 +-*/
942 +-DJCRMX2.shutdown = function(id){
943 +- DJCRMX2.scratching[1]=false;
944 +- DJCRMX2.scratching[2]=false;
945 +- engine.setValue("[Microphone]","enabled",0);
946 +- engine.setValue("[Microphone]","talkover",0);
947 ++/* [ Function shutdown ] - Version 0.1.3
948 ++ * Sets variables down for shutoff.
949 ++ */
950 ++DJCRMX2.shutdown = function (id) {
951 ++ engine.setValue("[Microphone]", "enabled", 0);
952 ++ engine.setValue("[Microphone]", "talkover", 0);
953 + }
954
955 diff --git a/media-sound/mixxx/mixxx-2.0.0-r4.ebuild b/media-sound/mixxx/mixxx-2.0.0-r4.ebuild
956 new file mode 100644
957 index 00000000000..a67c794493a
958 --- /dev/null
959 +++ b/media-sound/mixxx/mixxx-2.0.0-r4.ebuild
960 @@ -0,0 +1,140 @@
961 +# Copyright 1999-2017 Gentoo Foundation
962 +# Distributed under the terms of the GNU General Public License v2
963 +
964 +EAPI=6
965 +
966 +inherit flag-o-matic scons-utils toolchain-funcs
967 +
968 +DESCRIPTION="Advanced Digital DJ tool based on Qt"
969 +HOMEPAGE="http://www.mixxx.org/"
970 +SRC_URI="http://downloads.${PN}.org/${P}/${P}-src.tar.gz"
971 +
972 +# Upstream patches
973 +SRC_URI+=" https://github.com/mixxxdj/mixxx/commit/51d95ba58d99309f439cb7e2d1285cfb33aa0f63.patch -> ${PN}-2.0.0-ffmpeg30.patch"
974 +SRC_URI+=" https://github.com/mixxxdj/mixxx/commit/869e07067b15e09bf7ef886a8772afdfb79cbc3c.patch -> ${PN}-2.0.0-ffmpeg31.patch"
975 +
976 +LICENSE="GPL-2"
977 +SLOT="0"
978 +KEYWORDS="~amd64 ~x86"
979 +IUSE="aac debug doc ffmpeg hid mp3 mp4 shout wavpack"
980 +
981 +# fails to compile system-fidlib. Add ">media-libs/fidlib-0.9.10-r1" once this
982 +# got fixed
983 +RDEPEND="
984 + dev-db/sqlite
985 + dev-libs/protobuf:0=
986 + dev-qt/qtconcurrent:5
987 + dev-qt/qtcore:5
988 + dev-qt/qtgui:5
989 + dev-qt/qtnetwork:5
990 + dev-qt/qtopengl:5
991 + dev-qt/qtscript:5[scripttools]
992 + dev-qt/qtsql:5
993 + dev-qt/qtsvg:5
994 + dev-qt/qtwidgets:5
995 + dev-qt/qtxml:5
996 + media-libs/chromaprint
997 + media-libs/flac
998 + media-libs/libid3tag
999 + media-libs/libogg
1000 + media-libs/libsndfile
1001 + >=media-libs/libsoundtouch-1.5
1002 + media-libs/libvorbis
1003 + >=media-libs/portaudio-19_pre
1004 + media-libs/portmidi
1005 + media-libs/rubberband
1006 + media-libs/taglib
1007 + media-libs/vamp-plugin-sdk
1008 + sci-libs/fftw:3.0=
1009 + virtual/libusb:1
1010 + virtual/opengl
1011 + x11-libs/libX11
1012 + aac? (
1013 + media-libs/faad2
1014 + media-libs/libmp4v2:0
1015 + )
1016 + hid? ( dev-libs/hidapi )
1017 + mp3? ( media-libs/libmad )
1018 + mp4? ( media-libs/libmp4v2:= )
1019 + shout? ( media-libs/libshout )
1020 + wavpack? ( media-sound/wavpack )
1021 + ffmpeg? ( media-video/ffmpeg:0= )
1022 +"
1023 +# media-libs/rubberband RDEPENDs on sci-libs/fftw:3.0
1024 +DEPEND="
1025 + ${RDEPEND}
1026 + virtual/pkgconfig
1027 + dev-qt/qttest:5
1028 + dev-qt/qtxmlpatterns:5
1029 +"
1030 +
1031 +PATCHES=(
1032 + "${FILESDIR}"/${PN}-2.0.0-docs.patch
1033 +
1034 + "${DISTDIR}"/${P}-ffmpeg30.patch
1035 + "${DISTDIR}"/${P}-ffmpeg31.patch
1036 +
1037 + "${FILESDIR}"/${P}-chromaprint-1.4.patch #604528
1038 + "${FILESDIR}"/${P}-gcc62.patch #595090
1039 +
1040 + # The following patches were taken from sunny-overlay (bug #608430)
1041 + "${FILESDIR}"/${P}-fix-formatting-of-time-durations.patch
1042 + "${FILESDIR}"/${P}-eliminate-unnecessary-heap-allocation-of-qtime.patch
1043 + "${FILESDIR}"/${P}-fix-missing-pointer-initialization.patch
1044 + "${FILESDIR}"/${P}-move-definition-of-time-formatseconds-into-dot-cpp-file.patch
1045 + "${FILESDIR}"/${P}-fix-formatting-of-time-durations2.patch
1046 + "${FILESDIR}"/${P}-rmx2-backport-controller-scripts.patch
1047 +)
1048 +
1049 +src_prepare() {
1050 + # use multilib compatible directory for plugins
1051 + sed -i -e "/unix_lib_path =/s/'lib'/'$(get_libdir)'/" src/SConscript || die
1052 +
1053 + default
1054 +}
1055 +
1056 +src_configure() {
1057 + local myoptimize=0
1058 +
1059 + # Required for >=qt-5.7.0 (bug #590690)
1060 + append-cxxflags -std=c++11
1061 +
1062 + # Try to get cpu type based on CFLAGS.
1063 + # Bug #591968
1064 + for i in $(get-flag mcpu) $(get-flag march) ; do
1065 + if [[ ${i} = native ]] ; then
1066 + myoptimize="native"
1067 + break
1068 + fi
1069 + done
1070 +
1071 + myesconsargs=(
1072 + prefix="${EPREFIX}/usr"
1073 + qtdir="${EPREFIX}/usr/$(get_libdir)/qt5"
1074 + faad="$(usex aac 1 0)"
1075 + ffmpeg="$(usex ffmpeg 1 0)"
1076 + hid="$(usex hid 1 0)"
1077 + hifieq=1
1078 + m4a="$(usex mp4 1 0)"
1079 + mad="$(usex mp3 1 0)"
1080 + optimize="${myoptimize}"
1081 + qdebug="$(usex debug 1 0)"
1082 + qt5=1
1083 + shoutcast="$(usex shout 1 0)"
1084 + vinylcontrol=1
1085 + wv="$(usex wavpack 1 0)"
1086 + )
1087 +}
1088 +
1089 +src_compile() {
1090 + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LINKFLAGS="${LDFLAGS}" \
1091 + LIBDIR="${EPREFIX}/usr/$(get_libdir)" escons ${myesconsargs[@]}
1092 +}
1093 +
1094 +src_install() {
1095 + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LINKFLAGS="${LDFLAGS}" \
1096 + LIBDIR="${EPREFIX}/usr/$(get_libdir)" escons ${myesconsargs[@]} \
1097 + install_root="${ED}"/usr install
1098 +
1099 + dodoc README Mixxx-Manual.pdf
1100 +}