[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:35:40 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 94b15c67b4c373b454b534f317210406b93bce68
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 21 02:07:02 2010 +0000

    2010-09-20  Leandro Pereira  <leandro at profusion.mobi>
    
            Reviewed by Darin Adler.
    
            build-webkit: Add support for CMake build system
            https://bugs.webkit.org/show_bug.cgi?id=44979
    
            * Scripts/build-webkit: Add "--efl" command-line option to build the
            EFL port of WebKit.
            * Scripts/webkitdirs.pm: Define buildCMakeProject() and
            buildEflCMakeProject() subroutines.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67911 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index eace217..946f7fe 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-20  Leandro Pereira  <leandro at profusion.mobi>
+
+        Reviewed by Darin Adler.
+
+        build-webkit: Add support for CMake build system
+        https://bugs.webkit.org/show_bug.cgi?id=44979
+
+        * Scripts/build-webkit: Add "--efl" command-line option to build the
+        EFL port of WebKit.
+        * Scripts/webkitdirs.pm: Define buildCMakeProject() and
+        buildEflCMakeProject() subroutines.
+
 2010-09-20  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Ojan Vafai.
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index cd43499..bc1e8ad 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -106,7 +106,7 @@ my @features = (
       define => "ENABLE_EVENTSOURCE", default => 1, value => \$eventsourceSupport },
 
     { option => "filters", desc => "Toggle Filters support",
-      define => "ENABLE_FILTERS", default => (isAppleWebKit() || isGtk() || isQt()), value => \$filtersSupport },
+      define => "ENABLE_FILTERS", default => (isAppleWebKit() || isGtk() || isQt() || isEfl()), value => \$filtersSupport },
 
     { option => "geolocation", desc => "Toggle Geolocation support",
       define => "ENABLE_GEOLOCATION", default => (isAppleWebKit() || isGtk()), value => \$geolocationSupport },
@@ -245,13 +245,14 @@ Usage: $programName [options] [options to pass to build system]
   --chromium                        Build the Chromium port on Mac/Win/Linux
   --gtk                             Build the GTK+ port
   --qt                              Build the Qt port
+  --efl                             Build the EFL port
   --inspector-frontend              Copy changes to the inspector front-end files to the build directory
 
   --install-headers=<path>          Set installation path for the headers (Qt only)
   --install-libs=<path>             Set installation path for the libraries (Qt only)
   --v8                              Use V8 as JavaScript engine (Qt only)
 
-  --prefix=<path>                   Set installation prefix to the given path (Gtk only)
+  --prefix=<path>                   Set installation prefix to the given path (Gtk/Efl only)
   --makeargs=<arguments>            Optional Makefile flags
 
   --minimal                         No optional features, unless explicitly enabled.
@@ -428,6 +429,22 @@ if (isChromium()) {
     exit exitStatus($result) if exitStatus($result);
 }
 
+if (isEfl()) {
+    @options = ();
+    @projects = ();
+    foreach (@features) {
+        my $featureName = $_->{define};
+        if ($featureName) {
+            my $featureEnabled = ${$_->{value}} ? "ON" : "OFF";
+            push @options, "-D$featureName=$featureEnabled";
+        }
+    }
+    push @options, "--makeargs=" . $makeArgs if defined($makeArgs);
+    push @options, "--prefix=" . $prefixPath if defined($prefixPath);
+    my $result = buildCMakeEflProject($clean, @options);
+    exit exitStatus($result) if exitStatus($result);
+}
+
 # Build, and abort if the build fails.
 for my $dir (@projects) {
     chdir $dir or die;
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 2980750..40a1633 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -1408,6 +1408,72 @@ sub buildAutotoolsProject($@)
     return $result;
 }
 
+sub buildCMakeProject($@)
+{
+    my ($port, $clean, @buildParams) = @_;
+    my $dir = File::Spec->canonpath(baseProductDir());
+    my $config = configuration();
+    my $result;
+    my $makeArgs = "";
+    my @buildArgs;
+    
+    $makeArgs .= " -j" . numberOfCPUs() if ($makeArgs !~ m/-j\s*\d+/);
+
+    if ($clean) {
+        print "Cleaning the build directory '$dir'\n";
+        $dir = File::Spec->catfile($dir, $config);
+        File::Path::remove_tree($dir, {keep_root => 1});
+        $result = 0;
+    } else {
+        my $cmakebin = "cmake";
+        my $make = "make";
+
+        push @buildArgs, "-DPORT=$port";
+
+        for my $i (0 .. $#buildParams) {
+            my $opt = $buildParams[$i];
+            if ($opt =~ /^--makeargs=(.*)/i ) {
+                $makeArgs = $1;
+            } elsif ($opt =~ /^--prefix=(.*)/i ) {
+                push @buildArgs, "-DCMAKE_INSTALL_PREFIX=$1";
+            } else {
+                push @buildArgs, $opt;
+            }
+        }
+
+        if ($config =~ m/debug/i) {
+            push @buildArgs, "-DCMAKE_BUILD_TYPE=Debug";
+        } elsif ($config =~ m/release/i) {
+            push @buildArgs, "-DCMAKE_BUILD_TYPE=Release";
+        }
+
+        push @buildArgs, sourceDir();
+
+        $dir = File::Spec->catfile($dir, $config);
+        File::Path::mkpath($dir);
+        chdir $dir or die "Failed to cd into " . $dir . "\n";
+        
+        print "Calling '$cmakebin @buildArgs' in " . $dir . "\n\n";
+        my $result = system "$cmakebin @buildArgs";
+        if ($result ne 0) {
+            die "Failed while running $cmakebin to generate makefiles!\n";
+        }
+
+        print "Calling '$make $makeArgs' in " . $dir . "\n\n";
+        $result = system "$make $makeArgs";
+
+        chdir ".." or die;
+    }
+
+    return $result; 
+}
+
+sub buildCMakeEflProject($@)
+{
+    my ($clean, @buildArgs) = @_;
+    return buildCMakeProject("Efl", $clean, @buildArgs);
+}
+
 sub buildQMakeProject($@)
 {
     my ($clean, @buildParams) = @_;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list