[jhbuild] autotools: avoid Windows drive (C:) in prefix passed to configure



commit 7eba48c9dabe58ffb9389d822e7188bbe047458d
Author: Marcin Wojdyr <wojdyr gmail com>
Date:   Tue Sep 11 15:05:51 2012 +0100

    autotools: avoid Windows drive (C:) in prefix passed to configure
    
    (and also in --exec-prefix).
    The prefix causes problem in 'make install' when DESTDIR is used
    because DESTDIR and prefix are concateted and the drive is then
    in the middle of the path.

 jhbuild/modtypes/autotools.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/jhbuild/modtypes/autotools.py b/jhbuild/modtypes/autotools.py
index 1d8b7c6..3e9bbff 100644
--- a/jhbuild/modtypes/autotools.py
+++ b/jhbuild/modtypes/autotools.py
@@ -117,7 +117,7 @@ class AutogenModule(MakeModule, DownloadableModule):
         autogenargs = self.autogenargs + ' ' + self.config.module_autogenargs.get(
                 self.name, self.config.autogenargs)
 
-        vars = {'prefix': buildscript.config.prefix,
+        vars = {'prefix': os.path.splitdrive(buildscript.config.prefix)[1],
                 'autogen-sh': self.autogen_sh,
                 'autogenargs': autogenargs}
 
@@ -152,7 +152,7 @@ class AutogenModule(MakeModule, DownloadableModule):
             # (GStreamer weirdness)
             if autogenargs.find('-- ') != -1:
                 p = re.compile('(.*)(--prefix %s )((?:--libdir %s )?)(.*)-- ' %
-                       (buildscript.config.prefix, "'\${exec_prefix}/lib64'"))
+                       (vars['prefix'], "'\${exec_prefix}/lib64'"))
                 cmd = p.sub(r'\1\4-- \2\3', cmd)
 
         # If there is no --exec-prefix in the constructed autogen command, we
@@ -160,7 +160,7 @@ class AutogenModule(MakeModule, DownloadableModule):
         # right now, so the printed command can be copy/pasted afterwards.
         # (GNOME #580272)
         if not '--exec-prefix' in template:
-            cmd = cmd.replace('${exec_prefix}', buildscript.config.prefix)
+            cmd = cmd.replace('${exec_prefix}', vars['prefix'])
         self.configure_cmd = cmd
         return cmd
 



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