[webkit-dev] Small patch to improve webkit build on windows

forumer at smartmobili.com forumer at smartmobili.com
Sun Sep 9 04:37:47 PDT 2012


Hi,

These last days I am building lots of nightly build and I am a bit 
tired to apply my small patch to allow
to compile on my system(Windows XP, VS2008) so I think it would be 
better if I could share my patches.
THe first problem with your build system is inside webkitdirs.pm :

sub setupAppleWinEnv()
{
     return unless isAppleWinWebKit();

     if (isWindowsNT()) {
         my $restartNeeded = 0;
         my %variablesToSet = ();

         # 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`);
...
}

on a recent cygwin when you enter uname -r you get something like that 
:


Vincent at Vincent-PC ~/tmp/Webkit-Scripts
$ uname -r
1.7.16(0.262/5/3)

As you can see the release version is not a simple version number like 
1.7.8 but a more complex string,
so the version->parse function is lost and throw an exception.
I have modified the script to extract only the first part 1.7.16 and 
ignore the second one (0.262/5/3) and
I have replaced the call to uname -r by the function POSIX::uname.


Could someone review the patch, check it works with your build system 
and commit it ?

Thanks



Index: webkitdirs.pm
===================================================================
--- webkitdirs.pm	(révision 127981)
+++ webkitdirs.pm	(copie de travail)
@@ -1606,7 +1606,8 @@

          # 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 $currentCygwinVersion = version->parse(`uname -r`);
+		my $currentCygwinVersion = ((POSIX::uname())[2] =~ 
/^([0-9]+\.[0-9]+\.[0-9]+)/)[0];
          my $firstCygwinVersionWithoutTTYSupport = 
version->parse("1.7.10");
          if ($currentCygwinVersion < 
$firstCygwinVersionWithoutTTYSupport) {
              # Setting the environment variable 'CYGWIN' to 'tty' makes 
cygwin enable extra support (i.e., termios)







More information about the webkit-dev mailing list