diff options
Diffstat (limited to 'recipes/soundtouch/0001-Add-minimal-meson-build-system.patch')
-rw-r--r-- | recipes/soundtouch/0001-Add-minimal-meson-build-system.patch | 210 |
1 files changed, 210 insertions, 0 deletions
diff --git a/recipes/soundtouch/0001-Add-minimal-meson-build-system.patch b/recipes/soundtouch/0001-Add-minimal-meson-build-system.patch new file mode 100644 index 00000000..1802d641 --- /dev/null +++ b/recipes/soundtouch/0001-Add-minimal-meson-build-system.patch @@ -0,0 +1,210 @@ +From 7c746092ff0d50ec62200374d2b532b697565490 Mon Sep 17 00:00:00 2001 +From: Matthew Waters <matthew@centricular.com> +Date: Mon, 22 Oct 2018 21:05:58 +1100 +Subject: [PATCH 1/2] Add minimal meson build system + +No optimisations (mmx or sse) +--- + include/meson.build | 17 ++++++++ + meson.build | 42 ++++++++++++++++++++ + meson_options.txt | 9 +++++ + source/SoundStretch/meson.build | 11 ++++++ + source/SoundTouch/meson.build | 69 +++++++++++++++++++++++++++++++++ + source/meson.build | 2 + + 6 files changed, 150 insertions(+) + create mode 100644 include/meson.build + create mode 100644 meson.build + create mode 100644 meson_options.txt + create mode 100644 source/SoundStretch/meson.build + create mode 100644 source/SoundTouch/meson.build + create mode 100644 source/meson.build + +diff --git a/include/meson.build b/include/meson.build +new file mode 100644 +index 0000000..03bee39 +--- /dev/null ++++ b/include/meson.build +@@ -0,0 +1,17 @@ ++soundtouch_headers = [ ++ 'FIFOSampleBuffer.h', ++ 'FIFOSamplePipe.h', ++ 'SoundTouch.h', ++ 'STTypes.h', ++ 'BPMDetect.h', ++] ++ ++soundtouch_config_h = configure_file( ++ configuration: conf, ++ output: 'soundtouch_config.h' ++) ++ ++install_headers( ++ soundtouch_headers + [soundtouch_config_h], ++ subdir : 'soundtouch' ++) +diff --git a/meson.build b/meson.build +new file mode 100644 +index 0000000..e2850e0 +--- /dev/null ++++ b/meson.build +@@ -0,0 +1,42 @@ ++project('SoundTouch', 'c', 'cpp', ++ version : '2.0.0', ++ meson_version : '>= 0.47', ++ default_options : [ 'warning_level=1', ++ 'buildtype=debugoptimized' ]) ++ ++pkgconfig = import('pkgconfig') ++ ++soversion = 1 ++libversion = '@0@.@1@.@2@'.format(soversion, 0, 0) ++ ++conf = configuration_data() ++ ++cxx = meson.get_compiler('cpp') ++ ++if get_option('integer_samples') ++ conf.set10('SOUNDTOUCH_INTEGER_SAMPLES', true) ++else ++ conf.set10('SOUNDTOUCH_FLOAT_SAMPLES', true) ++endif ++# FIXME ++conf.set10('SOUNDTOUCH_DISABLE_X86_OPTIMIZATIONS', true) ++have_mmx = false ++have_sse = false ++# FIXME Check for cpuid.h ++ ++libm = cxx.find_library('m', required : false) ++ ++soundtouch_inc = include_directories('include') ++ ++subdir('include') ++subdir('source') ++ ++pkgconfig.generate( ++ name: 'SoundTouch', ++ description: 'SoundTouch is an open-source audio processing library for changing the Tempo, Pitch and Playback Rates of audio streams or files', ++ url: 'https://www.surina.net/soundtouch/', ++ version: meson.project_version(), ++ filebase: 'soundtouch', ++ subdirs: 'soundtouch', ++ libraries: libsoundtouch, ++) +diff --git a/meson_options.txt b/meson_options.txt +new file mode 100644 +index 0000000..2e54708 +--- /dev/null ++++ b/meson_options.txt +@@ -0,0 +1,9 @@ ++option('integer_samples', type: 'boolean', value: false, ++ description: 'Use integer samples instead of floats') ++# FIXME ++option('openmp', type: 'boolean', value: false, ++ description: 'Use parallel multicore calculation through OpenMP') ++# FIXME ++option('x86_optimizations', type: 'boolean', value: false, ++ description: 'Use MMX or SSE optimizations') ++ +diff --git a/source/SoundStretch/meson.build b/source/SoundStretch/meson.build +new file mode 100644 +index 0000000..aa57488 +--- /dev/null ++++ b/source/SoundStretch/meson.build +@@ -0,0 +1,11 @@ ++soundstretch_sources = [ ++ 'main.cpp', ++ 'RunParameters.cpp', ++ 'WavFile.cpp', ++] ++ ++executable('SoundStretch', ++ soundstretch_sources, ++ dependencies: soundtouch_dep, ++ install: true ++) +diff --git a/source/SoundTouch/meson.build b/source/SoundTouch/meson.build +new file mode 100644 +index 0000000..99bdb09 +--- /dev/null ++++ b/source/SoundTouch/meson.build +@@ -0,0 +1,69 @@ ++soundtouch_sources = [ ++ 'AAFilter.cpp', ++ 'FIRFilter.cpp', ++ 'FIFOSampleBuffer.cpp', ++ 'RateTransposer.cpp', ++ 'SoundTouch.cpp', ++ 'TDStretch.cpp', ++ 'cpu_detect_x86.cpp', ++ 'BPMDetect.cpp', ++ 'PeakFinder.cpp', ++ 'InterpolateLinear.cpp', ++ 'InterpolateCubic.cpp', ++ 'InterpolateShannon.cpp', ++] ++ ++soundtouch_mmx_sources = [ ++ 'mmx_optimized.cpp', ++] ++ ++soundtouch_sse_sources = [ ++ 'sse_optimized.cpp', ++] ++ ++extra_libs = [] ++if have_mmx ++ mmx_arg = '-mmmx' ++else ++ mmx_arg = '' ++endif ++ ++extra_libs += [ ++ static_library('SoundTouchMMX', ++ soundtouch_mmx_sources, ++ c_args: mmx_arg, ++ include_directories: [soundtouch_inc], ++ dependencies: platform_deps ++ ) ++] ++ ++if have_sse ++ sse_arg = '-msse' ++else ++ sse_arg = '' ++endif ++ ++extra_libs += [ ++ static_library('SoundTouchSSE', ++ soundtouch_sse_sources, ++ c_args : sse_arg, ++ include_directories: [soundtouch_inc], ++ dependencies: platform_deps ++ ) ++] ++ ++libsoundtouch = library('SoundTouch', ++ soundtouch_sources, ++ link_with: extra_libs, ++ version: libversion, ++ soversion: soversion, ++ install: true, ++ include_directories: [soundtouch_inc], ++ dependencies: [libm] ++) ++ ++soundtouch_dep = declare_dependency( ++ link_with: libsoundtouch, ++ include_directories: [soundtouch_inc], ++ dependencies: [libm] ++) +diff --git a/source/meson.build b/source/meson.build +new file mode 100644 +index 0000000..19a56de +--- /dev/null ++++ b/source/meson.build +@@ -0,0 +1,2 @@ ++subdir('SoundTouch') ++subdir('SoundStretch') +-- +2.19.0 + |