From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A9F42158003 for ; Tue, 29 Nov 2022 19:59:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F298EE08A0; Tue, 29 Nov 2022 19:59:07 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DB1E2E08A0 for ; Tue, 29 Nov 2022 19:59:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2595534137A for ; Tue, 29 Nov 2022 19:59:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B389321 for ; Tue, 29 Nov 2022 19:59:05 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1669751924.bee4fbd32b0225d09bf7fca8d38b83a9ac368bfd.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libxml2/, dev-libs/libxml2/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libxml2/files/libxml2-2.10.3-python3-unicode-errors.patch dev-libs/libxml2/libxml2-2.10.3-r1.ebuild dev-libs/libxml2/libxml2-2.10.3.ebuild X-VCS-Directories: dev-libs/libxml2/ dev-libs/libxml2/files/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: bee4fbd32b0225d09bf7fca8d38b83a9ac368bfd X-VCS-Branch: master Date: Tue, 29 Nov 2022 19:59:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9fe601d9-ae58-4b09-884e-8e5ad981485a X-Archives-Hash: 4483d23a3b144dc9d9c35f054fb25fb0 commit: bee4fbd32b0225d09bf7fca8d38b83a9ac368bfd Author: David Seifert gentoo org> AuthorDate: Tue Nov 29 19:58:44 2022 +0000 Commit: David Seifert gentoo org> CommitDate: Tue Nov 29 19:58:44 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bee4fbd3 dev-libs/libxml2: add workaround patch for itstool breakage Bug: https://bugs.gentoo.org/745162 Signed-off-by: David Seifert gentoo.org> .../libxml2-2.10.3-python3-unicode-errors.patch | 35 ++++++++++++++++++++++ ...xml2-2.10.3.ebuild => libxml2-2.10.3-r1.ebuild} | 2 ++ 2 files changed, 37 insertions(+) diff --git a/dev-libs/libxml2/files/libxml2-2.10.3-python3-unicode-errors.patch b/dev-libs/libxml2/files/libxml2-2.10.3-python3-unicode-errors.patch new file mode 100644 index 000000000000..525e1fe36c0b --- /dev/null +++ b/dev-libs/libxml2/files/libxml2-2.10.3-python3-unicode-errors.patch @@ -0,0 +1,35 @@ +https://bugs.gentoo.org/745162 +https://gitlab.gnome.org/GNOME/libxml2/-/issues/64 + +--- a/python/libxml.c ++++ b/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); + } diff --git a/dev-libs/libxml2/libxml2-2.10.3.ebuild b/dev-libs/libxml2/libxml2-2.10.3-r1.ebuild similarity index 98% rename from dev-libs/libxml2/libxml2-2.10.3.ebuild rename to dev-libs/libxml2/libxml2-2.10.3-r1.ebuild index 7b940b3948b0..bc2c968b0da6 100644 --- a/dev-libs/libxml2/libxml2-2.10.3.ebuild +++ b/dev-libs/libxml2/libxml2-2.10.3-r1.ebuild @@ -56,6 +56,8 @@ MULTILIB_CHOST_TOOLS=( /usr/bin/xml2-config ) +PATCHES=( "${FILESDIR}"/${PN}-2.10.3-python3-unicode-errors.patch ) + DOCS=( NEWS README.md TODO TODO_SCHEMAS python/TODO ) src_unpack() {