summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2013-09-11 17:29:20 +0000
committerFabian Groffen <grobian@gentoo.org>2013-09-11 17:29:20 +0000
commitc3308b4a318e16ce7327e2f2b20f1c7550941d71 (patch)
treec27f30284d69ad79d496fabd9e92e51dc65918c7 /app-text/vilistextum
parentVersion bump of cglib to 3.0 (bug #426380). Contributed by Ivan Baidakou (dmo... (diff)
downloadgentoo-2-c3308b4a318e16ce7327e2f2b20f1c7550941d71.tar.gz
gentoo-2-c3308b4a318e16ce7327e2f2b20f1c7550941d71.tar.bz2
gentoo-2-c3308b4a318e16ce7327e2f2b20f1c7550941d71.zip
Add patch by me to fix blockquote rendering.
(Portage version: 2.2.01.22288-prefix/cvs/SunOS i386, signed Manifest commit with key 0x5F75F607C5C74E89)
Diffstat (limited to 'app-text/vilistextum')
-rw-r--r--app-text/vilistextum/ChangeLog12
-rw-r--r--app-text/vilistextum/files/vilistextum-2.6.9-blockquote.patch84
-rw-r--r--app-text/vilistextum/vilistextum-2.6.9-r1.ebuild79
3 files changed, 171 insertions, 4 deletions
diff --git a/app-text/vilistextum/ChangeLog b/app-text/vilistextum/ChangeLog
index a11f8cda0186..0f12e3e1ce96 100644
--- a/app-text/vilistextum/ChangeLog
+++ b/app-text/vilistextum/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-text/vilistextum
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/vilistextum/ChangeLog,v 1.37 2011/08/08 20:20:51 grobian Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/vilistextum/ChangeLog,v 1.38 2013/09/11 17:29:20 grobian Exp $
+
+*vilistextum-2.6.9-r1 (11 Sep 2013)
+
+ 11 Sep 2013; Fabian Groffen <grobian@gentoo.org>
+ +files/vilistextum-2.6.9-blockquote.patch, +vilistextum-2.6.9-r1.ebuild:
+ Add patch by me to fix blockquote rendering.
08 Aug 2011; Fabian Groffen <grobian@gentoo.org> vilistextum-2.6.9.ebuild,
+files/vilistextum-2.6.9-darwin11.patch:
@@ -130,5 +136,3 @@
21 May 2002; Bruce A. Locke <blocke@shivan.org> vilistextum-2.6.2.ebuild :
Update to 2.6.2
-
-
diff --git a/app-text/vilistextum/files/vilistextum-2.6.9-blockquote.patch b/app-text/vilistextum/files/vilistextum-2.6.9-blockquote.patch
new file mode 100644
index 000000000000..304f4b915e32
--- /dev/null
+++ b/app-text/vilistextum/files/vilistextum-2.6.9-blockquote.patch
@@ -0,0 +1,84 @@
+Many clients seem to use blockquote tags to flag quotes these days, so
+write them out as quotes, so they remain readable.
+
+diff -ru src.orig/html_tag.c src/html_tag.c
+--- src.orig/html_tag.c 2013-09-11 11:51:53.000000000 +0200
++++ src/html_tag.c 2013-09-11 12:43:25.000000000 +0200
+@@ -87,8 +87,8 @@
+
+ else if CMP("P", str) { start_p(); }
+ else if CMP("/P", str) { paragraphen_ende(); }
+- else if CMP("BLOCKQUOTE", str) { start_p(); }
+- else if CMP("/BLOCKQUOTE", str) { paragraphen_ende(); }
++ else if CMP("BLOCKQUOTE", str) { start_p(); quote++; }
++ else if CMP("/BLOCKQUOTE", str) { paragraphen_ende(); if (quote>0) quote--;}
+ else if CMP("Q", str) { wort_plus_ch('"'); }
+ else if CMP("/Q", str) { wort_plus_ch('"'); }
+
+diff -ru src.orig/multibyte.h src/multibyte.h
+--- src.orig/multibyte.h 2005-09-20 12:57:54.000000000 +0200
++++ src/multibyte.h 2013-09-11 11:56:13.000000000 +0200
+@@ -16,6 +16,7 @@
+ #define ATOI(n) wcstoi(n)
+
+ #define ONESPACE L" "
++ #define QUOTE L">"
+ #define WORT_PLUS_STRING(str) wort_plus_string(L##str)
+
+ #define STRSTR(haystack, needle) wcsstr(haystack, L##needle)
+@@ -40,6 +41,7 @@
+ #define ATOI(n) atoi(n)
+
+ #define ONESPACE " "
++ #define QUOTE ">"
+ #define WORT_PLUS_STRING(str) wort_plus_string(str)
+
+ #define STRSTR(haystack, needle) strstr(haystack, needle)
+diff -ru src.orig/text.h src/text.h
+--- src.orig/text.h 2013-09-11 12:48:23.000000000 +0200
++++ src/text.h 2013-09-11 12:48:27.000000000 +0200
+@@ -26,6 +26,7 @@
+
+ int tab;
+ int spaces;
++int quote;
+
+ void print_zeile();
+ int is_zeile_empty();
+diff -ru src.orig/text.c src/text.c
+--- src.orig/text.c 2006-01-22 20:31:45.000000000 +0100
++++ src/text.c 2013-09-11 12:45:09.000000000 +0200
+@@ -28,6 +28,7 @@
+ int breite=76,
+ hr_breite=76,
+ paragraph=0,
++ quote=0,
+
+ tab=4, /* tabulator */
+ spaces=0, /* spaces at beginning of line */
+@@ -325,6 +326,12 @@
+ printf(" z0: zeilen_pos: %d\n",zeilen_pos);
+ #endif
+ print_zeile();
++ if (quote > 0)
++ {
++ i=0;
++ while (i<quote) { zeile_plus_wort(QUOTE,1,1); i++; }
++ zeile_plus_wort(ONESPACE,1,1);
++ }
+ i=0;
+ while (i<spaces) { zeile_plus_wort(ONESPACE,1,1); i++; }
+ if (orderedlist>0) { zeile_plus_wort(ONESPACE,1,1); }
+@@ -345,6 +352,12 @@
+ printf(" z2: zeilen_len: %d\n",zeilen_len);
+ printf(" z2: zeilen_pos: %d\n",zeilen_pos);
+ #endif
++ if (quote > 0)
++ {
++ i=0;
++ while (i<quote) { zeile_plus_wort(QUOTE,1,1); i++; }
++ zeile_plus_wort(ONESPACE,1,1);
++ }
+ i=0;
+ while (i<spaces) { zeile_plus_wort(ONESPACE,1,1); i++; }
+ if (orderedlist>0) { zeile_plus_wort(ONESPACE,1,1); }
diff --git a/app-text/vilistextum/vilistextum-2.6.9-r1.ebuild b/app-text/vilistextum/vilistextum-2.6.9-r1.ebuild
new file mode 100644
index 000000000000..c35c9b9b6a51
--- /dev/null
+++ b/app-text/vilistextum/vilistextum-2.6.9-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/vilistextum/vilistextum-2.6.9-r1.ebuild,v 1.1 2013/09/11 17:29:20 grobian Exp $
+
+EAPI="2"
+
+inherit eutils autotools
+
+DESCRIPTION="Html to ascii converter specifically programmed to get the best out of incorrect html"
+HOMEPAGE="http://bhaak.dyndns.org/vilistextum/"
+SRC_URI="http://bhaak.dyndns.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+#IUSE="unicode kde"
+IUSE="unicode"
+
+DEPEND="virtual/libiconv"
+RDEPEND=""
+# KDE support will be available once a version of kaptain in stable
+# kde? ( kde-misc/kaptain )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-gentoo.diff" \
+ "${FILESDIR}/${P}-prefix.patch" \
+ "${FILESDIR}/${P}-darwin11.patch" \
+ "${FILESDIR}/${P}-blockquote.patch"
+ eautoreconf
+}
+
+get_locale() {
+ locale -a | grep -i "$1\.utf.*8\$"
+}
+
+find_locale() {
+ local l t
+
+ # we basically prefer to find en_US.UTF-8, but it may not always be
+ # available, in which case it is better not to hardcode to use it
+ l=$(get_locale en_US)
+ if [[ -z ${l} ]] ; then
+ for t in "en_GB" "en_.*" ".*" ; do
+ l=$(get_locale ${t})
+ if [[ -n ${l} ]] ; then
+ l=${l%%$'\n'*}
+ break;
+ fi
+ done
+ fi
+ [[ -z ${l} ]] && die "Failed to find a unicode locale"
+ echo "${l}"
+}
+
+src_configure() {
+ # need hardwired locale simply because locale -a | grep -i utf-8 | head -n1
+ # isn't always returning the most sensical (and working) locale
+ econf \
+ $(use_enable unicode multibyte) \
+ $(use_with unicode unicode-locale $(find_locale))
+}
+
+src_test() {
+ if $(locale -a | grep -iq "en_US\.utf.*8"); then
+ emake -j1 \
+ check || die
+ else
+ ewarn "If you like to run the test,"
+ ewarn "please make sure en_US.UTF-8 is installed."
+ die "en_US.UTF-8 locale is missing"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc README CHANGES || die
+ dohtml doc/*.html || die
+}