diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-05-24 11:59:52 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-05-24 12:00:31 +0200 |
commit | 8d5f9432747f6de545f8da3c4e51f04cc90814ee (patch) | |
tree | f022c9a3c6a6e170ae8d4f5c781df4bb985d7e31 | |
parent | 03752ef89def58f8abdc506ae005fe4d8b6e8edf (diff) |
glib-networking: Pass correct path to gio-querymodules
Fixes build on OSX when doing universal builds.
-rw-r--r-- | recipes/glib-networking-static.recipe | 19 | ||||
-rw-r--r-- | recipes/glib-networking.recipe | 21 |
2 files changed, 40 insertions, 0 deletions
diff --git a/recipes/glib-networking-static.recipe b/recipes/glib-networking-static.recipe index 61a6b1c..752b9b2 100644 --- a/recipes/glib-networking-static.recipe +++ b/recipes/glib-networking-static.recipe @@ -17,6 +17,25 @@ class Recipe(recipe.Recipe): self.repo_dir = self.repo_dir.replace('-static', '') self.tmp_destdir = os.path.join(self.build_dir, 'static-build') + querymodule_path = None + if self.config.target_platform in [Platform.DARWIN, Platform.IOS]: + # For the universal build we need to use the right gio-querymodules + arch = self.config.target_arch + + querymodule_path = os.path.join(self.config.prefix, arch, 'bin', 'gio-querymodules') + if not os.path.exists(querymodule_path): + querymodule_path = None + + if not querymodule_path: + querymodule_path = os.path.join(self.config.prefix, 'bin', 'gio-querymodules') + if not os.path.exists(querymodule_path): + raise FatalError("Could not find gio-querymodules") + + if not self.config.prefix_is_executable(): + querymodule_path = 'true' + + self.config_sh = 'GIO_QUERYMODULES=%s %s' % (querymodule_path, self.config_sh) + def install(self): plugins_dir = os.path.join(self.config.prefix, os.path.dirname(self.files_devel[0])) diff --git a/recipes/glib-networking.recipe b/recipes/glib-networking.recipe index 782646d..1bb6f94 100644 --- a/recipes/glib-networking.recipe +++ b/recipes/glib-networking.recipe @@ -1,5 +1,6 @@ # -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python +import os class Recipe(recipe.Recipe): name = 'glib-networking' @@ -10,3 +11,23 @@ class Recipe(recipe.Recipe): files_misc = ['lib/gio/modules/libgiognutls%(mext)s'] files_lang = ['glib-networking'] + + def prepare(self): + querymodule_path = None + if self.config.target_platform in [Platform.DARWIN, Platform.IOS]: + # For the universal build we need to use the right gio-querymodules + arch = self.config.target_arch + + querymodule_path = os.path.join(self.config.prefix, arch, 'bin', 'gio-querymodules') + if not os.path.exists(querymodule_path): + querymodule_path = None + + if not querymodule_path: + querymodule_path = os.path.join(self.config.prefix, 'bin', 'gio-querymodules') + if not os.path.exists(querymodule_path): + raise FatalError("Could not find gio-querymodules") + + if not self.config.prefix_is_executable(): + querymodule_path = 'true' + + self.config_sh = 'GIO_QUERYMODULES=%s %s' % (querymodule_path, self.config_sh) |