summaryrefslogtreecommitdiff
path: root/recipes/gobject-introspection.recipe
blob: 7e6b9bbe24005b399123b9776364937a3553f12f (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
 # -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
import sys


class Recipe(recipe.Recipe):
    name = 'gobject-introspection'
    version = '1.74.0'
    stype = SourceType.TARBALL
    btype = BuildType.MESON
    url = 'gnome://'
    tarball_checksum = '347b3a719e68ba4c69ff2d57ee2689233ea8c07fc492205e573386779e42d653'
    licenses = [License.LGPLv2Plus]
    licenses_bins = [License.GPLv2Plus]
    deps = ['glib']

    patches = [
        # https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/448
        f'{name}/0001-giscanner-Allow-passing-full-paths-to-libraries-with.patch',
        f'{name}/0002-dumper-Fix-introspection-binaries-missing-rpaths-for.patch'
    ]

    files_bins = ['g-ir-annotation-tool', 'g-ir-compiler', 'g-ir-doc-tool', 'g-ir-generate', 'g-ir-scanner']
    files_libs = ['libgirepository-1.0']
    files_typelibs = ['cairo-1.0',
        'DBus-1.0',
        'DBusGLib-1.0',
        'fontconfig-2.0',
        'freetype2-2.0',
        'Gio-2.0',
        'GIRepository-2.0',
        'GL-1.0',
        'GLib-2.0',
        'GModule-2.0',
        'GObject-2.0',
        'libxml2-2.0',
        'win32-1.0',
        'xfixes-4.0',
        'xft-2.0',
        'xrandr-1.3',
        'xlib-2.0']
    files_gi = [
        '%(libdir)s/gobject-introspection/giscanner/__init__.py',
        '%(libdir)s/gobject-introspection/giscanner/_giscanner%(pext)s',
        '%(libdir)s/gobject-introspection/giscanner/annotationmain.py',
        '%(libdir)s/gobject-introspection/giscanner/annotationparser.py',
        '%(libdir)s/gobject-introspection/giscanner/ast.py',
        '%(libdir)s/gobject-introspection/giscanner/cachestore.py',
        '%(libdir)s/gobject-introspection/giscanner/codegen.py',
        '%(libdir)s/gobject-introspection/giscanner/collections/__init__.py',
        '%(libdir)s/gobject-introspection/giscanner/collections/counter.py',
        '%(libdir)s/gobject-introspection/giscanner/collections/ordereddict.py',
        '%(libdir)s/gobject-introspection/giscanner/docmain.py',
        '%(libdir)s/gobject-introspection/giscanner/docwriter.py',
        '%(libdir)s/gobject-introspection/giscanner/dumper.py',
        '%(libdir)s/gobject-introspection/giscanner/gdumpparser.py',
        '%(libdir)s/gobject-introspection/giscanner/girparser.py',
        '%(libdir)s/gobject-introspection/giscanner/girwriter.py',
        '%(libdir)s/gobject-introspection/giscanner/introspectablepass.py',
        '%(libdir)s/gobject-introspection/giscanner/libtoolimporter.py',
        '%(libdir)s/gobject-introspection/giscanner/maintransformer.py',
        '%(libdir)s/gobject-introspection/giscanner/message.py',
        '%(libdir)s/gobject-introspection/giscanner/scannermain.py',
        '%(libdir)s/gobject-introspection/giscanner/sectionparser.py',
        '%(libdir)s/gobject-introspection/giscanner/shlibs.py',
        '%(libdir)s/gobject-introspection/giscanner/sourcescanner.py',
        '%(libdir)s/gobject-introspection/giscanner/testcodegen.py',
        '%(libdir)s/gobject-introspection/giscanner/transformer.py',
        '%(libdir)s/gobject-introspection/giscanner/utils.py',
        '%(libdir)s/gobject-introspection/giscanner/xmlwriter.py'
    ]
    files_devel = [
        'include/gobject-introspection-1.0',
        '%(libdir)s/pkgconfig/gobject-introspection-1.0.pc',
        '%(libdir)s/pkgconfig/gobject-introspection-no-export-1.0.pc',
        'share/gobject-introspection-1.0',
        'share/aclocal/introspection.m4'
    ]

    def prepare(self):
        if self.config.platform == Platform.WINDOWS:
            # gobject-introspection forces a Python 3 interpreter named "python3",
            # which on Windows matches the one provided by UCRT64. However, 
            # Meson's Python 3 interpreter is `python.exe`. Meson
            # can handle this for us, provided we either don't force the
            # naming, or supply the correct name to `find_installation` here.
            self.meson_options['python'] = self.config.python_exe