summaryrefslogtreecommitdiff
path: root/recipes/srt.recipe
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-02-29 04:34:21 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-03-02 16:40:08 +0530
commit4deb822d34b89d7dbddf7ab6556df1a862830216 (patch)
tree7df77e0e9876b078d5fd7b538873c9cd53a1cc2e /recipes/srt.recipe
parentdbde43be4ff7c22a46b54dbfd88bed56bdccba21 (diff)
recipes: Move from gnutls + openssl to only openssl
Previously, all our recipes were linking to either openssl or gnutls. As a result, we were shipping *two* TLS implementations, which is messy because it means consumers of Cerbero and our binaries had to configure the certdb twice (thrice if you count glib-networking), do a security audit of two TLS implementations, and generally had increased binary sizes because of this. Since we require openssl for the DTLS plugin (used by webrtcbin), and all the other recipes can pick either openssl or gnutls, we have to go with openssl. This involved importing patches from vcpkg to port librtmp to the latest OpenSSL 1.1.1 version since upstream is non-existent. We have also deleted the following recipes: gmp, nettle, libtasn1, gnutls.
Diffstat (limited to 'recipes/srt.recipe')
-rw-r--r--recipes/srt.recipe9
1 files changed, 6 insertions, 3 deletions
diff --git a/recipes/srt.recipe b/recipes/srt.recipe
index cb6cf988..3b6e508b 100644
--- a/recipes/srt.recipe
+++ b/recipes/srt.recipe
@@ -11,8 +11,9 @@ class Recipe(recipe.Recipe):
licenses = [License.MPLv2]
stype = SourceType.TARBALL
btype = BuildType.CMAKE
- configure_options = '-DUSE_ENCLIB=gnutls -DENABLE_CXX11=OFF'
- deps = ['gnutls']
+ configure_options = '-DUSE_ENCLIB=openssl -DENABLE_CXX11=OFF'
+ # openssl on Linux
+ use_system_libs = True
patches = ['srt/0001-Allow-using-public-API-when-building-with-MSVC.patch']
@@ -20,6 +21,8 @@ class Recipe(recipe.Recipe):
files_devel = ['include/srt', 'lib/pkgconfig/srt.pc']
def prepare(self):
+ if self.config.target_platform != Platform.LINUX or self.config.cross_compiling():
+ self.deps.append('openssl')
if self.config.target_platform == Platform.ANDROID:
self.append_env('CXXFLAGS', '-frtti', '-fexceptions')
self.configure_options += ' -DUSE_GNUSTL=ON'
@@ -27,6 +30,6 @@ class Recipe(recipe.Recipe):
def post_install(self):
libtool_la = LibtoolLibrary('srt', None, None, None, self.config.libdir,
- self.config.target_platform)
+ self.config.target_platform, deps=['ssl', 'crypto'])
libtool_la.save()
super().post_install()