Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 469506 | Differences between
and this patch

Collapse All | Expand All

(-)mixxx/build/depends.py (-50 / +8 lines)
Lines 290-314 Link Here
290
290
291
class FidLib(Dependence):
291
class FidLib(Dependence):
292
292
293
    def sources(self, build):
294
        symbol = None
295
        if build.platform_is_windows:
296
            if build.toolchain_is_msvs:
297
                symbol = 'T_MSVC'
298
            elif build.crosscompile:
299
                # Not sure why, but fidlib won't build with mingw32msvc and
300
                # T_MINGW
301
                symbol = 'T_LINUX'
302
            elif build.toolchain_is_gnu:
303
                symbol = 'T_MINGW'
304
        else:
305
            symbol = 'T_LINUX'
306
307
        return [build.env.StaticObject('#lib/fidlib-0.9.10/fidlib.c',
308
                                       CPPDEFINES=symbol)]
309
310
    def configure(self, build, conf):
293
    def configure(self, build, conf):
311
        build.env.Append(CPPPATH='#lib/fidlib-0.9.10/')
294
        if not conf.CheckLib('fidlib'):
295
            raise Exception('Did not find fidlib library, exiting!')
296
        build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/fidlib'])
312
297
313
class ReplayGain(Dependence):
298
class ReplayGain(Dependence):
314
299
Lines 319-325 Link Here
319
        build.env.Append(CPPPATH="#lib/replaygain")
304
        build.env.Append(CPPPATH="#lib/replaygain")
320
305
321
class SoundTouch(Dependence):
306
class SoundTouch(Dependence):
322
    SOUNDTOUCH_PATH = 'soundtouch-1.6.0'
323
307
324
    def sse_enabled(self, build):
308
    def sse_enabled(self, build):
325
        optimize = int(util.get_flags(build.env, 'optimize', 1))
309
        optimize = int(util.get_flags(build.env, 'optimize', 1))
Lines 328-357 Link Here
328
                (build.toolchain_is_gnu and optimize > 1))
312
                (build.toolchain_is_gnu and optimize > 1))
329
313
330
    def sources(self, build):
314
    def sources(self, build):
331
        sources = ['engine/enginebufferscalest.cpp',
315
        return ['engine/enginebufferscalest.cpp']
332
                   '#lib/%s/SoundTouch.cpp' % self.SOUNDTOUCH_PATH,
333
                   '#lib/%s/TDStretch.cpp' % self.SOUNDTOUCH_PATH,
334
                   '#lib/%s/RateTransposer.cpp' % self.SOUNDTOUCH_PATH,
335
                   '#lib/%s/AAFilter.cpp' % self.SOUNDTOUCH_PATH,
336
                   '#lib/%s/FIFOSampleBuffer.cpp' % self.SOUNDTOUCH_PATH,
337
                   '#lib/%s/FIRFilter.cpp' % self.SOUNDTOUCH_PATH,
338
                   '#lib/%s/PeakFinder.cpp' % self.SOUNDTOUCH_PATH,
339
                   '#lib/%s/BPMDetect.cpp' % self.SOUNDTOUCH_PATH]
340
341
        # SoundTouch CPU optimizations are only for x86
342
        # architectures. SoundTouch automatically ignores these files when it is
343
        # not being built for an architecture that supports them.
344
        cpu_detection = '#lib/%s/cpu_detect_x86_win.cpp' if build.toolchain_is_msvs else \
345
            '#lib/%s/cpu_detect_x86_gcc.cpp'
346
        sources.append(cpu_detection % self.SOUNDTOUCH_PATH)
347
348
        # Check if the compiler has SSE extention enabled
349
        # Allways the case on x64 (core instructions)
350
        if self.sse_enabled(build):
351
            sources.extend(
352
                ['#lib/%s/mmx_optimized.cpp' % self.SOUNDTOUCH_PATH,
353
                 '#lib/%s/sse_optimized.cpp' % self.SOUNDTOUCH_PATH,])
354
        return sources
355
316
356
    def configure(self, build, conf, env=None):
317
    def configure(self, build, conf, env=None):
357
        if env is None:
318
        if env is None:
Lines 359-371 Link Here
359
        if build.platform_is_windows:
320
        if build.platform_is_windows:
360
            # Regardless of the bitwidth, ST checks for WIN32
321
            # Regardless of the bitwidth, ST checks for WIN32
361
            env.Append(CPPDEFINES = 'WIN32')
322
            env.Append(CPPDEFINES = 'WIN32')
362
        env.Append(CPPPATH=['#lib/%s' % self.SOUNDTOUCH_PATH])
323
        if not conf.CheckLib(['SoundTouch','libSoundTouch']):
363
324
            raise Exception('Did not find SoundTouch library, exiting!')
364
        # Check if the compiler has SSE extention enabled
325
        build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/soundtouch'])
365
        # Allways the case on x64 (core instructions)
326
        build.env.Append(LIBS='SoundTouch')
366
        optimize = int(util.get_flags(env, 'optimize', 1))
367
        if self.sse_enabled(build):
368
            env.Append(CPPDEFINES='SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS')
369
327
370
class TagLib(Dependence):
328
class TagLib(Dependence):
371
    def configure(self, build, conf):
329
    def configure(self, build, conf):
(-)mixxx/build/features.py (-31 / +15 lines)
Lines 48-54 Link Here
48
                'controllers/midi/hss1394enumerator.cpp']
48
                'controllers/midi/hss1394enumerator.cpp']
49
49
50
class HID(Feature):
50
class HID(Feature):
51
    HIDAPI_INTERNAL_PATH = '#lib/hidapi-0.8.0-pre'
52
    def description(self):
51
    def description(self):
53
        return "HID controller support"
52
        return "HID controller support"
54
53
Lines 64-72 Link Here
64
    def configure(self, build, conf):
63
    def configure(self, build, conf):
65
        if not self.enabled(build):
64
        if not self.enabled(build):
66
            return
65
            return
67
        # TODO(XXX) allow external hidapi install, but for now we just use our
68
        # internal one.
69
        build.env.Append(CPPPATH=[os.path.join(self.HIDAPI_INTERNAL_PATH, 'hidapi')])
70
66
71
        if build.platform_is_linux:
67
        if build.platform_is_linux:
72
            build.env.ParseConfig('pkg-config libusb-1.0 --silence-errors --cflags --libs')
68
            build.env.ParseConfig('pkg-config libusb-1.0 --silence-errors --cflags --libs')
Lines 86-104 Link Here
86
82
87
        build.env.Append(CPPDEFINES = '__HID__')
83
        build.env.Append(CPPDEFINES = '__HID__')
88
84
85
        if not conf.CheckLib('hidapi-libusb'):
86
            raise Exception('Did not find HID API library, exiting!')
87
        build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/hidapi'])
88
        build.env.Append(LIBS='hidapi-libusb')
89
90
89
    def sources(self, build):
91
    def sources(self, build):
90
        sources = ['controllers/hid/hidcontroller.cpp',
92
        sources = ['controllers/hid/hidcontroller.cpp',
91
                   'controllers/hid/hidenumerator.cpp',
93
                   'controllers/hid/hidenumerator.cpp',
92
                   'controllers/hid/hidcontrollerpresetfilehandler.cpp']
94
                   'controllers/hid/hidcontrollerpresetfilehandler.cpp']
93
95
94
        if build.platform_is_windows:
95
            # Requires setupapi.lib which is included by the above check for
96
            # setupapi.
97
            sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, "windows/hid.c"))
98
        elif build.platform_is_linux:
99
            sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, 'linux/hid-libusb.c'))
100
        elif build.platform_is_osx:
101
            sources.append(os.path.join(self.HIDAPI_INTERNAL_PATH, 'mac/hid.c'))
102
        return sources
96
        return sources
103
97
104
class Bulk(Feature):
98
class Bulk(Feature):
Lines 722-746 Link Here
722
        test_env.Append(CCFLAGS = '-pthread')
716
        test_env.Append(CCFLAGS = '-pthread')
723
        test_env.Append(LINKFLAGS = '-pthread')
717
        test_env.Append(LINKFLAGS = '-pthread')
724
718
725
        test_env.Append(CPPPATH="#lib/gtest-1.5.0/include")
719
        if not conf.CheckLib('gtest'):
726
        gtest_dir = test_env.Dir("#lib/gtest-1.5.0")
720
            raise Exception('Did not find gtest library, exiting!')
727
        #gtest_dir.addRepository(build.env.Dir('#lib/gtest-1.5.0'))
721
        test_env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/gtest'])
728
        #build.env['EXE_OUTPUT'] = '#/lib/gtest-1.3.0/bin'  # example, optional
722
        test_env.Append(LIBS='gtest')
729
        test_env['LIB_OUTPUT'] = '#/lib/gtest-1.5.0/lib'
723
730
724
        if not conf.CheckLib('gmock'):
731
        env = test_env
725
            raise Exception('Did not find gmock library, exiting!')
732
        SCons.Export('env')
726
        test_env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix') + '/include/gmock'])
733
        env.SConscript(env.File('SConscript', gtest_dir))
727
        test_env.Append(LIBS='gmock')
734
735
        # build and configure gmock
736
        test_env.Append(CPPPATH="#lib/gmock-1.5.0/include")
737
        gmock_dir = test_env.Dir("#lib/gmock-1.5.0")
738
        #gmock_dir.addRepository(build.env.Dir('#lib/gmock-1.5.0'))
739
        test_env['LIB_OUTPUT'] = '#/lib/gmock-1.5.0/lib'
740
741
        env.SConscript(env.File('SConscript', gmock_dir))
742
743
        return []
744
728
745
class Shoutcast(Feature):
729
class Shoutcast(Feature):
746
    def description(self):
730
    def description(self):
(-)mixxx/src/engine/enginefilter.h (-1 / +1 lines)
Lines 20-26 Link Here
20
20
21
#define MIXXX
21
#define MIXXX
22
#include "engine/engineobject.h"
22
#include "engine/engineobject.h"
23
#include "../lib/fidlib-0.9.10/fidlib.h"
23
#include <fidlib.h>
24
#include "defs.h"
24
#include "defs.h"
25
25
26
enum filterType{
26
enum filterType{
(-)mixxx/src/engine/enginefilterbutterworth8.cpp (-1 / +1 lines)
Lines 20-26 Link Here
20
#include "engine/enginefilterbutterworth8.h"
20
#include "engine/enginefilterbutterworth8.h"
21
#include "engine/enginefilter.h"
21
#include "engine/enginefilter.h"
22
#include "engine/engineobject.h"
22
#include "engine/engineobject.h"
23
#include "../lib/fidlib-0.9.10/fidlib.h"
23
#include <fidlib.h>
24
24
25
/* Local Prototypes */
25
/* Local Prototypes */
26
inline double _processLowpass(double *coef, double *buf, register double val);
26
inline double _processLowpass(double *coef, double *buf, register double val);

Return to bug 469506