# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python from cerbero.tools.libtool import LibtoolLibrary class Recipe(recipe.Recipe): name = 'orc' version = '0.4.33' stype = SourceType.TARBALL # These properties are only used when stype is TARBALL url = 'https://gstreamer.freedesktop.org/src/orc/orc-%(version)s.tar.xz' tarball_checksum = '844e6d7db8086f793f57618d3d4b68d29d99b16034e71430df3c21cfd3c3542a' # These properties are only used when stype is GIT remotes = {'origin': 'https://gitlab.freedesktop.org/gstreamer/orc.git'} commit = 'origin/main' patches = [ # https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/87 (merged) 'orc/0001-Fix-usage-of-pthread_jit_write_protect_np-on-macOS-a.patch', # https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/89 (merged) 'orc/0001-Fix-guard-around-usage-of-pthread_jit_write_protect.patch', ] btype = BuildType.MESON licenses = [{License.BSD_like: ['COPYING']}] meson_options = {'benchmarks': 'disabled', 'tests': 'disabled', 'tools': 'enabled', 'orc-test': 'enabled'} files_libs = ['liborc-0.4'] files_devel = ['include/orc-0.4', 'lib/pkgconfig/orc-0.4.pc', 'share/aclocal/orc.m4', 'bin/orcc%(bext)s'] def prepare(self): # Don't build testing helper library on ios if self.config.target_platform != Platform.IOS: self.files_libs.append('liborc-test-0.4') self.files_devel.append('bin/orc-bugreport%(bext)s') else: self.meson_options['orc-test'] = 'disabled' def post_install(self): dependency_libs = [] if self.config.target_platform == Platform.ANDROID: dependency_libs += ['-lm', '-llog'] lib = LibtoolLibrary('orc-0.4', None, None, None, self.config.libdir, self.config.target_platform, deps=dependency_libs) lib.save() if self.config.target_platform != Platform.IOS: lib = LibtoolLibrary('orc-test-0.4', None, None, None, self.config.libdir, self.config.target_platform, deps=dependency_libs + ['orc-0.4']).save() super().post_install()