diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-06-18 00:23:43 +0530 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-07-22 12:03:20 +0000 |
commit | 2be560f12dac3fc671687adbc79099c99415f605 (patch) | |
tree | bea4f2f2043319d39983233cfe869b51c5d95a09 /recipes/opus.recipe | |
parent | ddfdb501cde1a6b78d12e4c3d6602d91116c49b6 (diff) |
opus.recipe: Port to Meson, enable on UWP
Tested and compared with autotools build on:
Windows (UWP, MSVC, MinGW) x (x86, x86_64, ARM64)
Android Universal (ARM64, x86, x86_64, ARMv7)
iOS Universal (ARM64, X86_64)
macOS (x86_64)
Linux (x86_64, ARMv7)
Comparison was done by ensuring that the same options were enabled,
and that the static library had the same objects inside it when built
with Autotools and Meson.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/560>
Diffstat (limited to 'recipes/opus.recipe')
-rw-r--r-- | recipes/opus.recipe | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/recipes/opus.recipe b/recipes/opus.recipe index aa0721de..a8cc7a9a 100644 --- a/recipes/opus.recipe +++ b/recipes/opus.recipe @@ -6,16 +6,27 @@ class Recipe(recipe.Recipe): version = '1.3.1' licenses = [{License.BSD_like: ['COPYING']}] stype = SourceType.TARBALL + btype = BuildType.MESON url = 'xiph://.tar.gz' tarball_checksum = '65b58e1e25b2a114157014736a3d9dfeaad8d41be1c8179866f144a2fb44ff9d' + meson_options = { + 'rtcd': 'enabled', + 'intrinsics': 'enabled', + 'extra-programs': 'disabled', + 'tests': 'disabled', + 'docs': 'disabled', + } - patches = ['opus/0001-celt-Force-stack-alignment-for-functions-using-__m12.patch'] + patches = [ + 'opus/0001-celt-Force-stack-alignment-for-functions-using-__m12.patch', + # https://gitlab.xiph.org/xiph/opus/-/merge_requests/13 + 'opus/opus-meson-port.patch', + ] files_libs = ['libopus'] files_devel = ['include/opus', 'lib/pkgconfig/opus.pc'] - # Starting with v1.1, Opus has special ARM assembly optimizations when - # built without floating point support. Since all our builds assume floating - # point is available (NEON or VFP), we're not enabling that. However, the - # option is there. Note that there is separate NEON/intrinsics support for - # ARM and x86. - # configure_options = '--disable-fixed-point --enable-asm' + + def prepare(self): + # Always have NEON on ARM64, don't need to detect the CPU at runtime. + if self.config.target_arch == Architecture.ARM64: + self.meson_options['rtcd'] = 'disabled' |