summaryrefslogtreecommitdiff
path: root/recipes/tremor.recipe
blob: 2a4aff640d9f5bae582dd28f7b52b0167bfe1c73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
from cerbero.utils import shell

class Recipe(recipe.Recipe):
    name = 'tremor'
    version = '1.2.1+r19427'
    stype = SourceType.TARBALL
    url = 'https://gstreamer.freedesktop.org/data/src/mirror/tremor-1.2.1+r19427.tar.xz'
    tarball_checksum = "4bdbb655ea0e6a70b0ad20f90f747d18936d80a4366020581eb7fc5d1b3550bf"
    licenses = [{License.BSD_like: ['COPYING']}]
    deps = ['libogg']
    config_sh = 'sh autogen.sh'
    patches = ['tremor/0001-Prevent-symbol-conflicts.patch',
               'tremor/0002-Try-fixing-shared-build.patch',
               'tremor/0003-Map-remaining-symbol-too.patch',
               'tremor/0004-Fix-build-with-the-Android-NDK-for-x86.patch',
               'tremor/0005-configure-check-for-machine-endianness.patch',
               'tremor/0006-tremor-floor-mapping-residue-function-renaming.patch',
               'tremor/0007-tremor-more-function-renaming.patch',
               'tremor/0008-fix-more-duplicated-symbols.patch']

    files_libs = ['libvorbisidec']
    files_devel = [
        'include/tremor', 'lib/pkgconfig/vorbisidec.pc']

    def prepare(self):
        if self.config.target_arch == Architecture.ARMv7:
            if self.config.target_platform != Platform.IOS:
                self.append_env('CFLAGS', '-Wa,-mimplicit-it=thumb')
        elif self.config.target_arch == Architecture.ARM:
            # Disable thumb code generation
            self.append_env('CFLAGS', '-marm')

    async def configure(self):
        if self.config.target_platform == Platform.IOS:
            shell.replace(os.path.join(self.build_dir, 'configure.in'), {'-D_ARM_ASSEM_':''})
        await super(recipe.Recipe, self).configure()