# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python from cerbero.tools.libtool import LibtoolLibrary from cerbero.utils import shell import shutil class Recipe(recipe.Recipe): name = 'libsrtp' version = '2.2.0' stype = SourceType.TARBALL make = ['make', 'all', 'shared_library'] url = 'https://github.com/cisco/%(name)s/archive/v%(version)s.tar.gz' tarball_checksum = '44fd7497bce78767e96b54a11bca520adb2ad32effd515f04bce602b60a1a50b' licenses = [{License.BSD_like: ['LICENSE']}] patches = [ 'libsrtp/0002-ios-Remove-flags-incompatible-with-fembed-bitcode.patch', # https://github.com/cisco/libsrtp/pull/486 'libsrtp/0001-Fix-building-with-gcc-10.patch', ] files_libs = ['libsrtp2'] files_devel = ['include/srtp2', 'lib/pkgconfig/libsrtp2.pc'] def prepare(self): # Don't accidentially build with pcap support self.set_env('ac_cv_lib_pcap_pcap_create', 'no') async def install(self): await super(Recipe, self).install() libdir = os.path.join(self.config.prefix, 'lib' + self.config.lib_suffix) shutil.copy(os.path.join(self.build_dir, 'srtp.def'), libdir) def post_install(self): # XXX: Don't forget to keep this in sync with the library version! libtool_la = LibtoolLibrary('srtp2', 1, None, None, self.config.libdir, self.config.target_platform) libtool_la.save() super().post_install()