# -*- 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