summaryrefslogtreecommitdiff
path: root/recipes/libtheora.recipe
blob: 29e98305b9d65594e893caa4d7d1618d05567eee (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
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Recipe(recipe.Recipe):
    name = 'libtheora'
    version = '1.1.1'
    licenses = [License.BSD]
    stype = SourceType.TARBALL
    url = 'https://downloads.xiph.org/releases/theora/libtheora-%(version)s.tar.bz2'
    deps = ['libogg', 'libvorbis']
    allow_parallel_build = False
    patches = ['libtheora/0001-Add-option-to-disable-doc.patch',
               'libtheora/0002-Update-makefiles.patch',
               'libtheora/0003-Fix-linking-of-theora-encoder-library.patch',
               'libtheora/0004-Use-our-automake-version-and-not-an-older-one.patch',
               'libtheora/0005-Update-Makefile.in-too-to-avoid-needing-to-call-auto.patch',
               'libtheora/0006-examples-Don-t-use-png_sizeof.patch']
    configure_options = ' --disable-spec --disable-doc'

    files_libs = ['libtheora', 'libtheoradec', 'libtheoraenc']
    files_bins = ['dvconnect', 'encodedv', 'dubdv']
    files_devel = ['include/theora', 'lib/pkgconfig/theora.pc',
                   'lib/pkgconfig/theoraenc.pc', 'lib/pkgconfig/theoradec.pc']

    def prepare(self):
        if self.config.target_platform == Platform.ANDROID:
            self.configure_options += ' --disable-examples'
            self.config_sh = 'sh autogen.sh'
        elif self.config.target_platform == Platform.IOS:
            self.patches += ['libtheora/0007-Don-t-use-fforce-addr.patch']
        elif self.config.target_platform == Platform.DARWIN:
            self.patches += ['libtheora/0007-Don-t-use-fforce-addr.patch']
        elif self.config.cross_compiling():
            self.configure_options += ' --disable-examples'