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

class Recipe(recipe.Recipe):
    name = 'sbc'
    version = '1.3'
    stype = SourceType.TARBALL
    url = 'https://www.kernel.org/pub/linux/bluetooth/sbc-%(version)s.tar.gz'
    tarball_checksum = '4a358581fb57b98e0c1c34606a35343f31f908f57c26659e51495f75e283785d'
    licenses = [License.LGPLv2_1Plus]
    files_libs = ['libsbc']
    files_devel = ['include/sbc/sbc.h', 'lib/pkgconfig/sbc.pc']
    configure_options = '--disable-tester --disable-tools'
    patches = ['sbc/0001-sbc-Use-stdint.h.patch',
               'sbc/0002-Don-t-use-NEON-with-aarch64-on-Clang.patch',
               'sbc/0003-sbc.h-Define-ssize_t-when-building-with-MSVC.patch',]

    def compile(self):
        if self.config.target_platform != Platform.LINUX:
            # Don't use --version-script on platforms other than GNU/Linux.
            # ld does not support that on non-GNU platforms. This is not done
            # via a patch to Makefile.am because the Autotools build system
            # doesn't regenerate after the Autofoo sources are changed.
            shell.replace(os.path.join(self.build_dir, 'Makefile'),
                          {'-Wl,--version-script=$(top_srcdir)/sbc/sbc.sym': '$(NULL)'})
        super(Recipe, self).compile()