[SCM] mixxx/master: Actually build Mixxx against libsoundtouch provided by Debian.

alessio at users.alioth.debian.org alessio at users.alioth.debian.org
Thu Apr 14 18:36:06 UTC 2011


The following commit has been merged in the master branch:
commit cb84abcf0ef4d193442a8b146f9cbaff06e16ef2
Author: Alessio Treglia <alessio at debian.org>
Date:   Thu Apr 14 20:35:37 2011 +0200

    Actually build Mixxx against libsoundtouch provided by Debian.

diff --git a/debian/patches/40-soundtouch.patch b/debian/patches/40-soundtouch.patch
new file mode 100644
index 0000000..226ff70
--- /dev/null
+++ b/debian/patches/40-soundtouch.patch
@@ -0,0 +1,77 @@
+Description: Build Mixxx against libsoundtouch provided by Debian.
+Origin: http://bugs.gentoo.org/attachment.cgi?id=257798
+Bug: https://bugs.launchpad.net/mixxx/+bug/562007
+Bug-Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=310821
+Forwarded: yes
+---
+ build/depends.py |   53 +++++------------------------------------------------
+ 1 file changed, 5 insertions(+), 48 deletions(-)
+
+--- mixxx.orig/build/depends.py
++++ mixxx/build/depends.py
+@@ -231,60 +231,17 @@ class ReplayGain(Dependence):
+         build.env.Append(CPPPATH="#lib/replaygain")
+ 
+ class SoundTouch(Dependence):
+-    SOUNDTOUCH_PATH = 'soundtouch-1.4.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]
+-        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
++        sources = ['engine/enginebufferscalest.cpp']
+ 
+         return sources
+ 
+     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])
++        if not conf.CheckLib(['SoundTouch','libSoundTouch']):
++            raise Exception('Did not find libSoundTouch.a, libSoundTouch.lib, or the libSoundTouch development header files - exiting!')
++        build.env.Append(CPPPATH=[SCons.ARGUMENTS.get('prefix', '/usr/local') + '/include/soundtouch'])
++        build.env.Append(LIBS='SoundTouch')
+ 
+         # TODO(XXX) when we figure out a better way to represent features, fix
+         # this.
diff --git a/debian/patches/series b/debian/patches/series
index 026c43c..c47d293 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,4 +2,5 @@
 15-various_archs_support.patch
 20_norpath.patch
 30-disable_soundsourcem4a.patch
+40-soundtouch.patch
 91-desktop_file.patch
diff --git a/debian/patches/ubuntu.series b/debian/patches/ubuntu.series
index a805c48..650227e 100644
--- a/debian/patches/ubuntu.series
+++ b/debian/patches/ubuntu.series
@@ -2,3 +2,4 @@
 15-various_archs_support.patch
 20_norpath.patch
 30-disable_soundsourcem4a.patch
+40-soundtouch.patch

-- 
mixxx packaging



More information about the pkg-multimedia-commits mailing list