summaryrefslogtreecommitdiff
path: root/textproc/py-html2text
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2011-06-09 06:21:38 +0000
committerschmonz <schmonz@pkgsrc.org>2011-06-09 06:21:38 +0000
commit915da173bcf67e2df7ade31a69740e4cc21a2cac (patch)
tree1c0c5f14077fad11401d2b1a81cf3cbfc6ccfc58 /textproc/py-html2text
parentc90240db152ea51d074d99f008389363fe7bfdfe (diff)
downloadpkgsrc-915da173bcf67e2df7ade31a69740e4cc21a2cac.tar.gz
Update to 3.02. From the changelog:
3.02: * Use optparse for parsing and checking arguments * Encode all output as UTF-8 * Accept optional encoding for local file or URL * Use chardet for guessing local file character sets * Fix double-newlines inside code blocks 3.01: * Fix bug with unknown entities 3.0: * Add forward compatibility with Python3 2.40: * Update from sgmllib to HTMLParser so that valid XHTML doesn't fail
Diffstat (limited to 'textproc/py-html2text')
-rw-r--r--textproc/py-html2text/Makefile20
-rw-r--r--textproc/py-html2text/distinfo10
-rw-r--r--textproc/py-html2text/patches/patch-aa12
3 files changed, 20 insertions, 22 deletions
diff --git a/textproc/py-html2text/Makefile b/textproc/py-html2text/Makefile
index 0e20daabf44..62eb2ab962c 100644
--- a/textproc/py-html2text/Makefile
+++ b/textproc/py-html2text/Makefile
@@ -1,11 +1,13 @@
-# $NetBSD: Makefile,v 1.19 2011/05/10 16:45:35 schnoebe Exp $
+# $NetBSD: Makefile,v 1.20 2011/06/09 06:21:38 schmonz Exp $
#
-DISTNAME= html2text-2.39
-PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+DISTNAME= aaronsw-${GHNAME}-${GHVERSION}-0-g${GHCOMMIT}
+GHNAME= html2text
+GHVERSION= 3.02
+GHCOMMIT= d9bf7d6
+PKGNAME= ${PYPKGPREFIX}-${GHNAME}-${GHVERSION}
CATEGORIES= textproc python
-MASTER_SITES= ${HOMEPAGE}
-EXTRACT_SUFX= .py
+MASTER_SITES= http://download.github.com/
MAINTAINER= schmonz@NetBSD.org
HOMEPAGE= http://www.aaronsw.com/2002/html2text/
@@ -14,20 +16,14 @@ LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
-WRKSRC= ${WRKDIR}
+WRKSRC= ${WRKDIR}/aaronsw-${GHNAME}-${GHCOMMIT}
-USE_TOOLS+= tr
NO_BUILD= yes
REPLACE_PYTHON= html2text.py
INSTALLATION_DIRS= share/html2text
-do-extract:
- ${RUN} \
- ${TR} -d '\r' < ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \
- > ${WRKSRC}/html2text.py
-
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/html2text.py ${DESTDIR}${PREFIX}/share/html2text
diff --git a/textproc/py-html2text/distinfo b/textproc/py-html2text/distinfo
index 4a0d03272ae..c751683bdb3 100644
--- a/textproc/py-html2text/distinfo
+++ b/textproc/py-html2text/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.14 2010/09/19 14:05:35 wiz Exp $
+$NetBSD: distinfo,v 1.15 2011/06/09 06:21:38 schmonz Exp $
-SHA1 (html2text-2.39.py) = eb9800b30929b5ed2a522930eb9e8b28e117342f
-RMD160 (html2text-2.39.py) = 97f9bdd09ece52b7ea9c31563ac09993efccae56
-Size (html2text-2.39.py) = 14325 bytes
-SHA1 (patch-aa) = 2395e54a2c2f72231f6766375b8406928dfa7f3b
+SHA1 (aaronsw-html2text-3.02-0-gd9bf7d6.tar.gz) = 021be508ba1835f7543ee9daf1e23ade85011418
+RMD160 (aaronsw-html2text-3.02-0-gd9bf7d6.tar.gz) = 68170480d7a37857a1722bae1b462f0de3c443cf
+Size (aaronsw-html2text-3.02-0-gd9bf7d6.tar.gz) = 5067 bytes
+SHA1 (patch-aa) = e26d95e8b7ad7a44d0951fc2dab73ec1e87593de
diff --git a/textproc/py-html2text/patches/patch-aa b/textproc/py-html2text/patches/patch-aa
index 367e5258c33..28ee1208bd6 100644
--- a/textproc/py-html2text/patches/patch-aa
+++ b/textproc/py-html2text/patches/patch-aa
@@ -1,16 +1,18 @@
-$NetBSD: patch-aa,v 1.6 2008/10/19 18:39:56 schmonz Exp $
+$NetBSD: patch-aa,v 1.7 2011/06/09 06:21:38 schmonz Exp $
---- html2text.py.orig 2008-10-19 14:36:07.000000000 -0400
+Small cleanup patch from Debian.
+
+--- html2text.py.orig 2011-03-08 23:35:25.000000000 +0000
+++ html2text.py
-@@ -282,6 +282,7 @@ class _html2text(sgmllib.SGMLParser):
- if attrs.has_key('src'):
+@@ -305,6 +305,7 @@ class _html2text(HTMLParser.HTMLParser):
+ if has_key(attrs, '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]
-@@ -302,7 +303,7 @@ class _html2text(sgmllib.SGMLParser):
+@@ -325,7 +326,7 @@ class _html2text(HTMLParser.HTMLParser):
if tag in ["ol", "ul"]:
if start:
self.list.append({'name':tag, 'num':0})