pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/textproc/py-html2text Apply small cleanup patch from D...
details: https://anonhg.NetBSD.org/pkgsrc/rev/44ad60b52f59
branches: trunk
changeset: 524126:44ad60b52f59
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Fri Jan 19 00:55:06 2007 +0000
description:
Apply small cleanup patch from Debian. Bump PKGREVISION.
diffstat:
textproc/py-html2text/Makefile | 7 +++++--
textproc/py-html2text/distinfo | 3 ++-
textproc/py-html2text/patches/patch-aa | 30 ++++++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 3 deletions(-)
diffs (76 lines):
diff -r 58ef595d2b78 -r 44ad60b52f59 textproc/py-html2text/Makefile
--- a/textproc/py-html2text/Makefile Thu Jan 18 23:08:24 2007 +0000
+++ b/textproc/py-html2text/Makefile Fri Jan 19 00:55:06 2007 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2007/01/18 22:31:17 schmonz Exp $
+# $NetBSD: Makefile,v 1.5 2007/01/19 00:55:06 schmonz Exp $
#
DISTNAME= html2text-2.25
+PKGREVISION= 1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= textproc python
MASTER_SITES= ${HOMEPAGE}
@@ -13,6 +14,7 @@
WRKSRC= ${WRKDIR}
+USE_TOOLS+= tr
NO_BUILD= yes
PYTHON_VERSIONS_ACCEPTED?= 24 23 22 21
@@ -20,7 +22,8 @@
do-extract:
${_PKG_SILENT}${_PKG_DEBUG} \
- ${CP} ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ${WRKSRC}
+ ${TR} -d '\r' < ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \
+ > ${WRKSRC}/${DISTNAME}${EXTRACT_SUFX}
do-install:
cd ${WRKSRC}; \
diff -r 58ef595d2b78 -r 44ad60b52f59 textproc/py-html2text/distinfo
--- a/textproc/py-html2text/distinfo Thu Jan 18 23:08:24 2007 +0000
+++ b/textproc/py-html2text/distinfo Fri Jan 19 00:55:06 2007 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2007/01/18 22:31:17 schmonz Exp $
+$NetBSD: distinfo,v 1.4 2007/01/19 00:55:06 schmonz Exp $
SHA1 (html2text-2.25.py) = 84c0c38c068c29caba9e5d415c041dace3fd1615
RMD160 (html2text-2.25.py) = 4d09acb5fe209669933e1b29c81f32bddaf57311
Size (html2text-2.25.py) = 10020 bytes
+SHA1 (patch-aa) = 14e55c182e018337480ff310d4724bd16d5a29c8
diff -r 58ef595d2b78 -r 44ad60b52f59 textproc/py-html2text/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-html2text/patches/patch-aa Fri Jan 19 00:55:06 2007 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-aa,v 1.1 2007/01/19 00:55:06 schmonz Exp $
+
+--- html2text-2.25.py.orig 2007-01-18 19:06:49.000000000 -0500
++++ html2text-2.25.py
+@@ -150,7 +150,7 @@ class _html2text(sgmllib.SGMLParser):
+ self.lastWasNL = 0
+
+ def outtextf(self, s):
+- if type(s) is type(''): s = codecs.utf_8_decode(s)[0]
++ if type(s) is type(''): s = codecs.utf_8_decode(s, "replace")[0]
+ self.outtext += s
+
+ def close(self):
+@@ -259,6 +259,7 @@ class _html2text(sgmllib.SGMLParser):
+ if attrs.has_key('src'):
+ attrs['href'] = attrs['src']
+ alt = attrs.get('alt', '')
++ alt = re.sub('\n', ' ', alt)
+ i = self.previousIndex(attrs)
+ if i is not None:
+ attrs = self.a[i]
+@@ -279,7 +280,7 @@ class _html2text(sgmllib.SGMLParser):
+ if tag in ["ol", "ul"]:
+ if start:
+ self.list.append({'name':tag, 'num':0})
+- else:
++ elif self.list:
+ if self.list: self.list.pop()
+
+ self.p()
Home |
Main Index |
Thread Index |
Old Index