diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2013-02-25 14:31:01 +0100 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2013-02-25 16:01:05 +0100 |
commit | 9eb872a03674469e8c74d5843ec1f9e16188598d (patch) | |
tree | d52bb531925e4fae038e63e68218bb76f99a2661 | |
parent | f10e83e26725eeff6daac0c108fabaad22d6d0db (diff) |
bootstrap: add glib-tools for cross-compilation targets
glib is needed for glib-genmarshal and glib-mkenums in platforms
where we can't install glib with a package manager and when the target
platform/arch is not executable in the build one.
-rw-r--r-- | cerbero/bootstrap/build_tools.py | 4 | ||||
-rw-r--r-- | recipes/build-tools/glib-tools.recipe | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/cerbero/bootstrap/build_tools.py b/cerbero/bootstrap/build_tools.py index 6c5881c..256924f 100644 --- a/cerbero/bootstrap/build_tools.py +++ b/cerbero/bootstrap/build_tools.py @@ -46,6 +46,10 @@ class BuildTools (BootstraperBase): self.BUILD_TOOLS.insert(0, 'tar') if self.config.target_platform == Platform.IOS: self.BUILD_TOOLS.append('gas-preprocessor') + if self.config.platform != Platform.LINUX and\ + not self.config.prefix_is_executable(): + # For glib-mkenums and glib-genmarshal + self.BUILD_TOOLS.append('glib-tools') def start(self): # Use a common prefix for the build tools for all the configurations diff --git a/recipes/build-tools/glib-tools.recipe b/recipes/build-tools/glib-tools.recipe new file mode 100644 index 0000000..90cf7ae --- /dev/null +++ b/recipes/build-tools/glib-tools.recipe @@ -0,0 +1,27 @@ +# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python + +class Recipe(recipe.Recipe): + name = 'glib-tools' + version = '2.34.2' + licenses = [License.LGPLv2Plus] + configure_sh = 'sh autogen.sh' + configure_options = ' --enable-static' + deps = ['libffi', 'zlib'] + can_use_configure_cache = False + make = 'make -C glib && make -C gthread && make -C gobject' + make_install = 'make -C glib install && make -C gthread install && make -C gobject install' + platform_deps = {Platform.WINDOWS: ['libiconv', 'gettext'], + Platform.DARWIN: ['libiconv', 'gettext'], + Platform.IOS: ['libiconv', 'gettext'], + Platform.ANDROID: ['libiconv', 'gettext']} + + + def prepare(self): + self.remotes['origin'] = ('%s/%s.git' % (self.config.git_root, 'glib')) + self.repo_dir = os.path.join(self.config.local_sources, 'glib') + if self.config.target_platform != Platform.LINUX: + self.configure_options += ' --disable-gtk-doc' + elif self.config.target_platform == Platform.WINDOWS: + self.configure_options = '--with-libiconv=gnu' + elif self.config.target_platform in Platform.DARWIN: + self.config_sh = 'CFLAGS="$CFLAGS -DHAVE_STRNDUP" ./configure' |