pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/libxml2
Module Name: pkgsrc
Committed By: js
Date: Sun Nov 8 23:31:45 UTC 2020
Modified Files:
pkgsrc/textproc/libxml2: distinfo
pkgsrc/textproc/libxml2/patches: patch-python_libxml.c
Added Files:
pkgsrc/textproc/libxml2/patches: patch-python-types.c
Log Message:
textproc/(py-)libxml2: Fix compilation with Python 3.9
To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 pkgsrc/textproc/libxml2/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/libxml2/patches/patch-python-types.c
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/textproc/libxml2/patches/patch-python_libxml.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/textproc/libxml2/distinfo
diff -u pkgsrc/textproc/libxml2/distinfo:1.133 pkgsrc/textproc/libxml2/distinfo:1.134
--- pkgsrc/textproc/libxml2/distinfo:1.133 Thu Nov 5 17:45:55 2020
+++ pkgsrc/textproc/libxml2/distinfo Sun Nov 8 23:31:44 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.133 2020/11/05 17:45:55 adam Exp $
+$NetBSD: distinfo,v 1.134 2020/11/08 23:31:44 js Exp $
SHA1 (libxml2-2.9.10.tar.gz) = db6592ec9ca9708c4e71bf6bfd907bbb5cd40644
RMD160 (libxml2-2.9.10.tar.gz) = 455f81e1f121c63dac96802de7f83ce4483f1afe
@@ -10,7 +10,8 @@ SHA1 (patch-configure) = f6e9f08377a5376
SHA1 (patch-doc_examples_Makefile.in) = 4eede9719724f94402e850ee6d6043a74aaf62b2
SHA1 (patch-encoding.c) = 62b3343f0a0ea51e3fb8eb693e495520eefb6ffd
SHA1 (patch-parser.c) = 9dcda6b8bc71c1abb095fc2c840ac40c1ae04a33
-SHA1 (patch-python_libxml.c) = cfa07b4f3dfddb501c2ba210bb32b8ee14e3df9d
+SHA1 (patch-python-types.c) = d3c93a1c68956bc7da4f81a8fcbf1e6bad580bef
+SHA1 (patch-python_libxml.c) = c092f10787be1bb43764cc0bef4ffd35bbe6ec94
SHA1 (patch-python_libxml.py) = 869a72ae5ba2e27e6d46552878890acb22337675
SHA1 (patch-python_libxml2.py) = 209d105b0f3aedb834091390a7c6819705108e34
SHA1 (patch-python_setup.py) = 7771fd02ee6779463f1d3321f099d7e6d19cd1b1
Index: pkgsrc/textproc/libxml2/patches/patch-python_libxml.c
diff -u pkgsrc/textproc/libxml2/patches/patch-python_libxml.c:1.1 pkgsrc/textproc/libxml2/patches/patch-python_libxml.c:1.2
--- pkgsrc/textproc/libxml2/patches/patch-python_libxml.c:1.1 Wed Jan 9 13:40:50 2019
+++ pkgsrc/textproc/libxml2/patches/patch-python_libxml.c Sun Nov 8 23:31:44 2020
@@ -1,11 +1,30 @@
-$NetBSD: patch-python_libxml.c,v 1.1 2019/01/09 13:40:50 wiz Exp $
+$NetBSD: patch-python_libxml.c,v 1.2 2020/11/08 23:31:44 js Exp $
Avoid returning invalid UTF-8 strings to python.
Based on https://bugzilla.opensuse.org/attachment.cgi?id=746044&action=edit
Fixes https://github.com/itstool/itstool/issues/22
+Fix compilation with Python 3.9.
---- python/libxml.c.orig 2016-06-07 10:04:14.000000000 +0000
+--- python/libxml.c.orig 2019-10-22 18:46:01.000000000 +0000
+++ python/libxml.c
+@@ -294,7 +294,7 @@ xmlPythonFileReadRaw (void * context, ch
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (ret) {
++ } else if (PyUnicode_Check (ret)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
+@@ -359,7 +359,7 @@ xmlPythonFileRead (void * context, char
+ lenread = PyBytes_Size(ret);
+ data = PyBytes_AsString(ret);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (ret) {
++ } else if (PyUnicode_Check (ret)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ Py_ssize_t size;
+ const char *tmp;
@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
PyObject *message;
PyObject *result;
Added files:
Index: pkgsrc/textproc/libxml2/patches/patch-python-types.c
diff -u /dev/null pkgsrc/textproc/libxml2/patches/patch-python-types.c:1.1
--- /dev/null Sun Nov 8 23:31:45 2020
+++ pkgsrc/textproc/libxml2/patches/patch-python-types.c Sun Nov 8 23:31:44 2020
@@ -0,0 +1,52 @@
+$NetBSD: patch-python-types.c,v 1.1 2020/11/08 23:31:44 js Exp $
+
+Fix compilation with Python 3.9.
+
+--- python/types.c.orig 2019-10-22 18:46:01.000000000 +0000
++++ python/types.c
+@@ -602,16 +602,16 @@ libxml_xmlXPathObjectPtrConvert(PyObject
+ if (obj == NULL) {
+ return (NULL);
+ }
+- if PyFloat_Check (obj) {
++ if (PyFloat_Check (obj)) {
+ ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
+- } else if PyLong_Check(obj) {
++ } else if (PyLong_Check(obj)) {
+ #ifdef PyLong_AS_LONG
+ ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj));
+ #else
+ ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj));
+ #endif
+ #ifdef PyBool_Check
+- } else if PyBool_Check (obj) {
++ } else if (PyBool_Check (obj)) {
+
+ if (obj == Py_True) {
+ ret = xmlXPathNewBoolean(1);
+@@ -620,14 +620,14 @@ libxml_xmlXPathObjectPtrConvert(PyObject
+ ret = xmlXPathNewBoolean(0);
+ }
+ #endif
+- } else if PyBytes_Check (obj) {
++ } else if (PyBytes_Check (obj)) {
+ xmlChar *str;
+
+ str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj),
+ PyBytes_GET_SIZE(obj));
+ ret = xmlXPathWrapString(str);
+ #ifdef PyUnicode_Check
+- } else if PyUnicode_Check (obj) {
++ } else if (PyUnicode_Check (obj)) {
+ #if PY_VERSION_HEX >= 0x03030000
+ xmlChar *str;
+ const char *tmp;
+@@ -650,7 +650,7 @@ libxml_xmlXPathObjectPtrConvert(PyObject
+ ret = xmlXPathWrapString(str);
+ #endif
+ #endif
+- } else if PyList_Check (obj) {
++ } else if (PyList_Check (obj)) {
+ int i;
+ PyObject *node;
+ xmlNodePtr cur;
Home |
Main Index |
Thread Index |
Old Index