Fix build with latest py-html5lib. >From kleink.diff -r1.165 -r1.166 pkgsrc/misc/calibre/Makefile
(wiz)
@@ -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 | |||
3 | DISTNAME= calibre-2.76.0 | 3 | DISTNAME= calibre-2.76.0 | |
4 | PKGREVISION= 1 | |||
4 | CATEGORIES= misc | 5 | CATEGORIES= misc | |
5 | #MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=calibre/} | 6 | #MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=calibre/} | |
6 | MASTER_SITES= http://download.calibre-ebook.com/${PKGVERSION_NOREV}/ | 7 | MASTER_SITES= http://download.calibre-ebook.com/${PKGVERSION_NOREV}/ | |
7 | EXTRACT_SUFX= .tar.xz | 8 | EXTRACT_SUFX= .tar.xz | |
8 | DISTFILES= ${DISTNAME}${EXTRACT_SUFX} | 9 | DISTFILES= ${DISTNAME}${EXTRACT_SUFX} | |
9 | 10 | |||
10 | MAINTAINER= pkgsrc-users@NetBSD.org | 11 | MAINTAINER= pkgsrc-users@NetBSD.org | |
11 | HOMEPAGE= http://www.calibre-ebook.com/ | 12 | HOMEPAGE= http://www.calibre-ebook.com/ | |
12 | COMMENT= E-book library management application | 13 | COMMENT= E-book library management application | |
13 | LICENSE= gnu-gpl-v3 | 14 | LICENSE= gnu-gpl-v3 | |
14 | 15 | |||
15 | DEPENDS+= ${PYPKGPREFIX}-Pillow>=2.7.0:../../graphics/py-Pillow | 16 | DEPENDS+= ${PYPKGPREFIX}-Pillow>=2.7.0:../../graphics/py-Pillow | |
16 | #DEPENDS+= help2man>=1.36.4:../../converters/help2man | 17 | #DEPENDS+= help2man>=1.36.4:../../converters/help2man |
@@ -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 | |||
3 | SHA1 (calibre-2.76.0.tar.xz) = e8d7296094fd194ae94a72d29c7f7d8ed05458ec | 3 | SHA1 (calibre-2.76.0.tar.xz) = e8d7296094fd194ae94a72d29c7f7d8ed05458ec | |
4 | RMD160 (calibre-2.76.0.tar.xz) = b5b1cfbc3fb03cb3db69190946236923f630bf39 | 4 | RMD160 (calibre-2.76.0.tar.xz) = b5b1cfbc3fb03cb3db69190946236923f630bf39 | |
5 | SHA512 (calibre-2.76.0.tar.xz) = f47c6b11170a71859cb6cbb8308b625fb053229615597bcad5d0b14c107a924dade9a404a191ebd5034ceaf2ee9b623592a95424d4724425503fb0da7119913f | 5 | SHA512 (calibre-2.76.0.tar.xz) = f47c6b11170a71859cb6cbb8308b625fb053229615597bcad5d0b14c107a924dade9a404a191ebd5034ceaf2ee9b623592a95424d4724425503fb0da7119913f | |
6 | Size (calibre-2.76.0.tar.xz) = 38675824 bytes | 6 | Size (calibre-2.76.0.tar.xz) = 38675824 bytes | |
7 | SHA1 (patch-setup_build.py) = 4a601e44fb69085c1f05ca0f90b73ce3f6d51ba6 | 7 | SHA1 (patch-setup_build.py) = 4a601e44fb69085c1f05ca0f90b73ce3f6d51ba6 | |
8 | SHA1 (patch-setup_build__environment.py) = d44460d96f9fb76cd80814a9cba8b153c52b5bfc | 8 | SHA1 (patch-setup_build__environment.py) = d44460d96f9fb76cd80814a9cba8b153c52b5bfc | |
9 | SHA1 (patch-src_calibre_ebooks_oeb_polish_parsing.py) = 62d02b7b901efac6ee3bb1b6628ab99b4a13a926 | |||
9 | SHA1 (patch-src_calibre_linux.py) = 16c3122a612ec9996f774c5c2c9d40a475723662 | 10 | SHA1 (patch-src_calibre_linux.py) = 16c3122a612ec9996f774c5c2c9d40a475723662 |
$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