pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc py-libxml2: in nodeWrap deal with name is Non...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7251525d9d4b
branches:  trunk
changeset: 371366:7251525d9d4b
user:      prlw1 <prlw1%pkgsrc.org@localhost>
date:      Wed Nov 08 22:51:54 2017 +0000

description:
py-libxml2: in nodeWrap deal with name is None case

Should fix gtk-doc build with itstool 2.0.4:

Error: Could not merge translations:
'NoneType' object is not subscriptable

diffstat:

 textproc/libxml2/distinfo                        |   3 ++-
 textproc/libxml2/patches/patch-python_libxml2.py |  16 ++++++++++++++++
 textproc/py-libxml2/Makefile                     |   5 +++--
 3 files changed, 21 insertions(+), 3 deletions(-)

diffs (59 lines):

diff -r bc6b49a4ac6d -r 7251525d9d4b textproc/libxml2/distinfo
--- a/textproc/libxml2/distinfo Wed Nov 08 22:38:28 2017 +0000
+++ b/textproc/libxml2/distinfo Wed Nov 08 22:51:54 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.122 2017/11/06 16:16:53 prlw1 Exp $
+$NetBSD: distinfo,v 1.123 2017/11/08 22:51:54 prlw1 Exp $
 
 SHA1 (libxml2-2.9.7.tar.gz) = ab3325e6cdda50ab2382fdfe0bdb6f7d1b9224a6
 RMD160 (libxml2-2.9.7.tar.gz) = f596599cbcac6d3175482177c3320a56e68b49a2
@@ -11,5 +11,6 @@
 SHA1 (patch-ae) = 4eede9719724f94402e850ee6d6043a74aaf62b2
 SHA1 (patch-encoding.c) = 6cf0a7d421828b9f40a4079ee85adb791c54d096
 SHA1 (patch-python_libxml.py) = 869a72ae5ba2e27e6d46552878890acb22337675
+SHA1 (patch-python_libxml2.py) = 209d105b0f3aedb834091390a7c6819705108e34
 SHA1 (patch-python_setup.py) = 7771fd02ee6779463f1d3321f099d7e6d19cd1b1
 SHA1 (patch-python_types.c) = e8d73ddc4ee249e62359a517dd7cedc3da0a829c
diff -r bc6b49a4ac6d -r 7251525d9d4b textproc/libxml2/patches/patch-python_libxml2.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/libxml2/patches/patch-python_libxml2.py  Wed Nov 08 22:51:54 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-python_libxml2.py,v 1.1 2017/11/08 22:51:54 prlw1 Exp $
+
+name[0:8] will fail if name is None.
+https://bugzilla.gnome.org/show_bug.cgi?id=790071
+
+--- python/libxml2.py.orig     2017-10-30 07:39:09.000000000 +0000
++++ python/libxml2.py
+@@ -573,6 +573,8 @@ class xmlCoreBreadthFirstItertor:
+ def nodeWrap(o):
+     # TODO try to cast to the most appropriate node class
+     name = libxml2mod.type(o)
++    if name is None:
++        return xmlNode(_obj=o)
+     if name == "element" or name == "text":
+         return xmlNode(_obj=o)
+     if name == "attribute":
diff -r bc6b49a4ac6d -r 7251525d9d4b textproc/py-libxml2/Makefile
--- a/textproc/py-libxml2/Makefile      Wed Nov 08 22:38:28 2017 +0000
+++ b/textproc/py-libxml2/Makefile      Wed Nov 08 22:51:54 2017 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.59 2017/11/06 16:16:53 prlw1 Exp $
+# $NetBSD: Makefile,v 1.60 2017/11/08 22:51:54 prlw1 Exp $
 
 .include "../../textproc/libxml2/Makefile.common"
 
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
+PKGREVISION=   1
 
 COMMENT=       Python wrapper for libxml2
 LICENSE=       modified-bsd
@@ -26,7 +27,7 @@
 
 BUILD_DEPENDS+=        ${PYPKGPREFIX}-expat>=0:../../textproc/py-expat
 
-BUILDLINK_API_DEPENDS.libxml2+=        libxml2>=${PKGVERSION}
+BUILDLINK_API_DEPENDS.libxml2+=        libxml2>=${PKGVERSION_NOREV}
 .include "../../textproc/libxml2/buildlink3.mk"
 
 .include "../../lang/python/distutils.mk"



Home | Main Index | Thread Index | Old Index