#! /bin/sh /usr/share/dpatch/dpatch-run
## 14_html2text_preferred.dpatch by Steve Langasek <steve.langasek@ubuntu.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Switch back to using html2text, not elinks, which is not in main in
## DP: Ubuntu

@DPATCH@
Index: aptitude/doc/aptitude-txt.style
===================================================================
--- /dev/null
+++ aptitude/doc/aptitude-txt.style
@@ -0,0 +1,61 @@
+
+/* these are the defaults uses in '-style pretty' mode */
+
+A.attributes.internal_link = NONE
+A.attributes.external_link = NONE
+
+OL.TYPE = 1
+OL.vspace.before = 1
+OL.vspace.after = 1
+OL.indents = 5
+UL.vspace.before = 1
+UL.vspace.after = 1
+UL.indents = 2
+DL.vspace.before = 1
+DL.vspace.after = 1
+DT.vspace.before = 1
+DIR.vspace.before = 1
+DIR.indents = 2
+MENU.vspace.before = 1
+MENU.vspace.after = 1
+DT.indent = 2
+DD.indent = 6
+I.attributes = UNDERLINE
+HR.marker = -
+H1.prefix =
+H2.prefix =
+H3.prefix =
+H4.prefix =
+H5.prefix =
+H6.prefix =
+H1.suffix =
+H2.suffix =
+H3.suffix =
+H4.suffix =
+H5.suffix =
+H6.suffix =
+H1.vspace.before = 2
+H2.vspace.before = 1
+H3.vspace.before = 1
+H4.vspace.before = 1
+H5.vspace.before = 1
+H6.vspace.before = 1
+H1.vspace.after = 1
+H2.vspace.after = 1
+H3.vspace.after = 1
+H4.vspace.after = 1
+H5.vspace.after = 1
+H6.vspace.after = 1
+TABLE.vspace.before = 1
+TABLE.vspace.after = 1
+CODE.vspace.before = 0
+CODE.vspace.after = 0
+BLOCKQUOTE.vspace.before = 1
+BLOCKQUOTE.vspace.after = 1
+/*PRE.vspace.before = 1
+PRE.vspace.after = 1*/
+PRE.indent.left = 0
+P.vspace.after = 1
+IMG.replace.noalt = [IMAGE]
+IMG.alt.prefix = \ 
+IMG.alt.suffix = \ 
Index: aptitude/doc/html-to-text
===================================================================
--- aptitude.orig/doc/html-to-text
+++ aptitude/doc/html-to-text
@@ -3,4 +3,6 @@
 # This is just a layer of indirection so the html-to-text utility can
 # be changed in a central location.
 
-exec elinks -dump -no-references -no-numbering "$@"
+DIR=$(dirname $0)
+exec html2text -width 80 -ascii -nobs -rcfile "$DIR/aptitude-txt.style" "$@" \
+	| "$DIR/fixup-text"
