# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python from cerbero.tools.libtool import LibtoolLibrary class Recipe(recipe.Recipe): name = 'libnice' version = '0.1.22' stype = SourceType.TARBALL btype = BuildType.MESON url = 'https://nice.freedesktop.org/releases/%(name)s-%(version)s.tar.gz' tarball_checksum = 'a5f724cf09eae50c41a7517141d89da4a61ec9eaca32da4a0073faed5417ad7e' # Either LGPL-2.1+ or MPL-1.1 licenses = [License.LGPLv2_1Plus, License.MPLv1_1] meson_options = {'tests' : 'disabled', 'gupnp' : 'disabled', 'gstreamer' : 'enabled', 'crypto-library' : 'openssl'} deps = ['glib', 'gstreamer-1.0'] patches = [] files_bins = ['stunbdc', 'stund'] files_libs = ['libnice'] files_devel = [ 'include/nice', 'include/stun', '%(libdir)s/pkgconfig/nice.pc', ] files_plugins_net = ['%(libdir)s/gstreamer-1.0/libgstnice%(mext)s'] files_plugins_net_devel = [ '%(libdir)s/gstreamer-1.0/libgstnice.a', '%(libdir)s/gstreamer-1.0/libgstnice.la', ] # FIXME - if_arp.h? (iOS) def prepare(self): if self.config.target_platform != Platform.LINUX or self.config.cross_compiling(): self.deps.append('openssl') else: # openssl on Linux self.use_system_libs = True def post_install (self): nice_deps = ['gio-2.0', 'gthread-2.0', 'ssl', 'crypto'] lib = LibtoolLibrary('nice', None, None, None, self.config.libdir, self.config.target_platform, deps=nice_deps) lib.save() lib = LibtoolLibrary('gstnice', None, None, None, os.path.join(self.config.libdir, 'gstreamer-1.0'), self.config.target_platform, deps=(nice_deps + ['nice', 'gstbase-1.0'])) lib.save() super().post_install()