[jhbuild] autotools: add a "bootstrap" attribute to skip default dependencies



commit d7820ee9599bea33a5a62e2847371b312083b64f
Author: Christoph Reiter <creiter src gnome org>
Date:   Sun Feb 14 11:28:07 2016 +0100

    autotools: add a "bootstrap" attribute to skip default dependencies
    
    Packages like autoconf/automake in the bootstrap moduleset use
    the autotools module type which defines default dependencies
    and leads to dependency cycles during bootstrap.
    
    This adds a bootstrap attribute which removes the default dependencies
    and allows the packages to control all dependencies.
    
    Initially the plan was to re-use the skip-autogen attribute and skip
    the default dependencies if "true", but skip-autogen also prevents
    configure from running which is still needed for those packages.

 jhbuild/modtypes/autotools.py |    5 ++++-
 modulesets/bootstrap.modules  |   16 +++++++++++-----
 modulesets/moduleset.dtd      |    1 +
 3 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/jhbuild/modtypes/autotools.py b/jhbuild/modtypes/autotools.py
index eb8ce67..9e579b3 100644
--- a/jhbuild/modtypes/autotools.py
+++ b/jhbuild/modtypes/autotools.py
@@ -369,7 +369,10 @@ def collect_args(instance, node, argtype):
 def parse_autotools(node, config, uri, repositories, default_repo):
     instance = AutogenModule.parse_from_xml(node, config, uri, repositories, default_repo)
 
-    instance.dependencies += ['automake', 'libtool', instance.get_makecmd(config)]
+    # Allow base packages such as autoconf/automake/libtool/etc. to skip the
+    # standard dependencies to prevent dependency cycles.
+    if node.getAttribute('bootstrap') != 'true':
+        instance.dependencies += ['automake', 'libtool', instance.get_makecmd(config)]
 
     instance.autogenargs = collect_args (instance, node, 'autogenargs')
     instance.makeargs = collect_args (instance, node, 'makeargs')
diff --git a/modulesets/bootstrap.modules b/modulesets/bootstrap.modules
index 90628e3..66f424e 100644
--- a/modulesets/bootstrap.modules
+++ b/modulesets/bootstrap.modules
@@ -43,14 +43,14 @@
             hash="sha256:cdf29d1a4c0f7d5b0c181bc8818fe6816d3b6ad4fcc8f6c0e5540a228c3f81ed"/>
   </autotools>
 
-  <autotools id="m4" autogen-sh="configure">
+  <autotools id="m4" autogen-sh="configure" bootstrap="true">
     <branch repo="ftp.gnu.org"
            module="m4/m4-1.4.17.tar.bz2" version="1.4.17"
            size="1438525"
             hash="sha256:8e4e1f963932136ed45dcd5afb0c6e237e96a6fcdcd2a2fa6755040859500d70" />
   </autotools>
 
-  <autotools id="autoconf" autogen-sh="configure">
+  <autotools id="autoconf" autogen-sh="configure" bootstrap="true">
     <branch repo="ftp.gnu.org"
             module="autoconf/autoconf-2.69.tar.gz" version="2.69"
             size="1927468"
@@ -60,7 +60,7 @@
     </dependencies>
   </autotools>
 
-  <autotools id="libtool" autogen-sh="configure">
+  <autotools id="libtool" autogen-sh="configure" bootstrap="true">
     <branch repo="ftp.gnu.org"
             module="libtool/libtool-2.4.2.tar.gz" version="2.4.2"
             size="2632347" md5sum="d2f3b7d4627e69e13514a40e72a24d50"
@@ -69,17 +69,23 @@
     </branch>
   </autotools>
 
-  <autotools id="automake-1.10" autogen-sh="configure">
+  <autotools id="automake-1.10" autogen-sh="configure" bootstrap="true">
     <branch repo="ftp.gnu.org"
             module="automake/automake-1.10.3.tar.bz2" version="1.10.3"
             size="957505" md5sum="b8e67fb458da396bc35555af7ef2b49f" />
+    <dependencies>
+      <dep package="autoconf"/>
+    </dependencies>
   </autotools>
 
-  <autotools id="automake" autogen-sh="configure">
+  <autotools id="automake" autogen-sh="configure" bootstrap="true">
     <branch repo="ftp.gnu.org"
             module="automake/automake-1.14.1.tar.gz" version="1.14.1"
             hash="sha256:814c2333f350ce00034a1fe718e0e4239998ceea7b0aff67e9fd273ed6dfc23b"
             size="2240681"/>
+    <dependencies>
+      <dep package="autoconf"/>
+    </dependencies>
   </autotools>
 
   <autotools id="pkg-config" autogen-sh="configure" autogenargs="--with-internal-glib">
diff --git a/modulesets/moduleset.dtd b/modulesets/moduleset.dtd
index a85c9b5..88d5d0a 100644
--- a/modulesets/moduleset.dtd
+++ b/modulesets/moduleset.dtd
@@ -60,6 +60,7 @@
        makeinstallargs CDATA   #IMPLIED
        autogen-sh      CDATA   #IMPLIED
        makefile        CDATA   #IMPLIED
+       bootstrap       CDATA   #IMPLIED
        skip-autogen    (true|false|never) "false"
        uninstall-before-install (true|false) "false"
        supports-non-srcdir-builds (yes|no) "yes"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]