diff options
author | schmonz <schmonz@pkgsrc.org> | 2007-01-19 00:55:06 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2007-01-19 00:55:06 +0000 |
commit | fffcda124e65c126bfb0cb97dab17c75dfdcc5cd (patch) | |
tree | 880bc74e85b0aed70f72184262af1cf0d5f2d7af /textproc | |
parent | f54e93cf57745ff4ac8516139929a20ad9ec2036 (diff) | |
download | pkgsrc-fffcda124e65c126bfb0cb97dab17c75dfdcc5cd.tar.gz |
Apply small cleanup patch from Debian. Bump PKGREVISION.
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/py-html2text/Makefile | 7 | ||||
-rw-r--r-- | textproc/py-html2text/distinfo | 3 | ||||
-rw-r--r-- | textproc/py-html2text/patches/patch-aa | 30 |
3 files changed, 37 insertions, 3 deletions
diff --git a/textproc/py-html2text/Makefile b/textproc/py-html2text/Makefile index 1f4ac16f839..c57796b5bcb 100644 --- a/textproc/py-html2text/Makefile +++ b/textproc/py-html2text/Makefile @@ -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 @@ COMMENT= Convert HTML into easy-to-read plain ASCII text WRKSRC= ${WRKDIR} +USE_TOOLS+= tr NO_BUILD= yes PYTHON_VERSIONS_ACCEPTED?= 24 23 22 21 @@ -20,7 +22,8 @@ INSTALLATION_DIRS= share/html2text 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 --git a/textproc/py-html2text/distinfo b/textproc/py-html2text/distinfo index 834bcfa5127..36c1cba3cf3 100644 --- a/textproc/py-html2text/distinfo +++ b/textproc/py-html2text/distinfo @@ -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 --git a/textproc/py-html2text/patches/patch-aa b/textproc/py-html2text/patches/patch-aa new file mode 100644 index 00000000000..adfe4ba1ef4 --- /dev/null +++ b/textproc/py-html2text/patches/patch-aa @@ -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() |