summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2018-02-20 17:44:01 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-24 10:31:47 +0000
commit70a6314269858696cc784d41765409e48bc1f4cf (patch)
tree831b5fc3a2a8e910d6983efc3e3161c3a8b00c1d /meta/recipes-core/glib-2.0
parentd6cd82a5a169b9b3a461193a0a2139ba02912b29 (diff)
downloadpoky-70a6314269858696cc784d41765409e48bc1f4cf.tar.gz
glib-2.0: upgrade to version 2.54.3
2.54.2 -> 2.54.3 Remove upstreamed patch: 1. glib-mkenums-replace-and-warn-decoding.patch (From OE-Core rev: 4ab5c5d8b0691b123857677b01781f4018b7b80b) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glib-2.0')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/glib-mkenums-replace-and-warn-decoding.patch104
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb (renamed from meta/recipes-core/glib-2.0/glib-2.0_2.54.2.bb)5
2 files changed, 2 insertions, 107 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/glib-mkenums-replace-and-warn-decoding.patch b/meta/recipes-core/glib-2.0/glib-2.0/glib-mkenums-replace-and-warn-decoding.patch
deleted file mode 100644
index a5dae7e9f4..0000000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/glib-mkenums-replace-and-warn-decoding.patch
+++ /dev/null
@@ -1,104 +0,0 @@
1From ba043ef4f2c713662f89425aed70dfd78e3955ee Mon Sep 17 00:00:00 2001
2From: Patrick Welche <prlw1@cam.ac.uk>
3Date: Mon, 23 Oct 2017 13:59:58 +0100
4Subject: [PATCH] glib-mkenums: best effort attempt on non-utf8 encoded files.
5
6Some source files aren't valid utf-8 containing for example
7iso8859-1 accented characters in author's names.
8Replace invalid data with a replacement '?' character and print a
9warning to keep things working.
10Based on a patch from Christoph Reiter in
11https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20
12
13Upstream-Status: Submitted [https://bug785113.bugzilla-attachments.gnome.org/attachment.cgi?id=362098]
14
15Author: Patrick Welche <prlw1@cam.ac.uk>
16
17Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
18---
19 gobject/glib-mkenums.in | 41 ++++++++++++++++++++++++++++++-----------
20 1 file changed, 30 insertions(+), 11 deletions(-)
21
22diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
23index 7cc55053c..9790a65a2 100755
24--- a/gobject/glib-mkenums.in
25+++ b/gobject/glib-mkenums.in
26@@ -26,14 +26,6 @@ the GNU General Public License which can be found in the
27 GLib source package. Sources, examples and contact
28 information are available at http://www.gtk.org'''
29
30-# Python 2 defaults to ASCII in case stdout is redirected.
31-# This should make it match Python 3, which uses the locale encoding.
32-if sys.stdout.encoding is None:
33- output_stream = codecs.getwriter(
34- locale.getpreferredencoding())(sys.stdout)
35-else:
36- output_stream = sys.stdout
37-
38 # pylint: disable=too-few-public-methods
39 class Color:
40 '''ANSI Terminal colors'''
41@@ -81,6 +73,31 @@ def write_output(output):
42 global output_stream
43 print(output, file=output_stream)
44
45+
46+# Python 2 defaults to ASCII in case stdout is redirected.
47+# This should make it match Python 3, which uses the locale encoding.
48+if sys.stdout.encoding is None:
49+ output_stream = codecs.getwriter(
50+ locale.getpreferredencoding())(sys.stdout)
51+else:
52+ output_stream = sys.stdout
53+
54+
55+# Some source files aren't utf-8 and the old perl version didn't care.
56+# Replace invalid data with a replacement character to keep things working.
57+# https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20
58+decoding_errors = "replace_and_warn"
59+
60+def replace_and_warn(err):
61+ # 7 characters of context either side of the offending character
62+ print_warning('UnicodeWarning: {} at {} ({})'.format(
63+ err.reason, err.start,
64+ err.object[err.start - 7:err.end + 7]))
65+ return ('?', err.end)
66+
67+codecs.register_error('replace_and_warn', replace_and_warn)
68+
69+
70 # glib-mkenums.py
71 # Information about the current enumeration
72 flags = None # Is enumeration a bitmask?
73@@ -157,7 +174,8 @@ def parse_entries(file, file_name):
74 m = re.match(r'\#include\s*<([^>]*)>', line)
75 if m:
76 newfilename = os.path.join("..", m.group(1))
77- newfile = io.open(newfilename, encoding="utf-8")
78+ newfile = io.open(newfilename, encoding="utf-8",
79+ errors=decoding_errors)
80
81 if not parse_entries(newfile, newfilename):
82 return False
83@@ -253,7 +271,7 @@ def read_template_file(file):
84 }
85 in_ = 'junk'
86
87- ifile = io.open(file, encoding="utf-8")
88+ ifile = io.open(file, encoding="utf-8", errors=decoding_errors)
89 for line in ifile:
90 m = re.match(r'\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\/', line)
91 if m:
92@@ -408,7 +426,8 @@ def process_file(curfilename):
93 firstenum = True
94
95 try:
96- curfile = io.open(curfilename, encoding="utf-8")
97+ curfile = io.open(curfilename, encoding="utf-8",
98+ errors=decoding_errors)
99 except IOError as e:
100 if e.errno == errno.ENOENT:
101 print_warning('No file "{}" found.'.format(curfilename))
102--
1032.14.2
104
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.54.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
index 963f6b471d..faf594569d 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.54.2.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.54.3.bb
@@ -16,10 +16,9 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
16 file://0001-Do-not-ignore-return-value-of-write.patch \ 16 file://0001-Do-not-ignore-return-value-of-write.patch \
17 file://0001-Test-for-pthread_getname_np-before-using-it.patch \ 17 file://0001-Test-for-pthread_getname_np-before-using-it.patch \
18 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \ 18 file://0010-Do-not-hardcode-python-path-into-various-tools.patch \
19 file://glib-mkenums-replace-and-warn-decoding.patch \
20 " 19 "
21 20
22SRC_URI_append_class-native = " file://relocate-modules.patch" 21SRC_URI_append_class-native = " file://relocate-modules.patch"
23 22
24SRC_URI[md5sum] = "50f83e08f080f99b1e2f0ad2b760fb81" 23SRC_URI[md5sum] = "16e886ad677bf07b7d48eb8188bcf759"
25SRC_URI[sha256sum] = "bb89e5c5aad33169a8c7f28b45671c7899c12f74caf707737f784d7102758e6c" 24SRC_URI[sha256sum] = "963fdc6685dc3da8e5381dfb9f15ca4b5709b28be84d9d05a9bb8e446abac0a8"