# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python from cerbero.utils import shell, fix_android_ndk16_cxx class Recipe(recipe.Recipe): name = 'soundtouch' version = '1.9.2' stype = SourceType.TARBALL url = 'https://www.surina.net/soundtouch/soundtouch-%(version)s.tar.gz' tarball_dirname = 'soundtouch' tarball_checksum = 'caeb86511e81420eeb454cb5db53f56d96b8451d37d89af6e55b12eb4da1c513' licenses = [License.LGPLv2_1Plus] autoreconf_sh = './bootstrap' autoreconf = True patches = ['soundtouch/0001-Add-dummy-file-to-make-sure-config-m4-exists.patch', 'soundtouch/0002-Use-STLPORT-on-Android.patch', 'soundtouch/0003-Don-t-build-soundstretch.patch', 'soundtouch/0004-Use-gnustl.patch', 'soundtouch/0005-Fix-soundstretch-linking.patch', 'soundtouch/0006-Fix-pkg-config-file.patch', 'soundtouch/0007-Make-it-compile-on-IOS.patch', 'soundtouch/0008-Fix-compilation-with-clang.patch', 'soundtouch/0010-Try-harder-to-generate-Win32-DLLs.patch'] files_libs = ['libSoundTouch'] files_devel = ['include/soundtouch', 'lib/pkgconfig/soundtouch.pc'] def prepare (self): self.configure_options += ' --enable-static ' if self.config.target_platform == Platform.ANDROID: self.configure_options += ' --with-gnustl ' self.append_env('CXXFLAGS', '-fexceptions') elif self.config.target_platform == Platform.IOS: self.autoreconf = True def configure (self): fix_android_ndk16_cxx (self.config, os.path.join(self.make_dir, 'source', 'SoundTouch')) super(recipe.Recipe, self).configure()