wok-next view zonecheck/stuff/patches/20locale-rb.patch @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents
children
line source
1 #!/bin/sh -e
2 ## by Sebastien Delafond <sdelafond@gmx.net>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Fixes locale handling in case there is a trailing @\w+ at the
6 ## DP: end of the locale name (like in fr_FR@euro)
8 if [ $# -lt 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11 fi
13 [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14 patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
16 case "$1" in
17 -patch) patch $patch_opts -p1 < $0;;
18 -unpatch) patch $patch_opts -p1 -R < $0;;
19 *)
20 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
21 exit 1;;
22 esac
24 exit 0
26 Index: zonecheck-3.0.0/zc/locale.rb
27 ===================================================================
28 --- zonecheck-3.0.0.orig/zc/locale.rb 2010-06-07 10:51:25.000000000 +0200
29 +++ zonecheck-3.0.0/zc/locale.rb 2010-06-24 11:06:43.000000000 +0200
30 @@ -32,7 +32,7 @@
31 #
32 module ZoneCheck
33 class Locale
34 - LANGRegex = /^(\w+?)(?:_(\w+))?(?:\.([\w\-]+))?$/
35 + LANGRegex = /^(\w+?)(?:_(\w+))?(?:\.([\w\-]+))?(?:@\w+)?$/
37 #
38 # Normalize lang