[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
eric at webkit.org
eric at webkit.org
Fri Feb 26 22:18:23 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit c610c3635cb48039675b75fb2db2143fb97b5330
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Feb 12 03:04:37 2010 +0000
2010-02-11 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
webkitdirs.pm has a crazy amount of duplicated feature detection code
https://bugs.webkit.org/show_bug.cgi?id=34869
In editing run-webkit-tests I found these tests were
skipped on all platforms. Removing them since no one is running them.
If we ever need them we can dig them out of SVN history.
* fast/wcss/marquee-dir.xhtml: Removed.
* fast/wcss/marquee-loop.xhtml: Removed.
* fast/wcss/marquee-speed.xhtml: Removed.
* fast/wcss/marquee-style.xhtml: Removed.
2010-02-11 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
webkitdirs.pm has a crazy amount of duplicated feature detection code
https://bugs.webkit.org/show_bug.cgi?id=34869
* Scripts/build-webkit: Use the new hotness.
* Scripts/run-webkit-tests: ditto
* Scripts/webkitdirs.pm: Remove a bunch of bad duplicate code.
* Scripts/webkitperl/features.pm: Added.
- Simplified the 10 methods in webkitdirs.pm into 2 exported methods in this new file.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c8d89b6..45bd863 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-11 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Adam Barth.
+
+ webkitdirs.pm has a crazy amount of duplicated feature detection code
+ https://bugs.webkit.org/show_bug.cgi?id=34869
+
+ In editing run-webkit-tests I found these tests were
+ skipped on all platforms. Removing them since no one is running them.
+ If we ever need them we can dig them out of SVN history.
+
+ * fast/wcss/marquee-dir.xhtml: Removed.
+ * fast/wcss/marquee-loop.xhtml: Removed.
+ * fast/wcss/marquee-speed.xhtml: Removed.
+ * fast/wcss/marquee-style.xhtml: Removed.
+
2010-02-11 Kent Tamura <tkent at chromium.org>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/wcss/marquee-dir.xhtml b/LayoutTests/fast/wcss/marquee-dir.xhtml
deleted file mode 100644
index 9bc6060..0000000
--- a/LayoutTests/fast/wcss/marquee-dir.xhtml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.wapforum.org/DTD/xhtml-mobile11.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>WCSS marquee test - dir</title>
-</head>
-
-<body>
--wap-marqee-dir: ltr
-<h1 style="display: -wap-marquee; -wap-marquee-dir: ltr; -wap-marquee-speed: normal;" > H1 with marquee, ltr</h1> <hr/>
--wap-marqee-dir: rtl
-<h1 style="display: -wap-marquee; -wap-marquee-dir: rtl; -wap-marquee-speed: normal;" > H1 with marquee, rtl</h1> <hr/>
-</body>
-</html>
diff --git a/LayoutTests/fast/wcss/marquee-loop.xhtml b/LayoutTests/fast/wcss/marquee-loop.xhtml
deleted file mode 100644
index 02ab2f5..0000000
--- a/LayoutTests/fast/wcss/marquee-loop.xhtml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.wapforum.org/DTD/xhtml-mobile11.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>WCSS marquee test - loop</title>
-</head>
-
-<body>
-Don't specify -wap-marquee-loop
-<h1 style="display: -wap-marquee;" > Test H1 element with marquee, No -wap-marquee-loop</h1><hr/>
--wap-marquee-loop: 0
-<h1 style="display: -wap-marquee; -wap-marquee-loop: 0" > Test H1 element with marquee, -wap-marquee-loop: 0</h1><hr/>
--wap-marquee-loop: 1
-<h1 style="display: -wap-marquee; -wap-marquee-loop: 1" > Test H1 element with marquee, -wap-marquee-loop: 1</h1><hr/>
--wap-marquee-loop: 2
-<h1 style="display: -wap-marquee; -wap-marquee-loop: 2" > Test H1 element with marquee, -wap-marquee-loop: 2</h1><hr/>
--wap-marquee-loop: infinite
-<h1 style="display: -wap-marquee; -wap-marquee-loop: infinite" > Test H1 element with marquee, -wap-marquee-loop: infinite</h1><hr/>
-</body>
-</html>
diff --git a/LayoutTests/fast/wcss/marquee-speed.xhtml b/LayoutTests/fast/wcss/marquee-speed.xhtml
deleted file mode 100644
index 04400da..0000000
--- a/LayoutTests/fast/wcss/marquee-speed.xhtml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.wapforum.org/DTD/xhtml-mobile11.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>WCSS marquee test - speed</title>
-</head>
-
-<body>
--wap-marquee-speed: slow
-<h1 style="display: -wap-marquee; -wap-marquee-speed: slow" > Test H1 element with marquee, slow speed</h1> <hr/>
--wap-marquee-speed: normal
-<h1 style="display: -wap-marquee; -wap-marquee-speed: normal" > Test H1 element with marquee, normal speed</h1> <hr/>
--wap-marquee-speed: fast
-<h1 style="display: -wap-marquee; -wap-marquee-speed: fast" > Test H1 element with marquee, fast speed</h1> <hr/>
-</body>
-</html>
diff --git a/LayoutTests/fast/wcss/marquee-style.xhtml b/LayoutTests/fast/wcss/marquee-style.xhtml
deleted file mode 100644
index 931fe28..0000000
--- a/LayoutTests/fast/wcss/marquee-style.xhtml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN" "http://www.wapforum.org/DTD/xhtml-mobile11.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>WCSS marquee test - style</title>
-</head>
-
-<body>
--wap-marquee-style: slide
-<h1 style="display: -wap-marquee; -wap-marquee-style: slide;" > Test H1 element with marquee, slide style</h1>
-<h1 style="display: -wap-marquee; -wap-marquee-style: slide;" > Test H1 element with marquee, slide style, long text long text long text</h1><hr/>
-
--wap-marquee-style: scroll
-<h1 style="display: -wap-marquee; -wap-marquee-style: scroll;" > Test H1 element with marquee, scroll style</h1>
-<h1 style="display: -wap-marquee; -wap-marquee-style: scroll;" > Test H1 element with marquee, scroll style, long text long text long text</h1><hr/>
-
--wap-marquee-style: alternate; -wap-marquee-loop: 3
-<h1 style="display: -wap-marquee; -wap-marquee-style: alternate; -wap-marquee-loop: 3" > Test H1 element with marquee, alternate style</h1>
-<h1 style="display: -wap-marquee; -wap-marquee-style: alternate; -wap-marquee-loop: 3" > Test H1 element with marquee, alternate style, long text long text long text</h1><hr/>
-</body>
-</html>
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 8deecb3..3701b9f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-11 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Adam Barth.
+
+ webkitdirs.pm has a crazy amount of duplicated feature detection code
+ https://bugs.webkit.org/show_bug.cgi?id=34869
+
+ * Scripts/build-webkit: Use the new hotness.
+ * Scripts/run-webkit-tests: ditto
+ * Scripts/webkitdirs.pm: Remove a bunch of bad duplicate code.
+ * Scripts/webkitperl/features.pm: Added.
+ - Simplified the 10 methods in webkitdirs.pm into 2 exported methods in this new file.
+
2010-02-11 Daniel Bates <dbates at rim.com>
Reviewed by Adam Barth.
diff --git a/WebKitTools/Scripts/build-webkit b/WebKitTools/Scripts/build-webkit
index 2adcc46..2941665 100755
--- a/WebKitTools/Scripts/build-webkit
+++ b/WebKitTools/Scripts/build-webkit
@@ -36,6 +36,7 @@ use FindBin;
use Getopt::Long qw(:config pass_through);
use lib $FindBin::Bin;
use webkitdirs;
+use webkitperl::features;
use POSIX;
sub formatBuildTime($);
@@ -322,7 +323,7 @@ if (isGtk()) {
}
# Force re-link of existing libraries if different than expected
-removeLibraryDependingOnSVG("WebCore", $svgSupport);
+removeLibraryDependingOnFeature("SVG", "WebCore", $svgSupport);
if (isInspectorFrontend()) {
exit exitStatus(copyInspectorFrontendFiles());
diff --git a/WebKitTools/Scripts/run-webkit-tests b/WebKitTools/Scripts/run-webkit-tests
index 56011e6..89d3ecb 100755
--- a/WebKitTools/Scripts/run-webkit-tests
+++ b/WebKitTools/Scripts/run-webkit-tests
@@ -67,6 +67,7 @@ use Time::HiRes qw(time usleep);
use List::Util 'shuffle';
use lib $FindBin::Bin;
+use webkitperl::features;
use webkitperl::httpd;
use webkitdirs;
use VCSUtils;
@@ -420,12 +421,12 @@ my %ignoredDirectories = map { $_ => 1 } qw(platform);
my %ignoredLocalDirectories = map { $_ => 1 } qw(.svn _svn resources script-tests);
my %supportedFileExtensions = map { $_ => 1 } qw(html shtml xml xhtml pl php);
-if (!checkWebCoreMathMLSupport(0)) {
+if (!checkWebCoreFeatureSupport("MathML", 0)) {
$ignoredDirectories{'mathml'} = 1;
}
-# FIXME: We should fix webkitdirs.pm:hasSVG/WMLSupport() to do the correct feature detection for Cygwin.
-if (checkWebCoreSVGSupport(0)) {
+# FIXME: We should fix webkitperl/features.pm:hasFeature() to do the correct feature detection for Cygwin.
+if (checkWebCoreFeatureSupport("SVG", 0)) {
$supportedFileExtensions{'svg'} = 1;
} elsif (isCygwin()) {
$supportedFileExtensions{'svg'} = 1;
@@ -443,20 +444,20 @@ if (!$testMedia) {
$ignoredDirectories{'http/tests/media'} = 1;
}
-if (!checkWebCoreAcceleratedCompositingSupport(0)) {
+if (!checkWebCoreFeatureSupport("Accelerated Compositing", 0)) {
$ignoredDirectories{'compositing'} = 1;
}
-if (!checkWebCore3DRenderingSupport(0)) {
+if (!checkWebCoreFeatureSupport("3D Rendering", 0)) {
$ignoredDirectories{'animations/3d'} = 1;
$ignoredDirectories{'transforms/3d'} = 1;
}
-if (!checkWebCore3DCanvasSupport(0)) {
+if (!checkWebCoreFeatureSupport("3D Canvas", 0)) {
$ignoredDirectories{'fast/canvas/webgl'} = 1;
}
-if (checkWebCoreWMLSupport(0)) {
+if (checkWebCoreFeatureSupport("WML", 0)) {
$supportedFileExtensions{'wml'} = 1;
} else {
$ignoredDirectories{'http/tests/wml'} = 1;
@@ -464,14 +465,10 @@ if (checkWebCoreWMLSupport(0)) {
$ignoredDirectories{'wml'} = 1;
}
-if (!checkWebCoreXHTMLMPSupport(0)) {
+if (!checkWebCoreFeatureSupport("XHTMLMP", 0)) {
$ignoredDirectories{'fast/xhtmlmp'} = 1;
}
-if (!checkWebCoreWCSSSupport(0)) {
- $ignoredDirectories{'fast/wcss'} = 1;
-}
-
processIgnoreTests($ignoreTests, "ignore-tests") if $ignoreTests;
if (!$ignoreSkipped) {
if (!$skippedOnly || @ARGV == 0) {
diff --git a/WebKitTools/Scripts/webkitdirs.pm b/WebKitTools/Scripts/webkitdirs.pm
index 1ee69a3..a788b3d 100644
--- a/WebKitTools/Scripts/webkitdirs.pm
+++ b/WebKitTools/Scripts/webkitdirs.pm
@@ -573,222 +573,17 @@ sub builtDylibPathForName
}
# Check to see that all the frameworks are built.
-sub checkFrameworks
+sub checkFrameworks # FIXME: This is a poor name since only the Mac calls built WebCore a Framework.
{
return if isCygwin();
my @frameworks = ("JavaScriptCore", "WebCore");
- push(@frameworks, "WebKit") if isAppleMacWebKit();
+ push(@frameworks, "WebKit") if isAppleMacWebKit(); # FIXME: This seems wrong, all ports should have a WebKit these days.
for my $framework (@frameworks) {
my $path = builtDylibPathForName($framework);
die "Can't find built framework at \"$path\".\n" unless -e $path;
}
}
-sub libraryContainsSymbol
-{
- my $path = shift;
- my $symbol = shift;
-
- if (isCygwin() or isWindows()) {
- # FIXME: Implement this for Windows.
- return 0;
- }
-
- my $foundSymbol = 0;
- if (-e $path) {
- open NM, "-|", "nm", $path or die;
- while (<NM>) {
- $foundSymbol = 1 if /$symbol/;
- }
- close NM;
- }
- return $foundSymbol;
-}
-
-sub hasMathMLSupport
-{
- my $path = shift;
-
- return libraryContainsSymbol($path, "MathMLElement");
-}
-
-sub checkWebCoreMathMLSupport
-{
- my $required = shift;
- my $framework = "WebCore";
- my $path = builtDylibPathForName($framework);
- my $hasMathML = hasMathMLSupport($path);
- if ($required && !$hasMathML) {
- die "$framework at \"$path\" does not include MathML Support, please run build-webkit --mathml\n";
- }
- return $hasMathML;
-}
-
-sub hasSVGSupport
-{
- my $path = shift;
-
- if (isWx()) {
- return 0;
- }
-
- # We used to look for SVGElement but isSVGElement is a valid symbol in --no-svg builds.
- return libraryContainsSymbol($path, "SVGDefsElement");
-}
-
-sub removeLibraryDependingOnSVG
-{
- my $frameworkName = shift;
- my $shouldHaveSVG = shift;
-
- my $path = builtDylibPathForName($frameworkName);
- return unless -x $path;
-
- my $hasSVG = hasSVGSupport($path);
- system "rm -f $path" if ($shouldHaveSVG xor $hasSVG);
-}
-
-sub checkWebCoreSVGSupport
-{
- my $required = shift;
- my $framework = "WebCore";
- my $path = builtDylibPathForName($framework);
- my $hasSVG = hasSVGSupport($path);
- if ($required && !$hasSVG) {
- die "$framework at \"$path\" does not include SVG Support, please run build-webkit --svg\n";
- }
- return $hasSVG;
-}
-
-sub hasAcceleratedCompositingSupport
-{
- # On platforms other than Mac the Skipped files are used to skip compositing tests
- return 1 if !isAppleMacWebKit();
-
- my $path = shift;
- return libraryContainsSymbol($path, "GraphicsLayer");
-}
-
-sub checkWebCoreAcceleratedCompositingSupport
-{
- my $required = shift;
- my $framework = "WebCore";
- my $path = builtDylibPathForName($framework);
- my $hasAcceleratedCompositing = hasAcceleratedCompositingSupport($path);
- if ($required && !$hasAcceleratedCompositing) {
- die "$framework at \"$path\" does not use accelerated compositing\n";
- }
- return $hasAcceleratedCompositing;
-}
-
-sub has3DRenderingSupport
-{
- # On platforms other than Mac the Skipped files are used to skip 3D tests
- return 1 if !isAppleMacWebKit();
-
- my $path = shift;
- return libraryContainsSymbol($path, "WebCoreHas3DRendering");
-}
-
-sub checkWebCore3DRenderingSupport
-{
- my $required = shift;
- my $framework = "WebCore";
- my $path = builtDylibPathForName($framework);
- my $has3DRendering = has3DRenderingSupport($path);
- if ($required && !$has3DRendering) {
- die "$framework at \"$path\" does not include 3D rendering Support, please run build-webkit --3d-rendering\n";
- }
- return $has3DRendering;
-}
-
-sub has3DCanvasSupport
-{
- return 0 if isQt();
-
- my $path = shift;
- return libraryContainsSymbol($path, "WebGLShader");
-}
-
-sub checkWebCore3DCanvasSupport
-{
- my $required = shift;
- my $framework = "WebCore";
- my $path = builtDylibPathForName($framework);
- my $has3DCanvas = has3DCanvasSupport($path);
- if ($required && !$has3DCanvas) {
- die "$framework at \"$path\" does not include 3D Canvas Support, please run build-webkit --3d-canvas\n";
- }
- return $has3DCanvas;
-}
-
-sub hasWMLSupport
-{
- my $path = shift;
- return libraryContainsSymbol($path, "WMLElement");
-}
-
-sub removeLibraryDependingOnWML
-{
- my $frameworkName = shift;
- my $shouldHaveWML = shift;
-
- my $path = builtDylibPathForName($frameworkName);
- return unless -x $path;
-
- my $hasWML = hasWMLSupport($path);
- system "rm -f $path" if ($shouldHaveWML xor $hasWML);
-}
-
-sub checkWebCoreWMLSupport
-{
- my $required = shift;
- my $framework = "WebCore";
- my $path = builtDylibPathForName($framework);
- my $hasWML = hasWMLSupport($path);
- if ($required && !$hasWML) {
- die "$framework at \"$path\" does not include WML Support, please run build-webkit --wml\n";
- }
- return $hasWML;
-}
-
-sub hasXHTMLMPSupport
-{
- my $path = shift;
- return libraryContainsSymbol($path, "isXHTMLMPDocument");
-}
-
-sub checkWebCoreXHTMLMPSupport
-{
- my $required = shift;
- my $framework = "WebCore";
- my $path = builtDylibPathForName($framework);
- my $hasXHTMLMP = hasXHTMLMPSupport($path);
- if ($required && !$hasXHTMLMP) {
- die "$framework at \"$path\" does not include XHTML MP Support\n";
- }
- return $hasXHTMLMP;
-}
-
-sub hasWCSSSupport
-{
- # FIXME: When WCSS support is landed this should be updated to check for WCSS
- # being enabled in a manner similar to how we check for XHTML MP above.
- return 0;
-}
-
-sub checkWebCoreWCSSSupport
-{
- my $required = shift;
- my $framework = "WebCore";
- my $path = builtDylibPathForName($framework);
- my $hasWCSS = hasWCSSSupport($path);
- if ($required && !$hasWCSS) {
- die "$framework at \"$path\" does not include WCSS Support\n";
- }
- return $hasWCSS;
-}
-
sub isInspectorFrontend()
{
determineIsInspectorFrontend();
diff --git a/WebKitTools/Scripts/webkitperl/features.pm b/WebKitTools/Scripts/webkitperl/features.pm
new file mode 100644
index 0000000..1f88022
--- /dev/null
+++ b/WebKitTools/Scripts/webkitperl/features.pm
@@ -0,0 +1,104 @@
+# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved
+# Copyright (C) 2006 Alexey Proskuryakov (ap at nypop.com)
+# Copyright (C) 2010 Andras Becsi (abecsi at inf.u-szeged.hu), University of Szeged
+#
+# 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.
+
+# Module to share code to detect the existance of features in built binaries.
+
+use strict;
+use warnings;
+
+BEGIN {
+ use Exporter ();
+ our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+ $VERSION = 1.00;
+ @ISA = qw(Exporter);
+ @EXPORT = qw(&checkWebCoreFeatureSupport
+ &removeLibraryDependingOnFeature);
+ %EXPORT_TAGS = ( );
+ @EXPORT_OK = ();
+}
+
+sub libraryContainsSymbol($$)
+{
+ my ($path, $symbol) = @_;
+
+ if (isCygwin() or isWindows()) {
+ # FIXME: Implement this for Windows.
+ return 0;
+ }
+
+ my $foundSymbol = 0;
+ if (-e $path) {
+ open NM, "-|", "nm", $path or die;
+ while (<NM>) {
+ $foundSymbol = 1 if /$symbol/; # FIXME: This should probably check for word boundaries before/after the symbol name.
+ }
+ close NM;
+ }
+ return $foundSymbol;
+}
+
+sub hasFeature($$)
+{
+ my ($featureName, $path) = @_;
+ my %symbolForFeature = (
+ "MathML" => "MathMLElement",
+ "SVG" => "SVGDefsElement", # We used to look for SVGElement but isSVGElement exists (and would match) in --no-svg builds.
+ "Accelerated Compositing" => "GraphicsLayer",
+ "3D Rendering" => "WebCoreHas3DRendering",
+ "3D Canvas" => "WebGLShader",
+ "WML" => "WMLElement",
+ "XHTMLMP" => "isXHTMLMPDocument",
+ );
+ my $symbolName = $symbolForFeature{$featureName};
+ die "Unknown feature: $featureName" unless $symbolName;
+ return libraryContainsSymbol($path, $symbolName);
+}
+
+sub checkWebCoreFeatureSupport($$)
+{
+ my ($feature, $required) = @_;
+ my $libraryName = "WebCore";
+ my $path = builtDylibPathForName($libraryName);
+ my $hasFeature = hasFeature($feature, $path);
+ if ($required && !$hasFeature) {
+ die "$libraryName at \"$path\" does not include $hasFeature support. See build-webkit --help\n";
+ }
+ return $hasFeature;
+}
+
+sub removeLibraryDependingOnFeature($$$)
+{
+ my ($libraryName, $featureName, $shouldHaveFeature) = @_;
+ my $path = builtDylibPathForName($libraryName);
+ return unless -x $path;
+
+ my $hasFeature = hasFeature($featureName, $path);
+ system "rm -f $path" if ($shouldHaveFeature xor $hasFeature);
+}
+
+1;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list