summaryrefslogtreecommitdiff
path: root/recipes/glib-networking.recipe
blob: 87384c7eac515d9282f2b2eda1bf5c5630de467e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import os

class Recipe(recipe.Recipe):
    name = 'glib-networking'
    version = '2.40.1'
    licenses = [License.LGPLv2Plus]
    stype = SourceType.TARBALL
    url = 'http://ftp.gnome.org/pub/gnome/sources/glib-networking/2.40/glib-networking-2.40.1.tar.xz'
    autoreconf = True
    configure_options = "--without-ca-certificates --enable-more-warnings"
    deps = ['glib', 'gnutls']
    patches = ['glib-networking/0001-Add-support-for-static-modules.patch',
               'glib-networking/0002-Get-the-CA-certificate-path-from-the-environment-var.patch']

    files_misc = ['lib/gio/modules/libgiognutls%(mext)s']
    files_lang = ['glib-networking']

    def prepare(self):
        querymodule_path = os.path.join(self.config.prefix, 'bin', 'gio-querymodules')
        if self.config.target_platform in [Platform.DARWIN, Platform.IOS]:
          # For the universal build we need to use the right gio-querymodules
          arch = self.config.target_arch
          arch_path = os.path.join(self.config.prefix, arch, 'bin', 'gio-querymodules')
          # Only for the universal builds
          if os.path.exists(arch_path):
              querymodule_path = arch_path

        if not self.config.prefix_is_executable():
          querymodule_path = 'true'

        if self.config.target_platform in [Platform.ANDROID]:
          self.append_env['CFLAGS'] = ' -DGST_CA_CERTIFICATES_FROM_ENV'

        self.config_sh = 'GIO_QUERYMODULES=%s %s' % (querymodule_path, self.config_sh)