[jhbuild] Use configure if autogen-sh is not found, and on tarballs



commit ff2211e6ef8287a1f6c5f38b9da4fe10534e79ed
Author: Frédéric Péters <fpeters 0d be>
Date:   Wed Sep 15 15:24:36 2010 +0200

    Use configure if autogen-sh is not found, and on tarballs

 jhbuild/modtypes/autotools.py |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/jhbuild/modtypes/autotools.py b/jhbuild/modtypes/autotools.py
index bb490f1..4cbf89a 100644
--- a/jhbuild/modtypes/autotools.py
+++ b/jhbuild/modtypes/autotools.py
@@ -110,10 +110,9 @@ class AutogenModule(Package, DownloadableModule):
         buildscript.set_action(_('Configuring'), self)
 
         srcdir = self.get_srcdir(buildscript)
-        if self.autogen_sh == 'autogen.sh':
+        if not os.path.exists(os.path.join(srcdir, self.autogen_sh)):
             # if there is no autogen.sh, automatically fallback to configure
-            if not os.path.exists(os.path.join(srcdir, 'autogen.sh')) and \
-                    os.path.exists(os.path.join(srcdir, 'configure')):
+            if os.path.exists(os.path.join(srcdir, 'configure')):
                 self.autogen_sh = 'configure'
 
         try:
@@ -322,7 +321,7 @@ def parse_autotools(node, config, uri, repositories, default_repo):
     makeargs = ''
     makeinstallargs = ''
     supports_non_srcdir_builds = True
-    autogen_sh = 'autogen.sh'
+    autogen_sh = None
     skip_autogen = False
     check_target = True
     makefile = 'Makefile'
@@ -370,6 +369,15 @@ def parse_autotools(node, config, uri, repositories, default_repo):
     dependencies, after, suggests = get_dependencies(node)
     branch = get_branch(node, repositories, default_repo, config)
 
+    from jhbuild.versioncontrol.tarball import TarballBranch
+    if isinstance(branch, TarballBranch):
+        # in tarballs, force autogen-sh to be configure, unless autogen-sh is
+        # already set
+        if autogen_sh is None:
+            autogen_sh = 'configure'
+    elif not autogen_sh:
+        autogen_sh = 'autogen.sh'
+
     return AutogenModule(id, branch, autogenargs, makeargs,
                          makeinstallargs=makeinstallargs,
                          dependencies=dependencies,



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