[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

ddkilzer at apple.com ddkilzer at apple.com
Thu Oct 29 20:35:31 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit e018ba58ce89b062101896d81612eae47404c508
Author: ddkilzer at apple.com <ddkilzer at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 29 04:01:09 2009 +0000

    2009-09-28  Yaar Schnitman  <yaar at chromium.org>
    
            Reviewed by David Kilzer.
    
            Integrated chromium port building into webkit tools update-webkit and
            build-webkit.
    
            https://bugs.webkit.org/show_bug.cgi?id=29749
    
            * Scripts/build-webkit: When --chromium is specified, will build
              the chromium port (currently only Mac is supported).
            * Scripts/update-webkit: When --chromium is specified, delegates to
              update-webkit-chromium.
            * Scripts/webkitdirs.pm: Added chromium specific defs.
            * Scripts/update-webkit-chromium: Uses gclient and gyp to fetch
              chromium port's dependencies and update its project files.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48853 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index fd6224c..9ace8b2 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2009-09-28  Yaar Schnitman  <yaar at chromium.org>
+
+        Reviewed by David Kilzer.
+
+        Integrated chromium port building into webkit tools update-webkit and
+        build-webkit.
+
+        https://bugs.webkit.org/show_bug.cgi?id=29749
+
+        * Scripts/build-webkit: When --chromium is specified, will build
+          the chromium port (currently only Mac is supported).
+        * Scripts/update-webkit: When --chromium is specified, delegates to
+          update-webkit-chromium.
+        * Scripts/webkitdirs.pm: Added chromium specific defs.
+        * Scripts/update-webkit-chromium: Uses gclient and gyp to fetch
+          chromium port's dependencies and update its project files.
+
 2009-09-28  Fumitoshi Ukai  <ukai at chromium.org>
 
         Unreviewed.
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index f04e040..a43bbce 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w
 
-# Copyright (C) 2005, 2006 Apple Computer, Inc.  All rights reserved.
+# Copyright (C) 2005, 2006 Apple Inc. All rights reserved.
+# Copyright (C) 2009 Google Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -38,6 +39,7 @@ use webkitdirs;
 use POSIX;
 
 sub formatBuildTime($);
+sub writeCongrats();
 
 my $originalWorkingDirectory = getcwd();
 chdirWebKit();
@@ -315,6 +317,13 @@ if (isWx()) {
     push @projects, 'WebKit/wx/bindings/python';
 }
 
+if (isChromium()) {
+    # Chromium doesn't build by project directories.
+    @projects = ();
+    my $result = buildChromium($clean, @options);
+    exit $result if $result;
+}
+
 # Build, and abort if the build fails.
 for my $dir (@projects) {
     chdir $dir or die;
@@ -365,18 +374,7 @@ for my $dir (@projects) {
 exit if $clean;
 
 # Write out congratulations message.
-
-my $launcherPath = launcherPath();
-my $launcherName = launcherName();
-my $endTime = time();
-my $buildTime = formatBuildTime($endTime - $startTime);
-
-print "\n";
-print "===========================================================\n";
-print " WebKit is now built ($buildTime). \n";
-print " To run $launcherName with this newly-built code, use the\n";
-print " \"$launcherPath\" script.\n";
-print "===========================================================\n";
+writeCongrats();
 
 exit 0;
 
@@ -393,3 +391,20 @@ sub formatBuildTime($)
     }
     return sprintf("%02dm:%02ds", $buildMins, $buildSecs);
 }
+
+sub writeCongrats()
+{
+    my $launcherPath = launcherPath();
+    my $launcherName = launcherName();
+    my $endTime = time();
+    my $buildTime = formatBuildTime($endTime - @_);
+
+    print "\n";
+    print "===========================================================\n";
+    print " WebKit is now built ($buildTime). \n";
+    if (!isChromium()) {
+        print " To run $launcherName with this newly-built code, use the\n";
+        print " \"$launcherPath\" script.\n";
+    }
+    print "===========================================================\n";
+}
diff --git a/WebKitTools/Scripts/update-webkit b/WebKitTools/Scripts/update-webkit
index d8cb6b6..8f2d6b1 100755
--- a/WebKitTools/Scripts/update-webkit
+++ b/WebKitTools/Scripts/update-webkit
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w
 
 # Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2009 Google Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -44,6 +45,8 @@ sub normalizePath($);
 my $quiet = '';
 my $showHelp;
 
+determineIsChromium();
+
 my $getOptionsResult = GetOptions(
     'h|help'  => \$showHelp,
     'q|quiet' => \$quiet,
@@ -52,6 +55,7 @@ my $getOptionsResult = GetOptions(
 if (!$getOptionsResult || $showHelp) {
     print STDERR <<__END__;
 Usage: @{[ basename($0) ]} [options]
+  --chromium  also update dependencies of the chromium port
   -h|--help   show the help message
   -q|--quiet  pass -q to svn update for quiet updates
 __END__
@@ -72,6 +76,8 @@ if (-d "../Internal") {
     chdir("../Internal");
     print "Updating Internal\n" unless $quiet;
     runSvnUpdate();
+} elsif (isChromium()) {
+    system("perl", "WebKitTools/Scripts/update-webkit-chromium") == 0 or die;
 } elsif (isAppleWinWebKit()) {
     system("perl", "WebKitTools/Scripts/update-webkit-auxiliary-libs") == 0 or die;
 }
diff --git a/WebKitTools/Scripts/update-webkit-chromium b/WebKitTools/Scripts/update-webkit-chromium
new file mode 100644
index 0000000..cfd413f
--- /dev/null
+++ b/WebKitTools/Scripts/update-webkit-chromium
@@ -0,0 +1,54 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer. 
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution. 
+# 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+#     its contributors may be used to endorse or promote products derived
+#     from this software without specific prior written permission. 
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Update script for the WebKit Chromium Port.
+
+# Check if gclient is installed.
+if (not `gclient --version`) {
+    print STDERR "gclient is required for updating chromium dependencies.\n";
+    print STDERR "Install depot_tools and add gclient to the environment\n";
+    print STDERR "path. For more information, refer to:\n";
+    print STDERR "http://dev.chromium.org/developers/how-tos/install-gclient\n";
+    die;
+}
+
+# If .gclient configuration file doesn't exist, create it.
+chdir("WebKit/chromium") or die $!;
+if (! -e ".gclient") {
+    print "Configuring gclient...\n";
+    my $result = exec("gclient", 
+                        "config", 
+                        "--spec=solutions=[{'name':'./','url':None}]");
+    if (!$result) {
+        die "Error while configuring gclient for chromium port\n";
+    }
+}
+
+# Execute gclient sync.
+print "Updating chromium port dependencies using gclient...\n";
+exec("gclient", "sync") == 0 or die;
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index d3b9e00..6fded1a 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -1,4 +1,5 @@
 # Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+# Copyright (C) 2009 Google Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -995,7 +996,7 @@ sub checkRequiredSystemConfig
             print "http://developer.apple.com/tools/xcode\n";
             print "*************************************************************\n";
         }
-    } elsif (isGtk() or isQt() or isWx()) {
+    } elsif (isGtk() or isQt() or isWx() or isChromium()) {
         my @cmds = qw(flex bison gperf);
         my @missing = ();
         foreach my $cmd (@cmds) {
@@ -1356,6 +1357,28 @@ sub buildGtkProject($$@)
     return buildAutotoolsProject($clean, @buildArgs);
 }
 
+sub buildChromium($@)
+{
+    my ($clean, @options) = @_;
+
+    my $result = 1;
+    if (isDarwin()) {
+        # Mac build - builds the root xcode project.
+        $result = buildXCodeProject("WebKit/chromium/webkit", $clean, (@options));
+    } elsif (isCygwin()) {
+        # Windows build
+        # FIXME support windows.
+        print STDERR "Windows build is not supported. Yet.";
+    } elsif (isLinux()) {
+        # Linux build
+        # FIXME support linux.
+        print STDERR "Linux build is not supported. Yet.";
+    } else {
+        print STDERR "This platform is not supported by chromium.";
+    }
+    return $result;
+}
+
 sub setPathForRunningWebKitApp
 {
     my ($env) = @_;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list