summaryrefslogtreecommitdiff
path: root/recipes/dbus-glib.recipe
blob: 12a2b91126da85c2efc1ae97c90ad09a4c174706 (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 = 'dbus-glib'
    version = '0.100'
    autoreconf = True
    deps = ['glib', 'dbus']

    files_bins = ['dbus-binding-tool']
    files_libs = ['libdbus-glib-1']
    files_devel = [
            'include/dbus-1.0/dbus/dbus-glib-bindings.h',
            'include/dbus-1.0/dbus/dbus-glib-lowlevel.h',
            'include/dbus-1.0/dbus/dbus-glib.h',
            'include/dbus-1.0/dbus/dbus-gtype-specialized.h',
            'include/dbus-1.0/dbus/dbus-gvalue-parse-variant.h',
            'lib/pkgconfig/dbus-glib-1.pc',
    ]
    files_helper = ['libexec/dbus-bash-completion-helper%(bext)s']

    def prepare(self):
        if self.config.target_platform == Platform.WINDOWS and\
                self.config.platform != Platform.WINDOWS:
            self.configure_options += \
                "--with-dbus-binding-tool=/usr/bin/dbus-binding-tool"
        if self.config.target_platform == Platform.ANDROID and\
                self.config.platform != Platform.ANDROID:
            self.configure_options += \
                "--with-dbus-binding-tool=/usr/bin/dbus-binding-tool"

    def compile(self):
        if self.config.target_platform == Platform.WINDOWS:
            dgb = os.path.join(self.build_dir, 'tools', 'dbus-glib-bindings.h')
            if os.path.exists(dgb):
                os.remove(dgb)
        super(recipe.Recipe, self).compile()