Title: [128362] trunk/Tools
Revision
128362
Author
dpra...@chromium.org
Date
2012-09-12 14:37:35 -0700 (Wed, 12 Sep 2012)

Log Message

webkitdirs: fix uname version handling for cygwin
https://bugs.webkit.org/show_bug.cgi?id=96436

Reviewed by Jon Honeycutt.

Newer versions of cygwin embed an additional version string
inside parentheses, so you get "1.7.16(0.249/5/3)" instead of "1.7.16".
Update the code to handle that.

* Scripts/webkitdirs.pm:
(setupAppleWinEnv):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (128361 => 128362)


--- trunk/Tools/ChangeLog	2012-09-12 21:36:48 UTC (rev 128361)
+++ trunk/Tools/ChangeLog	2012-09-12 21:37:35 UTC (rev 128362)
@@ -1,3 +1,17 @@
+2012-09-12  Dirk Pranke  <dpra...@chromium.org>
+
+        webkitdirs: fix uname version handling for cygwin
+        https://bugs.webkit.org/show_bug.cgi?id=96436
+
+        Reviewed by Jon Honeycutt.
+
+        Newer versions of cygwin embed an additional version string
+        inside parentheses, so you get "1.7.16(0.249/5/3)" instead of "1.7.16".
+        Update the code to handle that.
+
+        * Scripts/webkitdirs.pm:
+        (setupAppleWinEnv):
+
 2012-09-12  Christophe Dumez  <christophe.du...@intel.com>
 
         Regression(r128338): Broke Windows build

Modified: trunk/Tools/Scripts/webkitdirs.pm (128361 => 128362)


--- trunk/Tools/Scripts/webkitdirs.pm	2012-09-12 21:36:48 UTC (rev 128361)
+++ trunk/Tools/Scripts/webkitdirs.pm	2012-09-12 21:37:35 UTC (rev 128362)
@@ -1600,9 +1600,9 @@
 
         # FIXME: We should remove this explicit version check for cygwin once we stop supporting Cygwin 1.7.9 or older versions. 
         # https://bugs.webkit.org/show_bug.cgi?id=85791
-        my $currentCygwinVersion = version->parse(`uname -r`);
-        my $firstCygwinVersionWithoutTTYSupport = version->parse("1.7.10");
-        if ($currentCygwinVersion < $firstCygwinVersionWithoutTTYSupport) {
+        my $uname_version = (POSIX::uname())[2];
+        $uname_version =~ s/\(.*\)//;  # Remove the trailing cygwin version, if any.
+        if (version->parse($uname_version) < version->parse("1.7.10")) {
             # Setting the environment variable 'CYGWIN' to 'tty' makes cygwin enable extra support (i.e., termios)
             # for UNIX-like ttys in the Windows console
             $variablesToSet{CYGWIN} = "tty" unless $ENV{CYGWIN};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to