diff options
Diffstat (limited to 'media-sound/mixxx/files')
16 files changed, 1435 insertions, 0 deletions
diff --git a/media-sound/mixxx/files/mixxx-1.10.0-cflags.patch b/media-sound/mixxx/files/mixxx-1.10.0-cflags.patch new file mode 100644 index 000000000000..b6c8655a73a6 --- /dev/null +++ b/media-sound/mixxx/files/mixxx-1.10.0-cflags.patch @@ -0,0 +1,13 @@ +--- mixxx-1.10.0/build/depends.py ++++ mixxx-1.10.0/build/depends.py +@@ -623,10 +555,8 @@ + if build.toolchain_is_gnu: + # Default GNU Options + # TODO(XXX) always generate debugging info? +- build.env.Append(CCFLAGS = '-pipe') + build.env.Append(CCFLAGS = '-Wall') + build.env.Append(CCFLAGS = '-Wextra') +- build.env.Append(CCFLAGS = '-g') + + # Check that g++ is present (yeah, SCONS is a bit dumb here) + if os.system("which g++ > /dev/null"): #Checks for non-zero return code diff --git a/media-sound/mixxx/files/mixxx-1.10.0-docs.patch b/media-sound/mixxx/files/mixxx-1.10.0-docs.patch new file mode 100644 index 000000000000..c9205179881c --- /dev/null +++ b/media-sound/mixxx/files/mixxx-1.10.0-docs.patch @@ -0,0 +1,10 @@ +--- mixxx-1.10.0/src/SConscript ++++ mixxx-1.10.0/src/SConscript +@@ -219,7 +218,6 @@ + env.Alias('install', keyboardmappings) + if int(flags['ladspa']): + env.Alias('install', ladspapresets) +- env.Alias('install', docs) + env.Alias('install', dotdesktop) + env.Alias('install', icon) + env.Alias('install', promotracks) diff --git a/media-sound/mixxx/files/mixxx-1.10.0-no-bzr.patch b/media-sound/mixxx/files/mixxx-1.10.0-no-bzr.patch new file mode 100644 index 000000000000..40f32266bb5e --- /dev/null +++ b/media-sound/mixxx/files/mixxx-1.10.0-no-bzr.patch @@ -0,0 +1,37 @@ +--- mixxx-1.10.0/src/SConscript.env ++++ mixxx-1.10.0/src/SConscript.env +@@ -19,21 +19,6 @@ + print "Deleting deprecated build file: %s" % defs + os.remove(defs) + +-#env.Append(CPPDEFINES=[('BUILD_REV', '"%s"' % getBZRRevision())]) #doing this forces a rebuild of everything whenever a commit happens -- not much fun +-## instead, embed BZR version into build +-## Put version info into a file, so it doesn't force a rebuild of everything :) +-f = open("build.h","w") +-try: +- branch_name = util.get_bzr_branch_name() +- modified = util.get_bzr_modified() > 0 +- # Do not emit BUILD_BRANCH on release branches. +- if not branch_name.startswith('release'): +- f.write('#define BUILD_BRANCH "%s"\n' % branch_name) +- f.write('#define BUILD_REV "%s%s"\n' % (util.get_bzr_revision(), +- '+' if modified else '')) +-finally: +- f.close() +- + #Check for dependencies if we're not doing a clean... + #if not env.GetOption('clean') and not SCons.Util.containsAny(os.sys.argv, ['-h', '--help']): + conf = Configure(env, custom_tests = { 'CheckForPKGConfig' : util.CheckForPKGConfig, +--- mixxx-1.10.0/src/SConscript ++++ mixxx-1.10.0/src/SConscript +@@ -12,8 +12,8 @@ + from build import util + + mixxx_version = util.get_mixxx_version() +-branch_name = util.get_bzr_branch_name() +-bazaar_revision = util.get_bzr_revision() ++#branch_name = util.get_bzr_branch_name() ++#bazaar_revision = util.get_bzr_revision() + print "WE ARE IN:", os.getcwd() + + plugins = [] diff --git a/media-sound/mixxx/files/mixxx-1.10.0-system-libs.patch b/media-sound/mixxx/files/mixxx-1.10.0-system-libs.patch new file mode 100644 index 000000000000..d2e21f3e005b --- /dev/null +++ b/media-sound/mixxx/files/mixxx-1.10.0-system-libs.patch @@ -0,0 +1,172 @@ +--- mixxx-1.10.0/build/depends.py ++++ mixxx-1.10.0/build/depends.py +@@ -21,7 +21,7 @@ + + def configure(self, build, conf): + #Check for PortTime +- if not conf.CheckLib(['porttime', 'libporttime']) and \ ++ if not conf.CheckLib(['porttime', 'libportmidi']) and \ + not conf.CheckHeader(['porttime.h']): + raise Exception("Did not find PortTime or its development headers.") + if not conf.CheckLib(['portmidi', 'libportmidi']) and \ +@@ -189,25 +189,10 @@ + + class FidLib(Dependence): + +- def sources(self, build): +- symbol = None +- if build.platform_is_windows: +- if build.toolchain_is_msvs: +- symbol = 'T_MSVC' +- elif build.crosscompile: +- # Not sure why, but fidlib won't build with mingw32msvc and +- # T_MINGW +- symbol = 'T_LINUX' +- elif build.toolchain_is_gnu: +- symbol = 'T_MINGW' +- else: +- symbol = 'T_LINUX' +- +- return [build.env.StaticObject('#lib/fidlib-0.9.9/fidlib.c', +- CPPDEFINES=symbol)] +- + def configure(self, build, conf): +- build.env.Append(CPPPATH='#lib/fidlib-0.9.9/') ++ if not conf.CheckLib('fidlib'): ++ raise Exception('Did not find fidlib library, exiting!') ++ build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/fidlib']) + + class KissFFT(Dependence): + +@@ -226,68 +211,15 @@ + build.env.Append(CPPPATH="#lib/replaygain") + + class SoundTouch(Dependence): +- SOUNDTOUCH_PATH = 'soundtouch-1.5.0' + + def sources(self, build): +- sources = ['engine/enginebufferscalest.cpp', +- '#lib/%s/SoundTouch.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/TDStretch.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/RateTransposer.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/AAFilter.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/FIFOSampleBuffer.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/FIRFilter.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/PeakFinder.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/BPMDetect.cpp' % self.SOUNDTOUCH_PATH] +- if build.platform_is_windows and build.toolchain_is_msvs: +- if build.machine_is_64bit: +- sources.append( +- '#lib/%s/cpu_detect_x64_win.cpp' % self.SOUNDTOUCH_PATH) +- elif build.machine == 'x86': +- sources.append( +- '#lib/%s/cpu_detect_x86_win.cpp' % self.SOUNDTOUCH_PATH) +- else: +- raise Exception("Unhandled CPU configuration for SoundTouch") +- elif build.toolchain_is_gnu: +- if build.machine == 'x86_64': +- sources.append( +- '#lib/%s/cpu_detect_x64_gcc.cpp' % self.SOUNDTOUCH_PATH) +- else: +- sources.append( +- '#lib/%s/cpu_detect_x86_gcc.cpp' % self.SOUNDTOUCH_PATH) +- else: +- raise Exception("Unhandled CPU configuration for SoundTouch") +- +- # TODO(XXX) when we figure out a better way to represent features, fix +- # this. +- optimize = int(util.get_flags(build.env, 'optimize', 1)) +- if build.machine_is_64bit or \ +- (build.toolchain_is_msvs and optimize > 1) or \ +- (build.toolchain_is_gnu and optimize > 2): +- sources.extend( +- ['#lib/%s/mmx_optimized.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/sse_optimized.cpp' % self.SOUNDTOUCH_PATH, +- ]) +- if build.toolchain_is_msvs and not build.machine_is_64bit: +- sources.append('#lib/%s/3dnow_win.cpp' % self.SOUNDTOUCH_PATH) +- else: +- # TODO(XXX) the docs refer to a 3dnow_gcc, but we don't seem to have +- # it. +- pass +- +- return sources ++ return ['engine/enginebufferscalest.cpp'] + + def configure(self, build, conf): +- if build.platform_is_windows: +- build.env.Append(CPPDEFINES = 'WIN%s' % build.bitwidth) +- build.env.Append(CPPPATH=['#lib/%s' % self.SOUNDTOUCH_PATH]) +- +- # TODO(XXX) when we figure out a better way to represent features, fix +- # this. +- optimize = int(util.get_flags(build.env, 'optimize', 1)) +- if build.machine_is_64bit or \ +- (build.toolchain_is_msvs and optimize > 1) or \ +- (build.toolchain_is_gnu and optimize > 2): +- build.env.Append(CPPDEFINES='ALLOW_X86_OPTIMIZATIONS') ++ if not conf.CheckLib(['SoundTouch','libSoundTouch']): ++ raise Exception('Did not find SoundTouch library, exiting!') ++ build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/soundtouch']) ++ build.env.Append(LIBS='SoundTouch') + + class TagLib(Dependence): + def configure(self, build, conf): +--- mixxx-1.10.0/build/features.py ++++ mixxx-1.10.0/build/features.py +@@ -665,25 +659,15 @@ + test_env.Append(CCFLAGS = '-pthread') + test_env.Append(LINKFLAGS = '-pthread') + +- test_env.Append(CPPPATH="#lib/gtest-1.5.0/include") +- gtest_dir = test_env.Dir("#lib/gtest-1.5.0") +- #gtest_dir.addRepository(build.env.Dir('#lib/gtest-1.5.0')) +- #build.env['EXE_OUTPUT'] = '#/lib/gtest-1.3.0/bin' # example, optional +- test_env['LIB_OUTPUT'] = '#/lib/gtest-1.5.0/lib' +- +- env = test_env +- SCons.Export('env') +- env.SConscript(env.File('SConscript', gtest_dir)) +- +- # build and configure gmock +- test_env.Append(CPPPATH="#lib/gmock-1.5.0/include") +- gmock_dir = test_env.Dir("#lib/gmock-1.5.0") +- #gmock_dir.addRepository(build.env.Dir('#lib/gmock-1.5.0')) +- test_env['LIB_OUTPUT'] = '#/lib/gmock-1.5.0/lib' +- +- env.SConscript(env.File('SConscript', gmock_dir)) +- +- return [] ++ if not conf.CheckLib('gtest'): ++ raise Exception('Did not find gtest library, exiting!') ++ test_env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/gtest']) ++ test_env.Append(LIBS='gtest') ++ ++ if not conf.CheckLib('gmock'): ++ raise Exception('Did not find gmock library, exiting!') ++ test_env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/gmock']) ++ test_env.Append(LIBS='gmock') + + class Shoutcast(Feature): + def description(self): +--- mixxx-1.10.0/src/engine/enginefilterbutterworth8.cpp ++++ mixxx-1.10.0/src/engine/enginefilterbutterworth8.cpp +@@ -20,7 +20,6 @@ + #include "engine/enginefilterbutterworth8.h"
+ #include "engine/enginefilter.h"
+ #include "engine/engineobject.h"
+-#include "../lib/fidlib-0.9.9/fidlib.h"
+
+ /* Local Prototypes */
+ inline double _processLowpass(double *coef, double *buf, register double val);
+--- mixxx-1.10.0/src/engine/enginefilter.h ++++ mixxx-1.10.0/src/engine/enginefilter.h +@@ -20,7 +20,7 @@ + + #define MIXXX + #include "engine/engineobject.h" +-#include "../lib/fidlib-0.9.9/fidlib.h" ++#include "fidlib.h" + #include "defs.h" + + enum filterType{
diff --git a/media-sound/mixxx/files/mixxx-1.11.0-no-bzr.patch b/media-sound/mixxx/files/mixxx-1.11.0-no-bzr.patch new file mode 100644 index 000000000000..b89d7f92f76e --- /dev/null +++ b/media-sound/mixxx/files/mixxx-1.11.0-no-bzr.patch @@ -0,0 +1,35 @@ +--- mixxx-1.11.0/src/SConscript ++++ mixxx-1.11.0/src/SConscript +@@ -12,8 +12,8 @@ + from build import util, depends + + mixxx_version = util.get_mixxx_version() +-branch_name = util.get_bzr_branch_name() +-bazaar_revision = util.get_bzr_revision() ++#branch_name = util.get_bzr_branch_name() ++#bazaar_revision = util.get_bzr_revision() + print "WE ARE IN:", os.getcwd() + + plugins = [] +--- mixxx-1.11.0/src/SConscript.env ++++ mixxx-1.11.0/src/SConscript.env +@@ -20,19 +20,6 @@ + print "Deleting deprecated build file: %s" % defs + os.remove(defs) + +-#env.Append(CPPDEFINES=[('BUILD_REV', '"%s"' % getBZRRevision())]) #doing this forces a rebuild of everything whenever a commit happens -- not much fun +-## instead, embed BZR version into build +-## Put version info into a file, so it doesn't force a rebuild of everything :) +- +-if os.path.exists(os.path.join('..', 'build.h')): +- # If a build.h exists in the project root mixxx/ directory then use that +- # instead of writing our own. This is mostly since when we build Debian +- # packages we don't have any of the Bazaar metadata so we can't write one +- # ourselves. +- shutil.copy(os.path.join('..', 'build.h'), 'build.h') +-else: +- util.write_build_header('build.h') +- + + #Check for dependencies if we're not doing a clean... + #if not env.GetOption('clean') and not SCons.Util.containsAny(os.sys.argv, ['-h', '--help']): diff --git a/media-sound/mixxx/files/mixxx-1.11.0-system-libs.patch b/media-sound/mixxx/files/mixxx-1.11.0-system-libs.patch new file mode 100644 index 000000000000..2f6b62c3440a --- /dev/null +++ b/media-sound/mixxx/files/mixxx-1.11.0-system-libs.patch @@ -0,0 +1,223 @@ +--- mixxx-1.11.0/build/depends.py ++++ mixxx-1.11.0/build/depends.py +@@ -179,8 +179,8 @@ + # times. + + qt_modules = [ +- 'QtCore', 'QtGui', 'QtOpenGL', 'QtXml', 'QtSvg', +- 'QtSql', 'QtScript', 'QtXmlPatterns', 'QtNetwork' ++ 'QtCore', 'QtGui', 'QtOpenGL', 'QtXml', ++ 'QtSql', 'QtScript', 'QtNetwork' + #'QtUiTools', #'QtDesigner', + ] + +@@ -298,25 +298,10 @@ + + class FidLib(Dependence): + +- def sources(self, build): +- symbol = None +- if build.platform_is_windows: +- if build.toolchain_is_msvs: +- symbol = 'T_MSVC' +- elif build.crosscompile: +- # Not sure why, but fidlib won't build with mingw32msvc and +- # T_MINGW +- symbol = 'T_LINUX' +- elif build.toolchain_is_gnu: +- symbol = 'T_MINGW' +- else: +- symbol = 'T_LINUX' +- +- return [build.env.StaticObject('#lib/fidlib-0.9.10/fidlib.c', +- CPPDEFINES=symbol)] +- + def configure(self, build, conf): +- build.env.Append(CPPPATH='#lib/fidlib-0.9.10/') ++ if not conf.CheckLib('fidlib'): ++ raise Exception('Did not find fidlib library, exiting!') ++ build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/fidlib']) + + class ReplayGain(Dependence): + +@@ -327,7 +312,6 @@ + build.env.Append(CPPPATH="#lib/replaygain") + + class SoundTouch(Dependence): +- SOUNDTOUCH_PATH = 'soundtouch-1.6.0' + + def sse_enabled(self, build): + optimize = int(util.get_flags(build.env, 'optimize', 1)) +@@ -336,30 +320,7 @@ + (build.toolchain_is_gnu and optimize > 1)) + + def sources(self, build): +- sources = ['engine/enginebufferscalest.cpp', +- '#lib/%s/SoundTouch.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/TDStretch.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/RateTransposer.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/AAFilter.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/FIFOSampleBuffer.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/FIRFilter.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/PeakFinder.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/BPMDetect.cpp' % self.SOUNDTOUCH_PATH] +- +- # SoundTouch CPU optimizations are only for x86 +- # architectures. SoundTouch automatically ignores these files when it is +- # not being built for an architecture that supports them. +- cpu_detection = '#lib/%s/cpu_detect_x86_win.cpp' if build.toolchain_is_msvs else \ +- '#lib/%s/cpu_detect_x86_gcc.cpp' +- sources.append(cpu_detection % self.SOUNDTOUCH_PATH) +- +- # Check if the compiler has SSE extention enabled +- # Allways the case on x64 (core instructions) +- if self.sse_enabled(build): +- sources.extend( +- ['#lib/%s/mmx_optimized.cpp' % self.SOUNDTOUCH_PATH, +- '#lib/%s/sse_optimized.cpp' % self.SOUNDTOUCH_PATH,]) +- return sources ++ return ['engine/enginebufferscalest.cpp'] + + def configure(self, build, conf, env=None): + if env is None: +@@ -367,13 +328,10 @@ + if build.platform_is_windows: + # Regardless of the bitwidth, ST checks for WIN32 + env.Append(CPPDEFINES = 'WIN32') +- env.Append(CPPPATH=['#lib/%s' % self.SOUNDTOUCH_PATH]) +- +- # Check if the compiler has SSE extention enabled +- # Allways the case on x64 (core instructions) +- optimize = int(util.get_flags(env, 'optimize', 1)) +- if self.sse_enabled(build): +- env.Append(CPPDEFINES='SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS') ++ if not conf.CheckLib(['SoundTouch','libSoundTouch']): ++ raise Exception('Did not find SoundTouch library, exiting!') ++ build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/soundtouch']) ++ build.env.Append(LIBS='SoundTouch') + + class TagLib(Dependence): + def configure(self, build, conf): +--- mixxx-1.11.0/build/features.py ++++ mixxx-1.11.0/build/features.py +@@ -48,7 +48,6 @@ + 'controllers/midi/hss1394enumerator.cpp'] + + class HID(Feature): +- HIDAPI_INTERNAL_PATH = '#lib/hidapi-0.8.0-pre' + def description(self): + return "HID controller support" + +@@ -64,9 +63,6 @@ + def configure(self, build, conf): + if not self.enabled(build): + return +- # TODO(XXX) allow external hidapi install, but for now we just use our +- # internal one. +- build.env.Append(CPPPATH=[os.path.join(self.HIDAPI_INTERNAL_PATH, 'hidapi')]) + + if build.platform_is_linux: + build.env.ParseConfig('pkg-config libusb-1.0 --silence-errors --cflags --libs') +@@ -86,19 +82,17 @@ + + build.env.Append(CPPDEFINES = '__HID__') + ++ if not conf.CheckLib('hidapi-libusb'): ++ raise Exception('Did not find HID API library, exiting!') ++ build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/hidapi']) ++ build.env.Append(LIBS='hidapi-libusb') ++ ++ + def sources(self, build): + sources = ['controllers/hid/hidcontroller.cpp', + 'controllers/hid/hidenumerator.cpp', + 'controllers/hid/hidcontrollerpresetfilehandler.cpp'] + +- if build.platform_is_windows: +- # Requires setupapi.lib which is included by the above check for +- # setupapi. +- sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, "windows/hid.c")) +- elif build.platform_is_linux: +- sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, 'linux/hid-libusb.c')) +- elif build.platform_is_osx: +- sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, 'mac/hid.c')) + return sources + + class Bulk(Feature): +@@ -455,19 +449,6 @@ + + build.env.Append(CPPDEFINES = '__VAMP__') + +- # Needed on Linux at least. Maybe needed elsewhere? +- if build.platform_is_linux: +- # Optionally link libdl and libX11. Required for some distros. +- conf.CheckLib(['dl', 'libdl']) +- conf.CheckLib(['X11', 'libX11']) +- +- # FFTW3 support +- have_fftw3_h = conf.CheckHeader('fftw3.h') +- have_fftw3 = conf.CheckLib('fftw3', autoadd=False) +- if(have_fftw3_h and have_fftw3 and build.platform_is_linux): +- build.env.Append(CPPDEFINES = 'HAVE_FFTW3') +- build.env.ParseConfig('pkg-config fftw3 --silence-errors --cflags --libs') +- + def sources(self, build): + sources = ['vamp/vampanalyser.cpp', + 'vamp/vamppluginloader.cpp', +@@ -725,25 +706,15 @@ + test_env.Append(CCFLAGS = '-pthread') + test_env.Append(LINKFLAGS = '-pthread') + +- test_env.Append(CPPPATH="#lib/gtest-1.5.0/include") +- gtest_dir = test_env.Dir("#lib/gtest-1.5.0") +- #gtest_dir.addRepository(build.env.Dir('#lib/gtest-1.5.0')) +- #build.env['EXE_OUTPUT'] = '#/lib/gtest-1.3.0/bin' # example, optional +- test_env['LIB_OUTPUT'] = '#/lib/gtest-1.5.0/lib' +- +- env = test_env +- SCons.Export('env') +- env.SConscript(env.File('SConscript', gtest_dir)) +- +- # build and configure gmock +- test_env.Append(CPPPATH="#lib/gmock-1.5.0/include") +- gmock_dir = test_env.Dir("#lib/gmock-1.5.0") +- #gmock_dir.addRepository(build.env.Dir('#lib/gmock-1.5.0')) +- test_env['LIB_OUTPUT'] = '#/lib/gmock-1.5.0/lib' +- +- env.SConscript(env.File('SConscript', gmock_dir)) +- +- return [] ++ if not conf.CheckLib('gtest'): ++ raise Exception('Did not find gtest library, exiting!') ++ test_env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/gtest']) ++ test_env.Append(LIBS='gtest') ++ ++ if not conf.CheckLib('gmock'): ++ raise Exception('Did not find gmock library, exiting!') ++ test_env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/gmock']) ++ test_env.Append(LIBS='gmock') + + class Shoutcast(Feature): + def description(self): +--- mixxx-1.11.0/src/engine/enginefilterbutterworth8.cpp ++++ mixxx-1.11.0/src/engine/enginefilterbutterworth8.cpp +@@ -20,7 +20,7 @@ + #include "engine/enginefilterbutterworth8.h"
+ #include "engine/enginefilter.h"
+ #include "engine/engineobject.h"
+-#include "../lib/fidlib-0.9.10/fidlib.h"
++#include <fidlib.h>
+
+ /* Local Prototypes */
+ inline double _processLowpass(double *coef, double *buf, register double val);
+--- mixxx-1.11.0/src/engine/enginefilter.h ++++ mixxx-1.11.0/src/engine/enginefilter.h +@@ -20,7 +20,7 @@ + + #define MIXXX + #include "engine/engineobject.h" +-#include "../lib/fidlib-0.9.10/fidlib.h" ++#include <fidlib.h> + #include "defs.h" + + enum filterType{ diff --git a/media-sound/mixxx/files/mixxx-2.0.0-chromaprint-1.4.patch b/media-sound/mixxx/files/mixxx-2.0.0-chromaprint-1.4.patch new file mode 100644 index 000000000000..77827f3d8d81 --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-chromaprint-1.4.patch @@ -0,0 +1,40 @@ +Backported chromaprint-1.4 API changes based on the fix suggested in: +https://github.com/mixxxdj/mixxx/pull/1073 + +and the work done by Charlie Gehlin in: +https://bugs.gentoo.org/604528 + +--- mixxx-2.0.0/src/musicbrainz/chromaprinter.cpp ++++ mixxx-2.0.0/src/musicbrainz/chromaprinter.cpp +@@ -25,6 +25,16 @@ + + QString ChromaPrinter::calcFingerPrint(const Mixxx::SoundSourcePointer& pSoundSource) { + ++ // Type declarations of *fprint and *encoded pointers need to account for Chromaprint API version ++ // (void* -> uint32_t*) and (void* -> char*) changed in versions v1.4.0 or later -- alyptik 12/2016 ++ #if (CHROMAPRINT_VERSION_MINOR > 3) || (CHROMAPRINT_VERSION_MAJOR > 1) ++ typedef uint32_t* uint32_p; ++ typedef char* char_p; ++ #else ++ typedef void* uint32_p; ++ typedef void* char_p; ++ #endif ++ + // this is worth 2min of audio, multiply by 2 because we have 2 channels + // AcoustID only stores a fingerprint for the first two minutes of a song + // on their server so we need only a fingerprint of the first two minutes +@@ -57,12 +67,12 @@ + } + chromaprint_finish(ctx); + +- void* fprint = NULL; ++ uint32_p fprint = NULL; + int size = 0; + int ret = chromaprint_get_raw_fingerprint(ctx, &fprint, &size); + QByteArray fingerprint; + if (ret == 1) { +- void* encoded = NULL; ++ char_p encoded = NULL; + int encoded_size = 0; + chromaprint_encode_fingerprint(fprint, size, + CHROMAPRINT_ALGORITHM_DEFAULT, diff --git a/media-sound/mixxx/files/mixxx-2.0.0-docs.patch b/media-sound/mixxx/files/mixxx-2.0.0-docs.patch new file mode 100644 index 000000000000..702ce6cd8df5 --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-docs.patch @@ -0,0 +1,10 @@ +--- mixxx-9999/src/SConscript ++++ mixxx-9999/src/SConscript +@@ -290,7 +290,6 @@ + env.Alias('install', controllermappings) + env.Alias('install', translations) + env.Alias('install', keyboardmappings) +- env.Alias('install', docs) + env.Alias('install', dotdesktop) + env.Alias('install', icon) + env.Alias('install', promotracks) 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 new file mode 100644 index 000000000000..04538a01e15a --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-eliminate-unnecessary-heap-allocation-of-qtime.patch @@ -0,0 +1,55 @@ +diff -dNur a/src/analyserwaveform.cpp b/src/analyserwaveform.cpp +--- a/src/analyserwaveform.cpp 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/analyserwaveform.cpp 2017-02-04 21:12:30.127952910 +0100 +@@ -1,6 +1,3 @@ +-#include <QImage> +-#include <QtDebug> +-#include <QTime> + #include <QtDebug> + + #include "analyserwaveform.h" +@@ -40,7 +37,6 @@ + } + } + +- m_timer = new QTime(); + m_analysisDao = new AnalysisDao(m_database, pConfig); + } + +@@ -48,14 +44,13 @@ + qDebug() << "AnalyserWaveform::~AnalyserWaveform()"; + destroyFilters(); + m_database.close(); +- delete m_timer; + delete m_analysisDao; + } + + bool AnalyserWaveform::initialise(TrackPointer tio, int sampleRate, int totalSamples) { + m_skipProcessing = false; + +- m_timer->start(); ++ m_timer.start(); + + if (totalSamples == 0) { + qWarning() << "AnalyserWaveform::initialise - no waveform/waveform summary"; +@@ -320,7 +315,7 @@ + #endif + + qDebug() << "Waveform generation for track" << tio->getId() << "done" +- << m_timer->elapsed()/1000.0 << "s"; ++ << m_timer.elapsed()/1000.0 << "s"; + } + + void AnalyserWaveform::storeIfGreater(float* pDest, float source) { +diff -dNur a/src/analyserwaveform.h b/src/analyserwaveform.h +--- a/src/analyserwaveform.h 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/analyserwaveform.h 2017-02-04 21:12:45.367713395 +0100 +@@ -171,7 +171,7 @@ + EngineFilterIIRBase* m_filter[FilterCount]; + std::vector<float> m_buffers[FilterCount]; + +- QTime* m_timer; ++ QTime m_timer; + QSqlDatabase m_database; + AnalysisDao* m_analysisDao; + 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 new file mode 100644 index 000000000000..654c01f53b9d --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-fix-formatting-of-time-durations.patch @@ -0,0 +1,24 @@ +From 76c53b0f0a2be7b5cf85fa523f3521a5725affb2 Mon Sep 17 00:00:00 2001 +From: Uwe Klotz <uwe_klotz@web.de> +Date: Fri, 8 Jan 2016 18:22:33 +0100 +Subject: [PATCH] Fix formatting of time durations + +--- + src/util/time.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/util/time.h b/src/util/time.h +index 29187ad..7b38eb4 100644 +--- a/src/util/time.h ++++ b/src/util/time.h +@@ -75,7 +75,9 @@ class Time { + const int days = static_cast<int>(dSeconds) / kSecondsPerDay; + dSeconds -= days * kSecondsPerDay; + +- QTime t = QTime().addMSecs(dSeconds * kMillisPerSecond); ++ // NOTE(uklotzde): Time() constructs a 'null' object, but ++ // we need 'zero' here. ++ QTime t = QTime(0, 0).addMSecs(dSeconds * kMillisPerSecond); + + QString formatString = + (days > 0 ? (QString::number(days) % 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 new file mode 100644 index 000000000000..f8c041e4043e --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-fix-formatting-of-time-durations2.patch @@ -0,0 +1,139 @@ +diff -dNur a/src/library/basesqltablemodel.cpp b/src/library/basesqltablemodel.cpp +--- a/src/library/basesqltablemodel.cpp 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/library/basesqltablemodel.cpp 2017-02-04 21:33:39.403861857 +0100 +@@ -559,7 +559,7 @@ + if (column == fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_DURATION)) { + int duration = value.toInt(); + if (duration > 0) { +- value = Time::formatSeconds(duration, false); ++ value = Time::formatSeconds(duration); + } else { + value = QString(); + } +diff -dNur a/src/library/browse/browsethread.cpp b/src/library/browse/browsethread.cpp +--- a/src/library/browse/browsethread.cpp 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/library/browse/browsethread.cpp 2017-02-04 21:32:23.605066421 +0100 +@@ -185,8 +185,7 @@ + item->setData(item->text(), Qt::UserRole); + row_data.insert(COLUMN_COMMENT, item); + +- QString duration = Time::formatSeconds(qVariantValue<int>( +- tio.getDuration()), false); ++ QString duration = Time::formatSeconds(tio.getDuration()); + item = new QStandardItem(duration); + item->setToolTip(item->text()); + item->setData(item->text(), Qt::UserRole); +diff -dNur a/src/library/cratefeature.cpp b/src/library/cratefeature.cpp +--- a/src/library/cratefeature.cpp 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/library/cratefeature.cpp 2017-02-04 21:30:54.962474898 +0100 +@@ -493,7 +493,7 @@ + crateListTableModel.index(row, durationColumn)).toInt(); + m_crateList.append(qMakePair(id, QString("%1 (%2) %3") + .arg(name, QString::number(count), +- Time::formatSeconds(duration, false)))); ++ Time::formatSeconds(duration)))); + } + } + +diff -dNur a/src/library/playlistfeature.cpp b/src/library/playlistfeature.cpp +--- a/src/library/playlistfeature.cpp 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/library/playlistfeature.cpp 2017-02-04 21:33:06.920378091 +0100 +@@ -168,7 +168,7 @@ + playlistTableModel.index(row, durationColumn)).toInt(); + m_playlistList.append(qMakePair(id, QString("%1 (%2) %3") + .arg(name, QString::number(count), +- Time::formatSeconds(duration, false)))); ++ Time::formatSeconds(duration)))); + } + } + +diff -dNur a/src/trackinfoobject.cpp b/src/trackinfoobject.cpp +--- a/src/trackinfoobject.cpp 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/trackinfoobject.cpp 2017-02-04 21:42:36.423323807 +0100 +@@ -293,7 +293,7 @@ + int iDuration = m_iDuration; + lock.unlock(); + +- return Time::formatSeconds(iDuration, false); ++ return Time::formatSeconds(iDuration); + } + + void TrackInfoObject::setLocation(const QString& location) { +diff -dNur a/src/util/time.cpp b/src/util/time.cpp +--- a/src/util/time.cpp 2017-02-04 21:29:44.439595305 +0100 ++++ b/src/util/time.cpp 2017-02-04 21:37:54.739803100 +0100 +@@ -1,5 +1,7 @@ + #include "util/time.h" + ++#include "util/assert.h" ++ + // static + LLTIMER Time::s_timer; + // static +@@ -8,7 +10,7 @@ + qint64 Time::s_testElapsed_nsecs = 0; + + // static +-QString Time::formatSeconds(double dSeconds, bool showCentis) { ++QString Time::formatSeconds(double dSeconds, Precision precision) { + if (dSeconds < 0) { + return "?"; + } +@@ -24,13 +26,14 @@ + (days > 0 ? (QString::number(days) % + QLatin1String("'d', ")) : QString()) % + QLatin1String(days > 0 || t.hour() > 0 ? "hh:mm:ss" : "mm:ss") % +- QLatin1String(showCentis ? ".zzz" : ""); ++ QLatin1String(Precision::SECONDS == precision ? "" : ".zzz"); + + QString timeString = t.toString(formatString); + + // The format string gives us milliseconds but we want + // centiseconds. Slice one character off. +- if (showCentis) { ++ if (Precision::CENTISECONDS == precision) { ++ DEBUG_ASSERT(1 <= timeString.length()); + timeString = timeString.left(timeString.length() - 1); + } + +diff -dNur a/src/util/time.h b/src/util/time.h +--- a/src/util/time.h 2017-02-04 21:29:44.439595305 +0100 ++++ b/src/util/time.h 2017-02-04 21:41:01.476833822 +0100 +@@ -55,10 +55,17 @@ + s_testElapsed_nsecs = elapsed * 1000000; + } + +- // The standard way of formatting a time in seconds. Used for display of +- // track duration, etc. showCentis indicates whether to include +- // centisecond-precision or to round to the nearest second. +- static QString formatSeconds(double dSeconds, bool showCentis); ++ enum class Precision { ++ SECONDS, ++ CENTISECONDS, ++ MILLISECONDS ++ }; ++ ++ // The standard way of formatting a time in seconds. Used for display ++ // of track duration, etc. ++ static QString formatSeconds( ++ double dSeconds, ++ Precision precision = Time::Precision::SECONDS); + + private: + static LLTIMER s_timer; +diff -dNur a/src/widget/wnumberpos.cpp b/src/widget/wnumberpos.cpp +--- a/src/widget/wnumberpos.cpp 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/widget/wnumberpos.cpp 2017-02-04 21:41:57.023950430 +0100 +@@ -92,10 +92,10 @@ + QString valueString; + if (valueMillis >= 0) { + valueString = m_skinText % Time::formatSeconds( +- valueMillis / Time::kMillisPerSecond, true); ++ valueMillis / Time::kMillisPerSecond, Time::Precision::MILLISECONDS); + } else { + valueString = m_skinText % QLatin1String("-") % Time::formatSeconds( +- -valueMillis / Time::kMillisPerSecond, true); ++ -valueMillis / Time::kMillisPerSecond, Time::Precision::CENTISECONDS); + } + setText(valueString); + } 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 new file mode 100644 index 000000000000..3364995ce4f5 --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-fix-missing-pointer-initialization.patch @@ -0,0 +1,271 @@ +diff -dNur a/src/analyserwaveform.cpp b/src/analyserwaveform.cpp +--- a/src/analyserwaveform.cpp 2017-02-04 21:14:33.266016824 +0100 ++++ b/src/analyserwaveform.cpp 2017-02-04 21:19:09.205671982 +0100 +@@ -11,8 +11,8 @@ + + AnalyserWaveform::AnalyserWaveform(ConfigObject<ConfigValue>* pConfig) : + m_skipProcessing(false), +- m_waveformData(NULL), +- m_waveformSummaryData(NULL), ++ m_waveformData(nullptr), ++ m_waveformSummaryData(nullptr), + m_stride(0, 0), + m_currentStride(0), + m_currentSummaryStride(0) { +@@ -37,14 +37,13 @@ + } + } + +- m_analysisDao = new AnalysisDao(m_database, pConfig); ++ m_pAnalysisDao = std::make_unique<AnalysisDao>(m_database, pConfig); + } + + AnalyserWaveform::~AnalyserWaveform() { + qDebug() << "AnalyserWaveform::~AnalyserWaveform()"; + destroyFilters(); + m_database.close(); +- delete m_analysisDao; + } + + bool AnalyserWaveform::initialise(TrackPointer tio, int sampleRate, int totalSamples) { +@@ -115,7 +114,7 @@ + + if (trackId != -1 && (missingWaveform || missingWavesummary)) { + QList<AnalysisDao::AnalysisInfo> analyses = +- m_analysisDao->getAnalysesForTrack(trackId); ++ m_pAnalysisDao->getAnalysesForTrack(trackId); + + QListIterator<AnalysisDao::AnalysisInfo> it(analyses); + while (it.hasNext()) { +@@ -130,7 +129,7 @@ + missingWaveform = false; + } else if (vc != WaveformFactory::VC_KEEP) { + // remove all other Analysis except that one we should keep +- m_analysisDao->deleteAnalysis(analysis.analysisId); ++ m_pAnalysisDao->deleteAnalysis(analysis.analysisId); + } + } if (analysis.type == AnalysisDao::TYPE_WAVESUMMARY) { + vc = WaveformFactory::waveformSummaryVersionToVersionClass(analysis.version); +@@ -140,7 +139,7 @@ + missingWavesummary = false; + } else if (vc != WaveformFactory::VC_KEEP) { + // remove all other Analysis except that one we should keep +- m_analysisDao->deleteAnalysis(analysis.analysisId); ++ m_pAnalysisDao->deleteAnalysis(analysis.analysisId); + } + } + } +@@ -273,13 +272,13 @@ + tio->setWaveform(ConstWaveformPointer()); + // Since clear() could delete the waveform, clear our pointer to the + // waveform's vector data first. +- m_waveformData = NULL; ++ m_waveformData = nullptr; + m_waveform.clear(); + + tio->setWaveformSummary(ConstWaveformPointer()); + // Since clear() could delete the waveform, clear our pointer to the + // waveform's vector data first. +- m_waveformSummaryData = NULL; ++ m_waveformSummaryData = nullptr; + m_waveformSummary.clear(); + } + +@@ -295,7 +294,7 @@ + m_waveform->setDescription(WaveformFactory::currentWaveformDescription()); + // Since clear() could delete the waveform, clear our pointer to the + // waveform's vector data first. +- m_waveformData = NULL; ++ m_waveformData = nullptr; + m_waveform.clear(); + } + +@@ -306,7 +305,7 @@ + m_waveformSummary->setDescription(WaveformFactory::currentWaveformSummaryDescription()); + // Since clear() could delete the waveform, clear our pointer to the + // waveform's vector data first. +- m_waveformSummaryData = NULL; ++ m_waveformSummaryData = nullptr; + m_waveformSummary.clear(); + } + +diff -dNur a/src/analyserwaveform.h b/src/analyserwaveform.h +--- a/src/analyserwaveform.h 2017-02-04 21:14:33.266016824 +0100 ++++ b/src/analyserwaveform.h 2017-02-04 21:20:17.308598419 +0100 +@@ -4,12 +4,14 @@ + #include <QTime> + #include <QImage> + #include <QSqlDatabase> ++ + #include <limits> + + #include "configobject.h" + #include "analyser.h" + #include "waveform/waveform.h" + #include "util/math.h" ++#include "util/memory.h" + + //NOTS vrince some test to segment sound, to apply color in the waveform + //#define TEST_HEAT_MAP +@@ -173,7 +175,7 @@ + + QTime m_timer; + QSqlDatabase m_database; +- AnalysisDao* m_analysisDao; ++ std::unique_ptr<AnalysisDao> m_pAnalysisDao; + + #ifdef TEST_HEAT_MAP + QImage* test_heatMap; +diff -dNur a/src/util/memory.h b/src/util/memory.h +--- a/src/util/memory.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/src/util/memory.h 2017-02-04 22:19:41.846922929 +0100 +@@ -0,0 +1,149 @@ ++// Taken from https://github.com/bstreiff/cppbits ++// Thank you Brandon Streiff! ++ ++// Implementation of C++14's make_unique for C++11 compilers. ++// ++// This has been tested with: ++// - MSVC 11.0 (Visual Studio 2012) ++// - gcc 4.6.3 ++// - Xcode 4.4 (with clang "4.0") ++// ++// It is based off an implementation proposed by Stephan T. Lavavej for ++// inclusion in the C++14 standard: ++// http://isocpp.org/files/papers/N3656.txt ++// Where appropriate, it borrows the use of MSVC's _VARIADIC_EXPAND_0X macro ++// machinery to compensate for lack of variadic templates. ++// ++// This file injects make_unique into the std namespace, which I acknowledge is ++// technically forbidden ([C++11: 17.6.4.2.2.1/1]), but is necessary in order ++// to have syntax compatibility with C++14. ++// ++// I perform compiler version checking for MSVC, gcc, and clang to ensure that ++// we don't add make_unique if it is already there (instead, we include ++// <memory> to get the compiler-provided one). You can override the compiler ++// version checking by defining the symbol COMPILER_SUPPORTS_MAKE_UNIQUE. ++// ++// ++// =============================================================================== ++// This file is released into the public domain. See LICENCE for more information. ++// =============================================================================== ++ ++#ifndef MIXXX_UTIL_MEMORY_H ++#define MIXXX_UTIL_MEMORY_H ++ ++// If user hasn't specified COMPILER_SUPPORTS_MAKE_UNIQUE then try to figure out ++// based on compiler version if std::make_unique is provided. ++#if !defined(COMPILER_SUPPORTS_MAKE_UNIQUE) ++ // Compiling with -std=c++11 sets __cplusplus=201103L and disables ++ // std::make_unique() from C++14! We need to take this into account. ++ #define CPLUSPLUS_SUPPORTS_MAKE_UNIQUE (__cplusplus > 201103L) ++ #if defined(_MSC_VER) ++ // std::make_unique was added in MSVC 12.0 ++ #if _MSC_VER >= 1800 // MSVC 12.0 (Visual Studio 2013) ++ #define COMPILER_SUPPORTS_MAKE_UNIQUE ++ #endif ++ #elif defined(__clang__) ++ // std::make_unique was added in clang 3.4, but not until Xcode 6. ++ // Annoyingly, Apple makes the clang version defines match the version ++ // of Xcode, not the version of clang. ++ #define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) ++ #if defined(__APPLE__) && CLANG_VERSION >= 60000 && CPLUSPLUS_SUPPORTS_MAKE_UNIQUE ++ #define COMPILER_SUPPORTS_MAKE_UNIQUE ++ #elif !defined(__APPLE__) && CLANG_VERSION >= 30400 && CPLUSPLUS_SUPPORTS_MAKE_UNIQUE ++ #define COMPILER_SUPPORTS_MAKE_UNIQUE ++ #endif ++ #elif defined(__GNUC__) ++ // std::make_unique was added in gcc 4.9 ++ #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) ++ #if GCC_VERSION >= 40900 && CPLUSPLUS_SUPPORTS_MAKE_UNIQUE ++ #define COMPILER_SUPPORTS_MAKE_UNIQUE ++ #endif ++ #endif ++#endif ++ ++#if defined(COMPILER_SUPPORTS_MAKE_UNIQUE) ++ ++// If the compiler supports std::make_unique, then pull in <memory> to get it. ++#include <memory> ++ ++#else ++ ++// Otherwise, the compiler doesn't provide it, so implement it ourselves. ++ ++#include <cstddef> ++#include <memory> ++#include <type_traits> ++#include <utility> ++ ++namespace std { ++ ++template<class _Ty> struct _Unique_if { ++ typedef unique_ptr<_Ty> _Single_object; ++}; ++ ++template<class _Ty> struct _Unique_if<_Ty[]> { ++ typedef unique_ptr<_Ty[]> _Unknown_bound; ++}; ++ ++template<class _Ty, size_t N> struct _Unique_if<_Ty[N]> { ++ typedef void _Known_bound; ++}; ++ ++// ++// template< class T, class... Args > ++// unique_ptr<T> make_unique( Args&&... args); ++// ++ ++#if defined(_MSC_VER) && (_MSC_VER < 1800) ++ ++// Macro machinery because MSVC 11.0 doesn't support variadic templates. ++// The _VARIADIC_EXPAND_0X stuff is defined in <xstddef> ++#define _MAKE_UNIQUE( \ ++ TEMPLATE_LIST, PADDING_LIST, LIST, COMMA, X1, X2, X3, X4) \ ++ template<class _Ty COMMA LIST(_CLASS_TYPE)> inline \ ++ typename _Unique_if<_Ty>::_Single_object make_unique(LIST(_TYPE_REFREF_ARG)) \ ++ { \ ++ return unique_ptr<_Ty>(new _Ty(LIST(_FORWARD_ARG))); \ ++ } \ ++ ++_VARIADIC_EXPAND_0X(_MAKE_UNIQUE, , , , ) ++#undef _MAKE_UNIQUE ++ ++#else // not MSVC 11.0 or earlier ++ ++template<class _Ty, class... Args> ++ typename _Unique_if<_Ty>::_Single_object ++ make_unique(Args&&... args) { ++ return unique_ptr<_Ty>(new _Ty(std::forward<Args>(args)...)); ++ } ++ ++#endif ++ ++// template< class T > ++// unique_ptr<T> make_unique( std::size_t size ); ++ ++template<class _Ty> ++ typename _Unique_if<_Ty>::_Unknown_bound ++ make_unique(size_t n) { ++ typedef typename remove_extent<_Ty>::type U; ++ return unique_ptr<_Ty>(new U[n]()); ++ } ++ ++// template< class T, class... Args > ++// /* unspecified */ make_unique( Args&&... args ) = delete; ++ ++// MSVC 11.0 doesn't support deleted functions, so the best we can do ++// is simply not define the function. ++#if !(defined(_MSC_VER) && (_MSC_VER < 1800)) ++ ++template<class T, class... Args> ++ typename _Unique_if<T>::_Known_bound ++ make_unique(Args&&...) = delete; ++ ++#endif ++ ++} // namespace std ++ ++#endif // !COMPILER_SUPPORTS_MAKE_UNIQUE ++ ++#endif /* MIXXX_UTIL_MEMORY_H */ diff --git a/media-sound/mixxx/files/mixxx-2.0.0-gcc62.patch b/media-sound/mixxx/files/mixxx-2.0.0-gcc62.patch new file mode 100644 index 000000000000..c19c914b330e --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-gcc62.patch @@ -0,0 +1,24 @@ +--- a/src/util/math.h 2015-12-29 17:10:41.000000000 +0100 ++++ b/src/util/math.h 2016-09-25 12:54:18.345291146 +0200 +@@ -3,8 +3,20 @@ + + // Causes MSVC to define M_PI and friends. + // http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx ++// Our SConscript defines this but check anyway. ++#ifdef __WINDOWS__ ++#ifndef _USE_MATH_DEFINES + #define _USE_MATH_DEFINES +-#include <cmath> ++#endif ++#endif ++ ++#include <math.h> ++#include <cmath> ++// Note: Because of our fpclassify hack, we actualy need to inlude both, ++// the c and the c++ version of the math header. ++// From GCC 6.1.1 math.h depends on cmath, which failes to compile if included ++// after our fpclassify hack ++ + #include <algorithm> + + #include "util/assert.h" 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 new file mode 100644 index 000000000000..9a95a5d675ec --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-move-definition-of-time-formatseconds-into-dot-cpp-file.patch @@ -0,0 +1,88 @@ +From c2af9e6eeb469718b9aa069b90a719fac80dd0d9 Mon Sep 17 00:00:00 2001 +From: Uwe Klotz <uwe_klotz@web.de> +Date: Fri, 8 Jan 2016 19:25:58 +0100 +Subject: [PATCH] Move definition of Time::formatSeconds() into .cpp file + +--- + src/util/time.cpp | 30 ++++++++++++++++++++++++++++++ + src/util/time.h | 29 +---------------------------- + 2 files changed, 31 insertions(+), 28 deletions(-) + +diff --git a/src/util/time.cpp b/src/util/time.cpp +index 998fa73..d8a122b 100644 +--- a/src/util/time.cpp ++++ b/src/util/time.cpp +@@ -6,3 +6,33 @@ LLTIMER Time::s_timer; + bool Time::s_testMode = false; + // static + qint64 Time::s_testElapsed_nsecs = 0; ++ ++// static ++QString Time::formatSeconds(double dSeconds, bool showCentis) { ++ if (dSeconds < 0) { ++ return "?"; ++ } ++ ++ const int days = static_cast<int>(dSeconds) / kSecondsPerDay; ++ dSeconds -= days * kSecondsPerDay; ++ ++ // NOTE(uklotzde): Time() constructs a 'null' object, but ++ // we need 'zero' here. ++ QTime t = QTime(0, 0).addMSecs(dSeconds * kMillisPerSecond); ++ ++ QString formatString = ++ (days > 0 ? (QString::number(days) % ++ QLatin1String("'d', ")) : QString()) % ++ QLatin1String(days > 0 || t.hour() > 0 ? "hh:mm:ss" : "mm:ss") % ++ QLatin1String(showCentis ? ".zzz" : ""); ++ ++ QString timeString = t.toString(formatString); ++ ++ // The format string gives us milliseconds but we want ++ // centiseconds. Slice one character off. ++ if (showCentis) { ++ timeString = timeString.left(timeString.length() - 1); ++ } ++ ++ return timeString; ++} +diff --git a/src/util/time.h b/src/util/time.h +index 7b38eb4..b4e2c2d 100644 +--- a/src/util/time.h ++++ b/src/util/time.h +@@ -67,34 +67,7 @@ class Time { + // The standard way of formatting a time in seconds. Used for display of + // track duration, etc. showCentis indicates whether to include + // centisecond-precision or to round to the nearest second. +- static QString formatSeconds(double dSeconds, bool showCentis) { +- if (dSeconds < 0) { +- return "?"; +- } +- +- const int days = static_cast<int>(dSeconds) / kSecondsPerDay; +- dSeconds -= days * kSecondsPerDay; +- +- // NOTE(uklotzde): Time() constructs a 'null' object, but +- // we need 'zero' here. +- QTime t = QTime(0, 0).addMSecs(dSeconds * kMillisPerSecond); +- +- QString formatString = +- (days > 0 ? (QString::number(days) % +- QLatin1String("'d', ")) : QString()) % +- QLatin1String(days > 0 || t.hour() > 0 ? "hh:mm:ss" : "mm:ss") % +- QLatin1String(showCentis ? ".zzz" : ""); +- +- QString timeString = t.toString(formatString); +- +- // The format string gives us milliseconds but we want +- // centiseconds. Slice one character off. +- if (showCentis) { +- timeString = timeString.left(timeString.length() - 1); +- } +- +- return timeString; +- } ++ static QString formatSeconds(double dSeconds, bool showCentis); + + private: + static LLTIMER s_timer; 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 new file mode 100644 index 000000000000..a82f27166abc --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-rmx2-backport-controller-scripts.patch @@ -0,0 +1,280 @@ +diff -dNur a/res/controllers/Hercules-DJ-Console-RMX-2-scripts.js b/res/controllers/Hercules-DJ-Console-RMX-2-scripts.js +--- a/res/controllers/Hercules-DJ-Console-RMX-2-scripts.js 2015-12-29 17:10:41.000000000 +0100 ++++ b/res/controllers/Hercules-DJ-Console-RMX-2-scripts.js 2017-02-04 22:01:01.629506434 +0100 +@@ -1,128 +1,159 @@ +-/*╔══:::Made Lovingly By Circuitfry:::═════════════════════════════════╗ +- ║ Hercules DJConsole RMX 2 Mapping Scripts v. 0.1.3 ║ +- ╚════════════════════════════════════════════════════════════════════╝ +- * Version 0.1.0: Basic Midi Wizard Mapping +- * Version 0.1.1: Partially-Functional platters (version 1). +- * Version 0.1.2: Functional platters (version 1) +- * Version 0.1.3: Functional EQ Kill/Pitch Bending buttons +- Functional Looping/Sample/Effect pads +- Bugfix: Source 2 Gain knob doesn't load tracks. +- Overhaul: MIDI Scripting file. +- Worklog: Need to implement Microphone/Source1/Source2 input. +- * Note 1: [DEP] Means the command is meant for Mixxx v1.10.x + below. +- * Note 2: [FUT] Means the command is meant for Mixxx v1.11.x + above. +-*/ +-function DJCRMX2(){} +-DJCRMX2.scratching = []; ++/* ╔══:::Made Lovingly By Circuitfry:::═════════════════════════════════╗ ++ * ║ Hercules DJConsole RMX 2 Mapping Scripts ║ ++ * ╚════════════════════════════════════════════════════════════════════╝ ++ */ + +-/* [ Function init ] - Version 0.1.3 +- * Initiates some global variables and assigns an ID. Required. +-*/ +-DJCRMX2.init = function(id){ +- DJCRMX2.id = id; +- DJCRMX2.scratching[1]=false; +- DJCRMX2.scratching[2]=false; +- engine.setValue("[Microphone]","enabled",0); +- engine.setValue("[Microphone]","talkover",0); ++function DJCRMX2() {} ++DJCRMX2.decks = []; ++ ++/* [ Function init ] ++ * Initiates some global variables and assigns an ID. Required. ++ */ ++DJCRMX2.init = function (id) { ++ DJCRMX2.id = id; ++ DJCRMX2.decks[1] = new DJCRMX2.Deck(1); ++ DJCRMX2.decks[2] = new DJCRMX2.Deck(2); ++ engine.setValue("[Microphone]", "enabled", 0); ++ engine.setValue("[Microphone]", "talkover", 0); + } + +-/* [ Function wheelPress ] - Version 0.1.2 +- * Detects whether a jog wheel is pressed or not and sets a specific +- * variable on and off accordingly. +-*/ +-DJCRMX2.wheelPress = function (channel, control, value, status, group){ +- if (status == 0x90) // If status #144 is active (2 possibilities) +- { +- if (value == 0x7F) // And the jog wheel is pressed down: +- { /* engine.scratchEnable(int,int,float,float,float,bool); +- * [ int deck ] Which track/platter is playing? +- * [ int intervalsPerRev ] # of MIDI signals sent in 1 spin. +- * [ float rpm ] Imaginary vinyl rotation speed. +- * [ float alpha ] Just a fine-tuning variable. +- * [ float beta ] Just a fine-tuning variable. +- * [ bool ramp ] As far as I know, nothing... +- */ +- var alpha = 1.0/8; +- var beta = alpha/32; +- if(group=="[Channel1]") +- { +- engine.scratchEnable(1, 250, 50, alpha, beta); +- DJCRMX2.scratching[1] = true; //[DEP] +- } +- if(group=="[Channel2]") +- { +- engine.scratchEnable(2, 250, 50, alpha, beta); +- DJCRMX2.scratching[2] = true; //[DEP] +- } +- +- } +- if (value == 0x00 ) // If the jog wheel is released: +- { +- if(group=="[Channel1]") +- { +- DJCRMX2.scratching[1] = false; // <- v1.10.x and below +- engine.scratchDisable(1); +- } +- if(group=="[Channel2]") +- { +- DJCRMX2.scratching[2] = false; // <- v1.10.x and below +- engine.scratchDisable(2); +- } +- } +- } +- else //Default setting where button is not held down. +- { +- DJCRMX2.scratching[1] = false; // Only for v1.10.x and below +- DJCRMX2.scratching[2] = false; // Only for v1.10.x and below +- engine.scratchDisable(1); +- engine.scratchDisable(2); +- } +- return; ++//////////////////////////////////////////////////////////////////////// ++// Decks // ++//////////////////////////////////////////////////////////////////////// ++ ++DJCRMX2.Deck = function(number) { ++ this.number = number; ++ this.group = "[Channel" + this.number + "]"; ++ this.scratchTimer = 0; ++}; ++ ++DJCRMX2.Deck.prototype.wheelPress = function (value) { ++ if (this.scratchTimer != 0) { ++ // The wheel was touched again, reset the timer. ++ engine.stopTimer(this.scratchTimer); ++ this.scratchTimer = 0; ++ } ++ if (value == 0x7F) { ++ // And the jog wheel is pressed down: ++ ++ /* engine.scratchEnable(int,int,float,float,float,bool); ++ * [ int deck ] Which track/platter is playing? ++ * [ int intervalsPerRev ] # of MIDI signals sent in 1 spin. ++ * [ float rpm ] Imaginary vinyl rotation speed. ++ * [ float alpha ] Just a fine-tuning variable. ++ * [ float beta ] Just a fine-tuning variable. ++ * [ bool ramp ] As far as I know, nothing... ++ */ ++ ++ var alpha = 1.0 / 8; ++ var beta = alpha / 32; ++ engine.scratchEnable(this.number, 256, 33 + 1/3, alpha, beta); ++ } else { ++ // The wheel touch sensor can be overly sensitive, so don't release scratch mode right away. ++ // Depending on how fast the platter was moving, lengthen the time we'll wait. ++ var scratchRate = Math.abs(engine.getValue(this.group, "scratch2")); ++ var inertiaTime = Math.pow(1.8, scratchRate) * 50; ++ if (inertiaTime < 100) { ++ // Just do it now. ++ this.finishWheelPress(); ++ } else { ++ this.scratchTimer = engine.beginTimer( ++ 100, "DJCRMX2.decks[" + this.number + "].finishWheelPress()", true); ++ } ++ } ++} ++ ++DJCRMX2.Deck.prototype.finishWheelPress = function() { ++ this.scratchTimer = 0; ++ var play = engine.getValue(this.group, "play"); ++ if (play != 0) { ++ // If we are playing, just hand off to the engine. ++ engine.scratchDisable(this.number, true); ++ } else { ++ // If things are paused, there will be a non-smooth handoff between scratching and jogging. ++ // Instead, keep scratch on until the platter is not moving. ++ var scratchRate = Math.abs(engine.getValue(this.group, "scratch2")); ++ if (scratchRate < 0.01) { ++ // The platter is basically stopped, now we can disable scratch and hand off to jogging. ++ engine.scratchDisable(this.number, false); ++ } else { ++ // Check again soon. ++ this.scratchTimer = engine.beginTimer( ++ 100, "DJCRMX2.decks[" + this.number + "].finishWheelPress()", true); ++ } ++ } ++}; ++ ++ ++/* [ Function wheelTurn ] ++ * Pays attention to the current deck, checks scratching, affects the ++ * song accordingly. ++ */ ++DJCRMX2.Deck.prototype.wheelTurn = function (value) { ++ var newValue = 0; ++ // Spinning backwards = 127 or less (less meaning faster) ++ // Spinning forwards = 1 or more (more meaning faster) ++ if (value - 64 > 0) { ++ newValue = value - 128; ++ } else { ++ newValue = value; ++ } ++ ++ if (engine.isScratching(this.number)) { ++ engine.scratchTick(this.number, newValue); ++ } else { ++ engine.setValue(this.group, "jog", newValue); ++ } + } ++ ++/* [ Function wheelPress ] ++ * Detects whether a jog wheel is pressed or not and sets a specific ++ * variable on and off accordingly. ++ */ ++DJCRMX2.wheelPress = function (channel, control, value, status, group) { ++ var deck = 0; ++ if (group == "[Channel1]") { ++ deck = 1; ++ } else if (group == "[Channel2]") { ++ deck = 2; ++ } else { ++ return; ++ } ++ DJCRMX2.decks[deck].wheelPress(value); ++} ++ + +-/* [ Function wheelTurn ] - Version 0.1.2 +- * Pays attention to the current deck, checks scratching, affects the +- * song accordingly. +-*/ +-DJCRMX2.wheelTurn = function (channel, control, value, status, group){ +- var newValue=0; +- // Spinning backwards = 127 or less (less meaning faster) +- // Spinning forwards = 1 or more (more meaning faster) +- if (value-64 > 0) newValue = (value-128); +- else newValue=value; +- //if (!engine.isScratching(DJCRMX2.currentDeck)) // [FUT] +- if(group=="[Channel1]") +- { +- if(DJCRMX2.scratching[1]==true) {engine.scratchTick(1,newValue);return;} +- } +- else if(group=="[Channel2]") +- { +- if(DJCRMX2.scratching[2]==true) {engine.scratchTick(2,newValue);return;} +- } +- engine.setValue(group, "jog", newValue); +- return; ++/* [ Function wheelTurn ] ++ * Pays attention to the current deck, checks scratching, affects the ++ * song accordingly. ++ */ ++DJCRMX2.wheelTurn = function (channel, control, value, status, group) { ++ var deck = 0; ++ if (group == "[Channel1]") { ++ deck = 1; ++ } else if (group == "[Channel2]") { ++ deck = 2; ++ } else { ++ return; ++ } ++ DJCRMX2.decks[deck].wheelTurn(value); + } + +-DJCRMX2.micSwitch = function (channel, control, value, status) //??? ++DJCRMX2.micSwitch = function (channel, control, value, status) + { +- if(status == 0x90 && control == 0x48 && value == 0x7F) +- { +- engine.setValue("[Microphone]","enabled",1); +- engine.setValue("[Microphone]","talkover",1); +- } +- if(status == 0x90 && control == 0x48 && value == 0x00) +- { +- engine.setValue("[Microphone]","enabled",0); +- engine.setValue("[Microphone]","talkover",0); +- } ++ if (status == 0x90 && control == 0x48 && value == 0x7F) { ++ engine.setValue("[Microphone]","enabled",1); ++ engine.setValue("[Microphone]","talkover",1); ++ } else if (status == 0x90 && control == 0x48 && value == 0x00) { ++ engine.setValue("[Microphone]","enabled",0); ++ engine.setValue("[Microphone]","talkover",0); ++ } + } + +-/* [ Function shutdown ] - Version 0.1.3 +- * Sets variables down for shutoff. +-*/ +-DJCRMX2.shutdown = function(id){ +- DJCRMX2.scratching[1]=false; +- DJCRMX2.scratching[2]=false; +- engine.setValue("[Microphone]","enabled",0); +- engine.setValue("[Microphone]","talkover",0); ++/* [ Function shutdown ] - Version 0.1.3 ++ * Sets variables down for shutoff. ++ */ ++DJCRMX2.shutdown = function (id) { ++ engine.setValue("[Microphone]", "enabled", 0); ++ engine.setValue("[Microphone]", "talkover", 0); + } diff --git a/media-sound/mixxx/files/mixxx-2.0.0-sqlite3.patch b/media-sound/mixxx/files/mixxx-2.0.0-sqlite3.patch new file mode 100644 index 000000000000..a8cb15e63c65 --- /dev/null +++ b/media-sound/mixxx/files/mixxx-2.0.0-sqlite3.patch @@ -0,0 +1,14 @@ +https://bugs.gentoo.org/622776 + +--- mixxx-2.0.0/src/library/trackcollection.h ++++ mixxx-2.0.0/src/library/trackcollection.h +@@ -34,8 +34,7 @@ + #include "library/dao/libraryhashdao.h" + + #ifdef __SQLITE3__ +-typedef struct sqlite3_context sqlite3_context; +-typedef struct Mem sqlite3_value; ++#include <sqlite3.h> + #endif + + class TrackInfoObject; |