# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python from cerbero.utils import shell class Recipe(recipe.Recipe): name = 'flac' version = '1.2.1' # only libraries are Xiph.org (aka BSD-like), tools are GPLv2+ and defined below licenses = [License.BSD_like] deps = [ 'libogg' ] platform_deps = { Platform.WINDOWS: ['libiconv'] } configure_options = ' --disable-cpplibs' files_libs = ['libFLAC'] files_bins = ['flac', 'metaflac'] licenses_bins = [License.GPLv2Plus] files_devel = [ 'lib/pkgconfig/flac.pc', 'include/FLAC', ] # Skipping because it takes too long make_check = None def prepare(self): if self.config.target_platform in [Platform.DARWIN, Platform.IOS]: if self.config.target_arch == Architecture.X86: self.configure_options += ' --disable-asm-optimizations' if self.config.target_platform in [Platform.ANDROID, Platform.IOS]: self.autoreconf = True def configure(self): if self.config.target_platform == Platform.ANDROID: if self.config.target_arch == Architecture.X86: # for missing sys/ucontext.h shell.replace(os.path.join(self.build_dir, 'src', 'libFLAC', 'cpu.c'), {'# undef USE_OBSOLETE_SIGCONTEXT_FLAVOR': '#define USE_OBSOLETE_SIGCONTEXT_FLAVOR'}) super(Recipe, self).configure()