Tue Jan 17 23:19:24 2017 UTC ()
Fix build with latest py-html5lib.

>From kleink.


(wiz)
diff -r1.165 -r1.166 pkgsrc/misc/calibre/Makefile
diff -r1.83 -r1.84 pkgsrc/misc/calibre/distinfo
diff -r0 -r1.1 pkgsrc/misc/calibre/patches/patch-src_calibre_ebooks_oeb_polish_parsing.py

cvs diff -r1.165 -r1.166 pkgsrc/misc/calibre/Makefile (expand / switch to unified diff)

--- pkgsrc/misc/calibre/Makefile 2017/01/01 16:00:03 1.165
+++ pkgsrc/misc/calibre/Makefile 2017/01/17 23:19:24 1.166
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1# $NetBSD: Makefile,v 1.165 2017/01/01 16:00:03 wiz Exp $ 1# $NetBSD: Makefile,v 1.166 2017/01/17 23:19:24 wiz Exp $
2 2
3DISTNAME= calibre-2.76.0 3DISTNAME= calibre-2.76.0
 4PKGREVISION= 1
4CATEGORIES= misc 5CATEGORIES= misc
5#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=calibre/} 6#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=calibre/}
6MASTER_SITES= http://download.calibre-ebook.com/${PKGVERSION_NOREV}/ 7MASTER_SITES= http://download.calibre-ebook.com/${PKGVERSION_NOREV}/
7EXTRACT_SUFX= .tar.xz 8EXTRACT_SUFX= .tar.xz
8DISTFILES= ${DISTNAME}${EXTRACT_SUFX} 9DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
9 10
10MAINTAINER= pkgsrc-users@NetBSD.org 11MAINTAINER= pkgsrc-users@NetBSD.org
11HOMEPAGE= http://www.calibre-ebook.com/ 12HOMEPAGE= http://www.calibre-ebook.com/
12COMMENT= E-book library management application 13COMMENT= E-book library management application
13LICENSE= gnu-gpl-v3 14LICENSE= gnu-gpl-v3
14 15
15DEPENDS+= ${PYPKGPREFIX}-Pillow>=2.7.0:../../graphics/py-Pillow 16DEPENDS+= ${PYPKGPREFIX}-Pillow>=2.7.0:../../graphics/py-Pillow
16#DEPENDS+= help2man>=1.36.4:../../converters/help2man 17#DEPENDS+= help2man>=1.36.4:../../converters/help2man

cvs diff -r1.83 -r1.84 pkgsrc/misc/calibre/distinfo (expand / switch to unified diff)

--- pkgsrc/misc/calibre/distinfo 2017/01/01 16:00:03 1.83
+++ pkgsrc/misc/calibre/distinfo 2017/01/17 23:19:24 1.84
@@ -1,9 +1,10 @@ @@ -1,9 +1,10 @@
1$NetBSD: distinfo,v 1.83 2017/01/01 16:00:03 wiz Exp $ 1$NetBSD: distinfo,v 1.84 2017/01/17 23:19:24 wiz Exp $
2 2
3SHA1 (calibre-2.76.0.tar.xz) = e8d7296094fd194ae94a72d29c7f7d8ed05458ec 3SHA1 (calibre-2.76.0.tar.xz) = e8d7296094fd194ae94a72d29c7f7d8ed05458ec
4RMD160 (calibre-2.76.0.tar.xz) = b5b1cfbc3fb03cb3db69190946236923f630bf39 4RMD160 (calibre-2.76.0.tar.xz) = b5b1cfbc3fb03cb3db69190946236923f630bf39
5SHA512 (calibre-2.76.0.tar.xz) = f47c6b11170a71859cb6cbb8308b625fb053229615597bcad5d0b14c107a924dade9a404a191ebd5034ceaf2ee9b623592a95424d4724425503fb0da7119913f 5SHA512 (calibre-2.76.0.tar.xz) = f47c6b11170a71859cb6cbb8308b625fb053229615597bcad5d0b14c107a924dade9a404a191ebd5034ceaf2ee9b623592a95424d4724425503fb0da7119913f
6Size (calibre-2.76.0.tar.xz) = 38675824 bytes 6Size (calibre-2.76.0.tar.xz) = 38675824 bytes
7SHA1 (patch-setup_build.py) = 4a601e44fb69085c1f05ca0f90b73ce3f6d51ba6 7SHA1 (patch-setup_build.py) = 4a601e44fb69085c1f05ca0f90b73ce3f6d51ba6
8SHA1 (patch-setup_build__environment.py) = d44460d96f9fb76cd80814a9cba8b153c52b5bfc 8SHA1 (patch-setup_build__environment.py) = d44460d96f9fb76cd80814a9cba8b153c52b5bfc
 9SHA1 (patch-src_calibre_ebooks_oeb_polish_parsing.py) = 62d02b7b901efac6ee3bb1b6628ab99b4a13a926
9SHA1 (patch-src_calibre_linux.py) = 16c3122a612ec9996f774c5c2c9d40a475723662 10SHA1 (patch-src_calibre_linux.py) = 16c3122a612ec9996f774c5c2c9d40a475723662

File Added: pkgsrc/misc/calibre/patches/Attic/patch-src_calibre_ebooks_oeb_polish_parsing.py
$NetBSD: patch-src_calibre_ebooks_oeb_polish_parsing.py,v 1.1 2017/01/17 23:19:24 wiz Exp $

html5lib 0.99999999 moved treebuilders._base to .base to clarify its
status as public, and ihatexml to _ihatexml to clarify as private.

--- src/calibre/ebooks/oeb/polish/parsing.py.orig	2017-01-13 03:38:35.000000000 +0000
+++ src/calibre/ebooks/oeb/polish/parsing.py
@@ -13,8 +13,14 @@ from bisect import bisect
 from lxml.etree import ElementBase, XMLParser, ElementDefaultClassLookup, CommentBase, fromstring, Element as LxmlElement
 
 from html5lib.constants import namespaces, tableInsertModeElements, EOF
-from html5lib.treebuilders._base import TreeBuilder as BaseTreeBuilder
-from html5lib.ihatexml import InfosetFilter, DataLossWarning
+try:
+    from html5lib.treebuilders.base import TreeBuilder as BaseTreeBuilder
+except:
+    from html5lib.treebuilders._base import TreeBuilder as BaseTreeBuilder
+try:
+    from html5lib._ihatexml import InfosetFilter, DataLossWarning
+except:
+    from html5lib.ihatexml import InfosetFilter, DataLossWarning
 from html5lib.html5parser import HTMLParser
 
 from calibre import xml_replace_entities