# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python import sys class Recipe(recipe.Recipe): name = 'gobject-introspection' version = '1.54.1' stype = SourceType.TARBALL url = 'http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.54/gobject-introspection-%(version)s.tar.xz' licenses = [License.GPLv2Plus] autoreconf = True autoreconf_sh = 'gtkdocize && autoreconf -vfi' deps = ['glib'] 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 = [ 'lib/gobject-introspection/giscanner/__init__.py', 'lib/gobject-introspection/giscanner/_giscanner%(pext)s', 'lib/gobject-introspection/giscanner/annotationmain.py', 'lib/gobject-introspection/giscanner/annotationparser.py', 'lib/gobject-introspection/giscanner/ast.py', 'lib/gobject-introspection/giscanner/cachestore.py', 'lib/gobject-introspection/giscanner/codegen.py', 'lib/gobject-introspection/giscanner/collections/__init__.py', 'lib/gobject-introspection/giscanner/collections/counter.py', 'lib/gobject-introspection/giscanner/collections/ordereddict.py', 'lib/gobject-introspection/giscanner/docmain.py', 'lib/gobject-introspection/giscanner/docwriter.py', 'lib/gobject-introspection/giscanner/dumper.py', 'lib/gobject-introspection/giscanner/gdumpparser.py', 'lib/gobject-introspection/giscanner/girparser.py', 'lib/gobject-introspection/giscanner/girwriter.py', 'lib/gobject-introspection/giscanner/introspectablepass.py', 'lib/gobject-introspection/giscanner/libtoolimporter.py', 'lib/gobject-introspection/giscanner/maintransformer.py', 'lib/gobject-introspection/giscanner/message.py', 'lib/gobject-introspection/giscanner/scannermain.py', 'lib/gobject-introspection/giscanner/sectionparser.py', 'lib/gobject-introspection/giscanner/shlibs.py', 'lib/gobject-introspection/giscanner/sourcescanner.py', 'lib/gobject-introspection/giscanner/testcodegen.py', 'lib/gobject-introspection/giscanner/transformer.py', 'lib/gobject-introspection/giscanner/utils.py', 'lib/gobject-introspection/giscanner/xmlwriter.py' ] files_devel = [ 'include/gobject-introspection-1.0', 'lib/pkgconfig/gobject-introspection-1.0.pc', 'lib/pkgconfig/gobject-introspection-no-export-1.0.pc', 'share/gobject-introspection-1.0' ] def prepare(self): # on arch python2 needs to be specified as the interpreter # the full path needs to be specified, since shebangs are generated if self.config.target_distro == Distro.ARCH: self.config_sh = "PYTHON=/usr/bin/python2 %s" % self.config_sh # TODO: catch the share/man stuff like man1/g-ir* ? def configure(self): if self.config.target_platform in [Platform.IOS, Platform.DARWIN]: if Architecture.is_arm(self.config.target_arch): arch = 'arm' elif self.config.target_arch == Architecture.X86: arch = 'i386' else: arch = self.config.target_arch makefileam = os.path.join (self.build_dir, 'Makefile-gir.am') replacements = {'glib-2.0/include/glibconfig.h': 'glib-2.0/include/%s/glibconfig.h' % arch} shell.replace(makefileam, replacements) super(Recipe, self).configure()