summaryrefslogtreecommitdiff
path: root/recipes/build-tools/glib-tools.recipe
blob: 1f774bf0f2b686535e710bdc464786e2bb77f06c (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
36
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python

class Recipe(recipe.Recipe):
    name = 'glib-tools'
    version = '2.44.1'
    stype = SourceType.TARBALL
    url = 'http://ftp.acc.umu.se/pub/GNOME/sources/glib/2.44/glib-%(version)s.tar.xz'
    tarball_dirname = 'glib-%(version)s'
    licenses = [License.LGPLv2Plus]
    config_sh = 'sh autogen.sh'
    deps = ['libffi', 'zlib']
    can_use_configure_cache = False
    patches = ["../glib/0001-Let-user-disable-Cocoa-and-Carbon-support-on-demand.patch",
               "../glib/0002-Optionally-revert-to-the-old-pre-2.28-URI-handler-co.patch",
               "../glib/0003-Add-support-for-loading-GIO-modules-from-the-distro-.patch",
               "../glib/0004-Allow-for-a-second-distro-GIO-module-path-as-used-on.patch",
               "../glib/0005-Blacklist-the-bamf-GIO-module.patch",
               "../glib/0006-giomodule-do-not-try-to-load-modules-from-gio-module.patch",
               "../glib/0008-gdbus-codgen-Use-a-proper-shebang-in-the-generator.patch",
               "../glib/0009-Unhide-_g_io_modules_ensure_extension_points_registe.patch",
               '../glib/0014-Don-t-use-AT_FDCWD-on-iOS-for-now.patch',
               '../glib/0015-Implementation-of-Cocoa-event-loop-integration-in-GM.patch',
               '../glib/0016-gio-Fix-build-on-Android-Lollipop.patch',
               '../glib/0018-gio-ginetaddress.c-Fix-Windows-XP-inet_pton-Emulatio.patch',
               '../glib/0019-Fix-g_inet_address_to_string-on-XP.patch',
               '../glib/0020-Fix-a-FIXME-in-the-WinXP-inet_pton-implementation.patch',
               '../glib/0021-gioerror-Add-more-mappings-for-WinSock-error-codes.patch'
              ]

    def prepare(self):
        if self.config.target_platform != Platform.LINUX:
            self.configure_options += ' --disable-gtk-doc'
        elif self.config.target_platform == Platform.WINDOWS:
            self.configure_options = '--with-libiconv=gnu'
        elif self.config.target_platform in Platform.DARWIN:
            self.config_sh = 'CFLAGS="$CFLAGS -DHAVE_STRNDUP" ./configure'