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


class Recipe(recipe.Recipe):
    name = 'spandsp'
    version = '0.0.6'
    stype = SourceType.TARBALL
    url = 'https://www.soft-switch.org/downloads/spandsp/spandsp-%(version)s.tar.gz'
    tarball_checksum = 'cc053ac67e8ac4bb992f258fd94f275a7872df959f6a87763965feabfdcc9465'
    licenses = [License.LGPLv2_1Plus]
    deps = ['tiff']
    allow_parallel_build = False
    config_sh = 'sh ./autogen.sh && sh ./configure'
    patches = [ 'spandsp/0001-spandsp-do-not-compile-has_X86FEATURE-symbols.patch',
                'spandsp/0002-Define-LIBSPANDSP_EXPORTS-when-building-the-spandsp-.patch',
                'spandsp/0003-Use-BUILT_SOURCES-to-generate-extra-headers.patch',
                'spandsp/0001-Don-t-do-a-whereis-which-dance-to-find-which.patch',
                'spandsp/0001-Make-the-public-API-accessible-from-MSVC.patch',
                'spandsp/0001-Delete-redundant-function-prototype-in-header.patch',]

    files_libs = ['libspandsp']
    files_devel = ['include/spandsp', 'include/spandsp.h', 'lib/pkgconfig/spandsp.pc']

    def prepare(self):
        # Workaround broken autoconf test in cross compilation
        if self.config.arch != self.config.target_arch or self.config.target_platform in (Platform.ANDROID, Platform.IOS):
            self.set_env('ac_cv_func_malloc_0_nonnull', 'yes')
            self.set_env('ac_cv_func_realloc_0_nonnull', 'yes')
        if self.config.target_platform == Platform.WINDOWS:
            self.patches += ['spandsp/0001-Fix-build-for-windows-using-mingw.patch']