# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python import os from cerbero.tools.libtool import LibtoolLibrary class Recipe(recipe.Recipe): name = 'glib-networking' version = '2.74.0' licenses = [{License.LGPLv2Plus: None, License.Misc: ['LICENSE_EXCEPTION']}] stype = SourceType.TARBALL btype = BuildType.MESON url = 'gnome://' tarball_checksum = '1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b' meson_options = {'libproxy': 'disabled', 'gnome_proxy': 'disabled', 'gnutls': 'disabled', 'openssl': 'enabled', # Also build static modules on all platforms 'static_modules': 'true'} deps = ['glib'] # openssl on Linux use_system_libs = True # https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/229 patches = [name + '/0001-Don-t-try-to-use-keychain-CA-certificates-on-iOS.patch'] files_misc = ['%(libdir)s/gio/modules/libgioopenssl%(mext)s'] files_lang = ['glib-networking'] files_devel = ['%(libdir)s/gio/modules/libgioopenssl.a'] def prepare(self): # Pick system openssl if on Linux and not cross-compiling if self.config.target_platform != Platform.LINUX or self.config.cross_compiling(): self.deps.append('openssl') def post_install(self): # Meson does not generate la files LibtoolLibrary('gioopenssl', None, None, None, os.path.join(self.config.libdir, 'gio', 'modules'), self.config.target_platform, deps=['ssl', 'crypto']).save() super().post_install()