From owner-svn-ports-head@freebsd.org Fri Mar 8 06:46:29 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F65A15343B6; Fri, 8 Mar 2019 06:46:29 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7C738DC25; Fri, 8 Mar 2019 06:46:28 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AC9A52785B; Fri, 8 Mar 2019 06:46:28 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x286kSxl075544; Fri, 8 Mar 2019 06:46:28 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x286kSdj075542; Fri, 8 Mar 2019 06:46:28 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201903080646.x286kSdj075542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Fri, 8 Mar 2019 06:46:28 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r495018 - in head/textproc/itstool: . files X-SVN-Group: ports-head X-SVN-Commit-Author: antoine X-SVN-Commit-Paths: in head/textproc/itstool: . files X-SVN-Commit-Revision: 495018 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C7C738DC25 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 06:46:29 -0000 Author: antoine Date: Fri Mar 8 06:46:27 2019 New Revision: 495018 URL: https://svnweb.freebsd.org/changeset/ports/495018 Log: Workaround https://github.com/itstool/itstool/issues/25 Reported by: pkg-fallout Obtained from: Fedora Added: head/textproc/itstool/files/ head/textproc/itstool/files/patch-itstool.in (contents, props changed) Modified: head/textproc/itstool/Makefile Modified: head/textproc/itstool/Makefile ============================================================================== --- head/textproc/itstool/Makefile Fri Mar 8 04:37:34 2019 (r495017) +++ head/textproc/itstool/Makefile Fri Mar 8 06:46:27 2019 (r495018) @@ -4,7 +4,7 @@ PORTNAME= itstool PORTVERSION= 2.0.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= textproc MASTER_SITES= http://files.itstool.org/itstool/ Added: head/textproc/itstool/files/patch-itstool.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/itstool/files/patch-itstool.in Fri Mar 8 06:46:27 2019 (r495018) @@ -0,0 +1,52 @@ +# Workaround https://github.com/itstool/itstool/issues/25 +# Obtained from Fedora + +--- itstool.in.orig 2018-08-21 15:27:24 UTC ++++ itstool.in +@@ -44,9 +44,22 @@ if PY3: + else: + return str(s) + ustr_type = str ++ def pr_str(s): ++ """Return a string that can be safely print()ed""" ++ # Since print works on both bytes and unicode, just return the argument ++ return s + else: + string_types = basestring, + ustr = ustr_type = unicode ++ def pr_str(s): ++ """Return a string that can be safely print()ed""" ++ if isinstance(s, str): ++ # Since print works on str, just return the argument ++ return s ++ else: ++ # print may not work on unicode if the output encoding cannot be ++ # detected, so just encode with UTF-8 ++ return unicode.encode(s, 'utf-8') + + NS_ITS = 'http://www.w3.org/2005/11/its' + NS_ITST = 'http://itstool.org/extensions/' +@@ -1060,9 +1073,9 @@ class Document (object): + if strict: + raise + else: +- sys.stderr.write('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( ++ sys.stderr.write(pr_str('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( + (lang + ' ') if lang is not None else '', +- msgstr.encode('utf-8'))) ++ msgstr))) + self._xml_err = '' + return node + def scan_node(node): +@@ -1087,9 +1100,9 @@ class Document (object): + if strict: + raise + else: +- sys.stderr.write('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( ++ sys.stderr.write(pr_str('Warning: Could not merge %stranslation for msgid:\n%s\n' % ( + (lang + ' ') if lang is not None else '', +- msgstr.encode('utf-8'))) ++ msgstr))) + self._xml_err = '' + ctxt.doc().freeDoc() + return node