summaryrefslogtreecommitdiff
path: root/extra/libwebkit/replace-switch-with-given-when.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/libwebkit/replace-switch-with-given-when.patch')
-rw-r--r--extra/libwebkit/replace-switch-with-given-when.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/extra/libwebkit/replace-switch-with-given-when.patch b/extra/libwebkit/replace-switch-with-given-when.patch
new file mode 100644
index 000000000..4e64610bb
--- /dev/null
+++ b/extra/libwebkit/replace-switch-with-given-when.patch
@@ -0,0 +1,45 @@
+diff -upr webkit-1.4.0.orig/Source/WebCore/make-hash-tools.pl webkit-1.4.0/Source/WebCore/make-hash-tools.pl
+--- webkit-1.4.0.orig/Source/WebCore/make-hash-tools.pl 2011-04-25 22:27:15.000000000 +0300
++++ webkit-1.4.0/Source/WebCore/make-hash-tools.pl 2011-06-02 00:41:26.000000000 +0300
+@@ -20,7 +20,7 @@
+ # Boston, MA 02110-1301, USA.
+
+ use strict;
+-use Switch;
++use feature 'switch';
+ use File::Basename;
+
+ my $outdir = $ARGV[0];
+@@ -28,9 +28,9 @@ shift;
+ my $option = basename($ARGV[0],".gperf");
+
+
+-switch ($option) {
++given ($option) {
+
+-case "DocTypeStrings" {
++when ("DocTypeStrings") {
+
+ my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp";
+ my $docTypeStringsGperf = $ARGV[0];
+@@ -38,9 +38,9 @@ case "DocTypeStrings" {
+
+ system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?";
+
+-} # case "DocTypeStrings"
++} # when ("DocTypeStrings")
+
+-case "ColorData" {
++when ("ColorData") {
+
+ my $colorDataGenerated = "$outdir/ColorData.cpp";
+ my $colorDataGperf = $ARGV[0];
+@@ -48,6 +48,6 @@ case "ColorData" {
+
+ system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?";
+
+-} # case "ColorData"
++} # when ("ColorData")
+
+-} # switch ($option)
++} # given ($option)