diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2014-02-07 11:40:18 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2014-05-15 11:53:55 +0200 |
commit | 1c42b792cfc26d0e6d543994054d3c78a94dd581 (patch) | |
tree | 2c5236ce066564cc5f83279095d3a12637f29162 | |
parent | 276459ab3a899dc2716f503eb6dd994fd7522f78 (diff) |
gi: use gobject-instrospection in a more generic way
-rw-r--r-- | cerbero/build/build.py | 5 | ||||
-rw-r--r-- | cerbero/build/filesprovider.py | 14 | ||||
-rw-r--r-- | cerbero/build/recipe.py | 3 |
3 files changed, 18 insertions, 4 deletions
diff --git a/cerbero/build/build.py b/cerbero/build/build.py index a85b5ab2..788016d3 100644 --- a/cerbero/build/build.py +++ b/cerbero/build/build.py @@ -229,6 +229,11 @@ class Autotools (MakefilesBase): self.configure_tpl += " --disable-maintainer-mode " self.configure_tpl += " --disable-silent-rules " + if self.config.variants.gi: + self.configure_tpl += " --enable-introspection " + else: + self.configure_tpl += " --disable-introspection " + if self.autoreconf: shell.call(self.autoreconf_sh, self.make_dir) diff --git a/cerbero/build/filesprovider.py b/cerbero/build/filesprovider.py index 21580c3a..5e9e4a29 100644 --- a/cerbero/build/filesprovider.py +++ b/cerbero/build/filesprovider.py @@ -68,6 +68,7 @@ class FilesProvider(object): .la and .so from the 'libs' category ''' devfiles = self.files_list_by_category(self.DEVEL_CAT) + devfiles.extend(self.files_list_by_category(self.TYPELIB_CAT)) devfiles.extend(self._search_devel_libraries()) return sorted(list(set(devfiles))) @@ -110,6 +111,9 @@ class FilesProvider(object): ''' return self.files_list_by_category(self.LIBS_CAT) + def use_gobject_introspection(self): + return self.TYPELIB_CAT in self._files_categories() + def _files_categories(self): ''' Get the list of categories available ''' categories = [] @@ -233,10 +237,12 @@ class FilesProvider(object): self.config.prefix) def _search_typelibfiles(self, files): - ''' - Search for typelibs in lib/girepository-1.0/ - ''' - pattern = 'lib/girepository-1.0/%s.typelib' + ''' + Search for typelibs in lib/girepository-1.0/ + ''' + if not self.config.variants.gi: + return [] + pattern = 'lib/girepository-1.0/%s.typelib' return shell.ls_files([pattern % x for x in files], self.config.prefix) diff --git a/cerbero/build/recipe.py b/cerbero/build/recipe.py index a44c7354..cb9791b5 100644 --- a/cerbero/build/recipe.py +++ b/cerbero/build/recipe.py @@ -183,6 +183,9 @@ class Recipe(FilesProvider): deps.extend(self.deps) if self.config.target_platform in self.platform_deps: deps.extend(self.platform_deps[self.config.target_platform]) + if self.config.variants.gi and self.use_gobject_introspection(): + if self.name != 'gobject-introspection': + deps.append('gobject-introspection') return deps def list_licenses_by_categories(self, categories): |