[jhbuild] cmake: Add support for skip-install
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] cmake: Add support for skip-install
- Date: Wed, 27 Jan 2016 16:23:44 +0000 (UTC)
commit 93d18a3a71a839fb5aa4754672294640c2e20f26
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Thu Nov 19 09:44:17 2015 +0000
cmake: Add support for skip-install
As we have in autotools module.
https://bugzilla.gnome.org/show_bug.cgi?id=758320
doc/C/index.docbook | 3 ++-
jhbuild/modtypes/cmake.py | 16 ++++++++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/doc/C/index.docbook b/doc/C/index.docbook
index 374fcbc..d92a0bd 100644
--- a/doc/C/index.docbook
+++ b/doc/C/index.docbook
@@ -2985,7 +2985,8 @@ Optional packages: (JHBuild will build the missing packages)
define a module which is built using the CMake build system.</para>
<programlisting>
-<cmake id="<replaceable>modulename</replaceable>">
+ <cmake id="<replaceable>modulename</replaceable>"
+ [ skip-install="<replaceable>skip-install</replaceable>" ]>
<branch [ ... ] >
[...]
</branch>
diff --git a/jhbuild/modtypes/cmake.py b/jhbuild/modtypes/cmake.py
index 0a168a9..079d564 100644
--- a/jhbuild/modtypes/cmake.py
+++ b/jhbuild/modtypes/cmake.py
@@ -41,10 +41,12 @@ class CMakeModule(MakeModule, DownloadableModule):
PHASE_INSTALL = 'install'
def __init__(self, name, branch=None,
- cmakeargs='', makeargs='',):
+ cmakeargs='', makeargs='',
+ skip_install_phase=False):
MakeModule.__init__(self, name, branch=branch, makeargs=makeargs)
self.cmakeargs = cmakeargs
self.supports_non_srcdir_builds = True
+ self.skip_install_phase = skip_install_phase
self.force_non_srcdir_builds = False
self.supports_install_destdir = True
@@ -118,6 +120,9 @@ class CMakeModule(MakeModule, DownloadableModule):
do_dist.depends = [PHASE_CONFIGURE]
do_dist.error_phases = [PHASE_FORCE_CHECKOUT, PHASE_CONFIGURE]
+ def skip_install(self, buildscript, last_phase):
+ return self.config.noinstall or self.skip_install_phase
+
def do_install(self, buildscript):
buildscript.set_action(_('Installing'), self)
builddir = self.get_builddir(buildscript)
@@ -127,7 +132,8 @@ class CMakeModule(MakeModule, DownloadableModule):
do_install.depends = [PHASE_BUILD]
def xml_tag_and_attrs(self):
- return 'cmake', [('id', 'name', None)]
+ return 'cmake', [('id', 'name', None),
+ ('skip-install', 'skip_install_phase', False)]
def parse_cmake(node, config, uri, repositories, default_repo):
@@ -138,6 +144,12 @@ def parse_cmake(node, config, uri, repositories, default_repo):
instance.cmakeargs = collect_args(instance, node, 'cmakeargs')
instance.makeargs = collect_args(instance, node, 'makeargs')
+ if node.hasAttribute('skip-install'):
+ skip_install = node.getAttribute('skip-install')
+ if skip_install.lower() in ('true', 'yes'):
+ instance.skip_install_phase = True
+ else:
+ instance.skip_install_phase = False
if node.hasAttribute('supports-non-srcdir-builds'):
instance.supports_non_srcdir_builds = \
(node.getAttribute('supports-non-srcdir-builds') != 'no')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]