From owner-svn-ports-all@freebsd.org Fri Mar 8 06:47:54 2019 Return-Path: Delivered-To: svn-ports-all@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 C723815343F0; Fri, 8 Mar 2019 06:47:54 +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 686948DD0D; Fri, 8 Mar 2019 06:47:54 +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 5BB212785C; Fri, 8 Mar 2019 06:47:54 +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 x286ls3o075714; Fri, 8 Mar 2019 06:47:54 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x286lsJL075712; Fri, 8 Mar 2019 06:47:54 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201903080647.x286lsJL075712@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:47:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r495019 - in head/textproc: libxml2/files py-libxml2 X-SVN-Group: ports-head X-SVN-Commit-Author: antoine X-SVN-Commit-Paths: in head/textproc: libxml2/files py-libxml2 X-SVN-Commit-Revision: 495019 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 686948DD0D 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.976,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-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Mar 2019 06:47:55 -0000 Author: antoine Date: Fri Mar 8 06:47:53 2019 New Revision: 495019 URL: https://svnweb.freebsd.org/changeset/ports/495019 Log: Workaround https://bugzilla.gnome.org/show_bug.cgi?id=789714 PR: 234633 Obtained from: Fedora / openSuse Added: head/textproc/libxml2/files/patch-python_libxml.c (contents, props changed) Modified: head/textproc/py-libxml2/Makefile Added: head/textproc/libxml2/files/patch-python_libxml.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/libxml2/files/patch-python_libxml.c Fri Mar 8 06:47:53 2019 (r495019) @@ -0,0 +1,35 @@ +# Workaround https://bugzilla.gnome.org/show_bug.cgi?id=789714 +# Obtained from openSuse / Fedora + +--- python/libxml.c.orig 2016-06-07 10:04:14 UTC ++++ python/libxml.c +@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU + PyObject *message; + PyObject *result; + char str[1000]; ++ unsigned char *ptr = (unsigned char *)str; + + #ifdef DEBUG_ERROR + printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg); +@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU + str[999] = 0; + va_end(ap); + ++#if PY_MAJOR_VERSION >= 3 ++ /* Ensure the error string doesn't start at UTF8 continuation. */ ++ while (*ptr && (*ptr & 0xc0) == 0x80) ++ ptr++; ++#endif ++ + list = PyTuple_New(2); + PyTuple_SetItem(list, 0, libxml_xmlPythonErrorFuncCtxt); + Py_XINCREF(libxml_xmlPythonErrorFuncCtxt); +- message = libxml_charPtrConstWrap(str); ++ message = libxml_charPtrConstWrap(ptr); + PyTuple_SetItem(list, 1, message); + result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list); ++ /* Forget any errors caused in the error handler. */ ++ PyErr_Clear(); + Py_XDECREF(list); + Py_XDECREF(result); + } Modified: head/textproc/py-libxml2/Makefile ============================================================================== --- head/textproc/py-libxml2/Makefile Fri Mar 8 06:46:27 2019 (r495018) +++ head/textproc/py-libxml2/Makefile Fri Mar 8 06:47:53 2019 (r495019) @@ -1,7 +1,7 @@ # Created by: Alexander Nedotsukov # $FreeBSD$ -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= textproc gnome python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}