void-packages/srcpkgs/webkit-gtk3/patches/replace-switch-with-given-w...

46 lines
1.3 KiB
Diff
Raw Normal View History

2011-06-08 07:52:07 +02:00
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)