diff options
author | joerg <joerg@pkgsrc.org> | 2018-04-01 20:26:25 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2018-04-01 20:26:25 +0000 |
commit | 0a9a983822fbb2c8432144d6a88ad6dbe2ab8b17 (patch) | |
tree | 7e713e4bee9d91e2ca6a214f38fa6c11b5b28dfa | |
parent | e7e2e4c9954bbe6aee0189ecd89c7909501c0088 (diff) | |
download | pkgsrc-0a9a983822fbb2c8432144d6a88ad6dbe2ab8b17.tar.gz |
Don't print characters that can't be converted to UTF-8. Chances are,
they won't make it to stdout as well and break the tool, especially with
Python 2.7. Bump revision of glib2-tools.
-rw-r--r-- | devel/glib2-tools/Makefile | 3 | ||||
-rw-r--r-- | devel/glib2/distinfo | 4 | ||||
-rw-r--r-- | devel/glib2/patches/patch-gobject_glib-mkenums.in | 17 |
3 files changed, 19 insertions, 5 deletions
diff --git a/devel/glib2-tools/Makefile b/devel/glib2-tools/Makefile index fa77ebb9d9c..b3a6a31c742 100644 --- a/devel/glib2-tools/Makefile +++ b/devel/glib2-tools/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.3 2017/11/07 15:53:11 prlw1 Exp $ +# $NetBSD: Makefile,v 1.4 2018/04/01 20:26:25 joerg Exp $ .include "../../devel/glib2/Makefile.common" PKGNAME:= ${PKGNAME:S/glib2/glib2-tools/} +PKGREVISION= 1 CATEGORIES= devel gnome COMMENT= GLib2/gobject python-dependent tools diff --git a/devel/glib2/distinfo b/devel/glib2/distinfo index 689d6bacbf2..4367931b509 100644 --- a/devel/glib2/distinfo +++ b/devel/glib2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.228 2018/01/28 16:51:50 wiz Exp $ +$NetBSD: distinfo,v 1.229 2018/04/01 20:26:25 joerg Exp $ SHA1 (glib-2.54.3.tar.xz) = 12d7466550156ac8a765f603b0df7604cdf34cfd RMD160 (glib-2.54.3.tar.xz) = 7439dbf9d661352e7f2c1beae84b76e401798675 @@ -35,4 +35,4 @@ SHA1 (patch-glib_gtimezone.c) = d9686da52f171a073d80cfd9f80aa490088a00a3 SHA1 (patch-gobject_Makefile.am) = 6eed6b57f5ff0aa0dfb623110b23a3ff78aa4e75 SHA1 (patch-gobject_Makefile.in) = a4768ff7b0607a8a4dfbb2cff087a987b451fd18 SHA1 (patch-gobject_glib-genmarshal.in) = f21ca416d4eb4ad5a8ce3ffa053f8bcd2be8953a -SHA1 (patch-gobject_glib-mkenums.in) = 22676989e47dfd13583d89469810af6ce7d01ab7 +SHA1 (patch-gobject_glib-mkenums.in) = 651713a9c1fd83aea5060f996b58b35fbe3a43c7 diff --git a/devel/glib2/patches/patch-gobject_glib-mkenums.in b/devel/glib2/patches/patch-gobject_glib-mkenums.in index 31dd1075ff3..f9ed3e4f26d 100644 --- a/devel/glib2/patches/patch-gobject_glib-mkenums.in +++ b/devel/glib2/patches/patch-gobject_glib-mkenums.in @@ -1,9 +1,10 @@ -$NetBSD: patch-gobject_glib-mkenums.in,v 1.3 2018/01/28 16:51:51 wiz Exp $ +$NetBSD: patch-gobject_glib-mkenums.in,v 1.4 2018/04/01 20:26:25 joerg Exp $ - Revert 4395a897 Use env to run the Python-based tools https://bugzilla.gnome.org/show_bug.cgi?id=788527 +- Do not print failing characters that might not be ASCII ---- gobject/glib-mkenums.in.orig 2017-10-21 08:20:09.664007702 +0000 +--- gobject/glib-mkenums.in.orig 2018-01-08 20:00:49.000000000 +0000 +++ gobject/glib-mkenums.in @@ -1,4 +1,4 @@ -#!/usr/bin/env @PYTHON@ @@ -11,3 +12,15 @@ $NetBSD: patch-gobject_glib-mkenums.in,v 1.3 2018/01/28 16:51:51 wiz Exp $ # If the code below looks horrible and unpythonic, do not panic. # +@@ -88,9 +88,8 @@ else: + # https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20 + def replace_and_warn(err): + # 7 characters of context either side of the offending character +- print_warning('UnicodeWarning: {} at {} ({})'.format( +- err.reason, err.start, +- err.object[err.start - 7:err.end + 7])) ++ print_warning('UnicodeWarning: {} at {}'.format( ++ err.reason, err.start)) + return ('?', err.end) + + codecs.register_error('replace_and_warn', replace_and_warn) |