[jhbuild] add attribute supports-non-srcdir-builds to cmake
- From: Craig Keogh <cskeogh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] add attribute supports-non-srcdir-builds to cmake
- Date: Mon, 21 May 2012 12:17:47 +0000 (UTC)
commit 5ee85630873d0c5372d39d2beca8e470d505f10c
Author: Marcin Wojdyr <wojdyr gmail com>
Date: Fri May 4 18:30:24 2012 +0100
add attribute supports-non-srcdir-builds to cmake
jhbuild/modtypes/cmake.py | 6 +++++-
modulesets/moduleset.dtd | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/modtypes/cmake.py b/jhbuild/modtypes/cmake.py
index 7ba4a33..b30ac6c 100644
--- a/jhbuild/modtypes/cmake.py
+++ b/jhbuild/modtypes/cmake.py
@@ -44,13 +44,14 @@ class CMakeModule(Package, DownloadableModule):
Package.__init__(self, name, branch=branch)
self.cmakeargs = cmakeargs
self.makeargs = makeargs
+ self.supports_non_srcdir_builds = True
self.supports_install_destdir = True
def get_srcdir(self, buildscript):
return self.branch.srcdir
def get_builddir(self, buildscript):
- if buildscript.config.buildroot:
+ if buildscript.config.buildroot and self.supports_non_srcdir_builds:
d = buildscript.config.builddir_pattern % (
self.branch.checkoutdir or self.branch.get_module_basename())
return os.path.join(buildscript.config.buildroot, d)
@@ -140,6 +141,9 @@ class CMakeModule(Package, DownloadableModule):
def parse_cmake(node, config, uri, repositories, default_repo):
instance = CMakeModule.parse_from_xml(node, config, uri, repositories, default_repo)
+ if node.hasAttribute('supports-non-srcdir-builds'):
+ instance.supports_non_srcdir_builds = \
+ (node.getAttribute('supports-non-srcdir-builds') != 'no')
if node.hasAttribute('cmakeargs'):
instance.cmakeargs = node.getAttribute('cmakeargs')
if node.hasAttribute('makeargs'):
diff --git a/modulesets/moduleset.dtd b/modulesets/moduleset.dtd
index 4b95eb0..2ab13cb 100644
--- a/modulesets/moduleset.dtd
+++ b/modulesets/moduleset.dtd
@@ -81,7 +81,8 @@
<!ATTLIST cmake
id CDATA #REQUIRED
cmakeargs CDATA #IMPLIED
- makeargs CDATA #IMPLIED>
+ makeargs CDATA #IMPLIED
+ supports-non-srcdir-builds (yes|no) "yes">
<!ELEMENT perl (pkg-config?,branch?,dependencies?,after?)>
<!ATTLIST perl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]