summaryrefslogtreecommitdiff
path: root/recipes/glib-networking.recipe
blob: 03a0be603a9da3bf10c87ae2c29df5247df98050 (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
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import os

class Recipe(recipe.Recipe):
    name = 'glib-networking'
    version = '2.34.2'
    licenses = [License.LGPLv2Plus]
    configure_options = "--without-ca-certificates --enable-more-warnings"
    deps = ['glib', 'gnutls']

    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'

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