summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-text/vilistextum
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-text/vilistextum')
-rw-r--r--app-text/vilistextum/Manifest1
-rw-r--r--app-text/vilistextum/files/vilistextum-2.6.7-gentoo.diff22
-rw-r--r--app-text/vilistextum/files/vilistextum-2.6.7-use-glibc-iconv.diff490
-rw-r--r--app-text/vilistextum/files/vilistextum-2.6.9-blockquote.patch113
-rw-r--r--app-text/vilistextum/files/vilistextum-2.6.9-darwin11.patch23
-rw-r--r--app-text/vilistextum/files/vilistextum-2.6.9-gentoo.diff22
-rw-r--r--app-text/vilistextum/files/vilistextum-2.6.9-prefix.patch27
-rw-r--r--app-text/vilistextum/metadata.xml5
-rw-r--r--app-text/vilistextum/vilistextum-2.6.9-r1.ebuild77
9 files changed, 780 insertions, 0 deletions
diff --git a/app-text/vilistextum/Manifest b/app-text/vilistextum/Manifest
new file mode 100644
index 000000000000..6724fe9e456a
--- /dev/null
+++ b/app-text/vilistextum/Manifest
@@ -0,0 +1 @@
+DIST vilistextum-2.6.9.tar.bz2 147743 SHA256 dddf05b4b9dbb408ea37b5654666f8cf57b5c1da0dd722de763bc86788723d0f SHA512 ce76a4061b766e4544d1a86986333314a3b6959439ba6995a2977c10b01b0142c524d4b215c3272a1dcfcc4f5b6fda03210de95d65cedecfc6a1c940cedf487d WHIRLPOOL b9b6011763143c49a0e5496a42102173b4aa5d16b6c21ccf60d3018ce7c3c7b86b54fc3cbe8bf58b1a3344de498768d79c9ebc7e5c2b3f0a51d822c45e69a56b
diff --git a/app-text/vilistextum/files/vilistextum-2.6.7-gentoo.diff b/app-text/vilistextum/files/vilistextum-2.6.7-gentoo.diff
new file mode 100644
index 000000000000..4e00684041d9
--- /dev/null
+++ b/app-text/vilistextum/files/vilistextum-2.6.7-gentoo.diff
@@ -0,0 +1,22 @@
+diff -urN vilistextum-2.6.7.orig/src/Makefile.am vilistextum-2.6.7/src/Makefile.am
+--- vilistextum-2.6.7.orig/src/Makefile.am 2004-12-23 05:53:36.588116792 -0500
++++ vilistextum-2.6.7/src/Makefile.am 2004-12-23 06:05:30.567575416 -0500
+@@ -8,7 +8,7 @@
+
+ # profiling
+ #AM_CFLAGS = -Wall -pg
+-AM_CFLAGS = -O2 -Wall #-ansi #-pedantic-error -funsigned-char
++AM_CFLAGS = -Wall #-ansi #-pedantic-error -funsigned-char
+ AM_LDFLAGS = $(STATIC)
+
+ EXTRA_DIST = kilistextum.kaptn
+diff -urN vilistextum-2.6.7.orig/tests/Makefile.am vilistextum-2.6.7/tests/Makefile.am
+--- vilistextum-2.6.7.orig/tests/Makefile.am 2004-12-23 05:53:36.592116184 -0500
++++ vilistextum-2.6.7/tests/Makefile.am 2004-12-23 06:05:43.825559896 -0500
+@@ -16,5 +16,5 @@
+
+ test: check
+
+-all: check
++all:
+
diff --git a/app-text/vilistextum/files/vilistextum-2.6.7-use-glibc-iconv.diff b/app-text/vilistextum/files/vilistextum-2.6.7-use-glibc-iconv.diff
new file mode 100644
index 000000000000..4d492e97e9f8
--- /dev/null
+++ b/app-text/vilistextum/files/vilistextum-2.6.7-use-glibc-iconv.diff
@@ -0,0 +1,490 @@
+diff -uwr vilistextum-2.6.7/CHANGES vilistextum-2.6.7-gentoo/CHANGES
+--- vilistextum-2.6.7/CHANGES 2004-12-20 00:05:47.000000000 +0100
++++ vilistextum-2.6.7-gentoo/CHANGES 2005-01-02 09:14:58.000000000 +0100
+@@ -1,9 +1,15 @@
++2.6.7-gentoo: (02.01.2005)
++
++ - configure fixed to correctly process --disable-multibyte
++ - configure falls back to standard iconv() if no libiconv is found
++ - BUGFIX: three off-by-one error in get_attr found by Ewald Dieterich
++
+ 2.6.7: (19.12.2004)
+
+- - BUGFIX: buffer overflow in get_attr found by Ariel Berkman
++ - BUGFIX: buffer overflow in get_attr() found by Ariel Berkman
+ - BUGFIX: compilation fix for Solaris by Fredrik Roubert
+ - more robust behaviour when encountering invalid byte sequences
+- - added RPM-spec file by Joshua Jensen.
++ - added RPM-spec file by Joshua Jensen
+
+ 2.6.6: (24.08.2004)
+
+diff -uwr vilistextum-2.6.7/INSTALL vilistextum-2.6.7-gentoo/INSTALL
+--- vilistextum-2.6.7/INSTALL 2004-04-20 12:10:18.000000000 +0200
++++ vilistextum-2.6.7-gentoo/INSTALL 2004-12-22 21:49:20.000000000 +0100
+@@ -11,7 +11,7 @@
+ Multibyte/Unicode version
+ =========================
+
+-./configure --enable && make && make install
++./configure --enable-multibyte && make && make install
+
+ The multibyte version needs libiconv.
+ http://www.gnu.org/software/libiconv
+diff -uwr vilistextum-2.6.7/config.h.in vilistextum-2.6.7-gentoo/config.h.in
+--- vilistextum-2.6.7/config.h.in 2004-12-20 00:05:48.000000000 +0100
++++ vilistextum-2.6.7-gentoo/config.h.in 2005-01-02 09:14:59.000000000 +0100
+@@ -3,6 +3,9 @@
+ /* Define to 1 if you have the <getopt.h> header file. */
+ #undef HAVE_GETOPT_H
+
++/* Define to 1 if you have the <iconv.h> header file. */
++#undef HAVE_ICONV_H
++
+ /* Define to 1 if you have the <inttypes.h> header file. */
+ #undef HAVE_INTTYPES_H
+
+diff -uwr vilistextum-2.6.7/configure vilistextum-2.6.7-gentoo/configure
+--- vilistextum-2.6.7/configure 2004-12-20 00:05:32.000000000 +0100
++++ vilistextum-2.6.7-gentoo/configure 2005-01-02 09:13:56.000000000 +0100
+@@ -846,7 +846,7 @@
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors
+- --enable-multibyte Enable multibyte support. Needs libiconv.
++ --enable-multibyte Enable multibyte support.
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -1541,7 +1541,7 @@
+
+ # Define the identity of the package.
+ PACKAGE=vilistextum
+- VERSION=2.6.7
++ VERSION=2.6.7-gentoo
+
+
+ cat >>confdefs.h <<_ACEOF
+@@ -1673,7 +1673,7 @@
+
+
+ cat >>confdefs.h <<_ACEOF
+-#define RELEASEDATE "19.12.2004"
++#define RELEASEDATE "02.01.2005"
+ _ACEOF
+
+
+@@ -3615,13 +3615,14 @@
+ # Check whether --enable-multibyte or --disable-multibyte was given.
+ if test "${enable_multibyte+set}" = set; then
+ enableval="$enable_multibyte"
+- multibyte="yes"
++ use_multibyte=$enableval
+ else
+- multibyte="no"
++ use_multibyte=no
+ fi;
+-echo "$as_me:$LINENO: result: $multibyte" >&5
+-echo "${ECHO_T}$multibyte" >&6
+-if test "$multibyte" = "yes"; then
++echo "$as_me:$LINENO: result: $use_multibyte" >&5
++echo "${ECHO_T}$use_multibyte" >&6
++
++if test "$use_multibyte" = "yes"; then
+
+ cat >>confdefs.h <<\_ACEOF
+ #define MULTIBYTE 1
+@@ -3629,7 +3630,154 @@
+
+ fi
+
+-if test "$multibyte" = "yes"; then
++if test "$use_multibyte" = "yes"; then
++
++for ac_header in iconv.h
++do
++as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++else
++ # Is the header compilable?
++echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -s conftest.$ac_objext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_header_compiler=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_header_compiler=no
++fi
++rm -f conftest.$ac_objext conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6
++
++# Is the header present?
++echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++cat >conftest.$ac_ext <<_ACEOF
++#line $LINENO "configure"
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
++ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null; then
++ if test -s conftest.err; then
++ ac_cpp_err=$ac_c_preproc_warn_flag
++ else
++ ac_cpp_err=
++ fi
++else
++ ac_cpp_err=yes
++fi
++if test -z "$ac_cpp_err"; then
++ ac_header_preproc=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++rm -f conftest.err conftest.$ac_ext
++echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc in
++ yes:no )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++ no:yes )
++ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ (
++ cat <<\_ASBOX
++## ------------------------------------ ##
++## Report this to bug-autoconf@gnu.org. ##
++## ------------------------------------ ##
++_ASBOX
++ ) |
++ sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
++if eval "test \"\${$as_ac_Header+set}\" = set"; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ eval "$as_ac_Header=$ac_header_preproc"
++fi
++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
++echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++
++fi
++if test `eval echo '${'$as_ac_Header'}'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++else
++ { { echo "$as_me:$LINENO: error: Need libiconv or iconv.h for multibyte support" >&5
++echo "$as_me: error: Need libiconv or iconv.h for multibyte support" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++done
++
++
+
+ echo "$as_me:$LINENO: checking for iconv in -liconv" >&5
+ echo $ECHO_N "checking for iconv in -liconv... $ECHO_C" >&6
+@@ -3693,9 +3841,8 @@
+ LIBS="-liconv $LIBS"
+
+ else
+- { { echo "$as_me:$LINENO: error: Need libiconv for multibyte support" >&5
+-echo "$as_me: error: Need libiconv for multibyte support" >&2;}
+- { (exit 1); exit 1; }; }
++ { echo "$as_me:$LINENO: WARNING: only generic iconv has been found not libiconv" >&5
++echo "$as_me: WARNING: only generic iconv has been found not libiconv" >&2;}
+ fi
+
+
+diff -uwr vilistextum-2.6.7/configure.in vilistextum-2.6.7-gentoo/configure.in
+--- vilistextum-2.6.7/configure.in 2004-12-20 00:05:14.000000000 +0100
++++ vilistextum-2.6.7-gentoo/configure.in 2005-01-02 09:13:30.000000000 +0100
+@@ -1,11 +1,11 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(src/debug.h)
+-AM_INIT_AUTOMAKE(vilistextum, 2.6.7)
++AM_INIT_AUTOMAKE(vilistextum, 2.6.7-gentoo)
+
+ AM_CONFIG_HEADER(config.h)
+
+ dnl Set current date
+-AC_DEFINE_UNQUOTED(RELEASEDATE, "19.12.2004", "Release date of the program")
++AC_DEFINE_UNQUOTED(RELEASEDATE, "02.01.2005", "Release date of the program")
+
+ dnl Checks for programs.
+ AC_PROG_CC
+@@ -27,17 +27,21 @@
+ dnl checking for options
+ AC_MSG_CHECKING(if --enable-multibyte specified)
+ AC_ARG_ENABLE(multibyte,
+- [ --enable-multibyte Enable multibyte support. Needs libiconv.],
+- [multibyte="yes"], [multibyte="no"])
+-AC_MSG_RESULT($multibyte)
+-if test "$multibyte" = "yes"; then
++ AC_HELP_STRING([--enable-multibyte], [Enable multibyte support.]),
++ [use_multibyte=$enableval], [use_multibyte=no])
++AC_MSG_RESULT($use_multibyte)
++
++if test "$use_multibyte" = "yes"; then
+ AC_DEFINE(MULTIBYTE, 1, "Enable multibyte support (e.g. unicode, shift_jis)")
+ fi
+
+ dnl Checks for libraries.
+-if test "$multibyte" = "yes"; then
++if test "$use_multibyte" = "yes"; then
++AC_CHECK_HEADERS(iconv.h,,
++ AC_MSG_ERROR(Need libiconv or iconv.h for multibyte support))
++
+ AC_CHECK_LIB(iconv, iconv,,
+- AC_MSG_ERROR(Need libiconv for multibyte support))
++ AC_MSG_WARN(only generic iconv has been found not libiconv))
+
+ dnl setting INTERNAL_LOCALE
+ AC_MSG_CHECKING(for unicode locale)
+diff -uwr vilistextum-2.6.7/src/fileio.c vilistextum-2.6.7-gentoo/src/fileio.c
+--- vilistextum-2.6.7/src/fileio.c 2004-12-19 22:08:08.000000000 +0100
++++ vilistextum-2.6.7-gentoo/src/fileio.c 2004-12-22 21:29:34.000000000 +0100
+@@ -27,11 +27,6 @@
+ #ifdef MULTIBYTE
+ #include <iconv.h>
+ #include <locale.h>
+- #if defined(__sun__)
+- #include <libcharset.h>
+- #else
+- #include <localcharset.h>
+- #endif
+ #endif
+
+ FILE *in, *out;
+@@ -74,32 +69,42 @@
+ char *inp, *outp;
+ int fehlernr=0;
+ size_t insize, outsize;
++ char *ret;
+
+ /* set locale based on environment variables */
+- setlocale(LC_CTYPE, "");
++ ret = setlocale(LC_CTYPE, "");
++ if (ret==NULL) {
++ fprintf(stderr, "setlocale failed with: %s\n\n", getenv("LC_CTYPE"));
++ exit(1);
++ }
+
+ insize = strlen(str);
++ if (insize > DEF_STR_LEN) { insize = DEF_STR_LEN; }
+ outsize = DEF_STR_LEN;
+
+ inp = str;
+ outp = output;
+
+ if ((conv = iconv_open("utf-8", "char"))==(iconv_t)(-1))
+- { printf("iconv_open failed in convert_string: Can't convert from %s to UTF-8?\n", locale_charset()); exit(1); }
++ { printf("iconv_open failed in convert_string: Can't convert from %s to UTF-8?\n", getenv("LC_CTYPE")); exit(1); }
+
+ result = iconv(conv, &inp, &insize, &outp, &outsize);
+ fehlernr = errno;
+
+ if (fehlernr==E2BIG) { fprintf(stderr, "errno==E2BIG\n"); }
+ else if (fehlernr==EILSEQ) {
+- fprintf(stderr, "Can't convert '%s' as character set %s\n", str, locale_charset());
++ fprintf(stderr, "Can't interpret '%s' as character from charset %s\n", str, getenv("LC_CTYPE"));
+ fprintf(stderr, "Check your language settings with locale(1)\n");
+ }
+ else if (fehlernr==EINVAL) { fprintf(stderr, "errno==EINVAL\n"); }
+
+ output[strlen(output)] = '\0';
+
+- setlocale(LC_CTYPE, INTERNAL_LOCALE);
++ ret = setlocale(LC_CTYPE, INTERNAL_LOCALE);
++ if (ret==NULL) {
++ fprintf(stderr, "setlocale failed with: %s\n\n", INTERNAL_LOCALE);
++ exit(1);
++ }
+ mbstowcs(converted_string, output, strlen(output));
+
+ iconv_close(conv);
+@@ -141,7 +146,7 @@
+ fehlernr = errno;
+
+ if (fehlernr==E2BIG) { fprintf(stderr, "errno==E2BIG\n"); }
+- else if (fehlernr==EILSEQ) { fprintf(stderr, "errno==EILSEQ in output_string\n"); }
++ else if (fehlernr==EILSEQ) { fprintf(stderr, "errno==EILSEQ in output_string\n"); fprintf(stderr, "input: %s\n", inp); }
+ else if (fehlernr==EINVAL) { fprintf(stderr, "errno==EINVAL\n"); }
+
+ output[DEF_STR_LEN-outsize] = '\0';
+diff -uwr vilistextum-2.6.7/src/html.c vilistextum-2.6.7-gentoo/src/html.c
+--- vilistextum-2.6.7/src/html.c 2004-12-19 22:08:17.000000000 +0100
++++ vilistextum-2.6.7-gentoo/src/html.c 2004-12-22 17:19:37.000000000 +0100
+@@ -95,9 +95,8 @@
+ while ((ch!='=') && (ch!='>')) {
+ ch=read_char();
+ if (i<DEF_STR_LEN) { attr_name[i++] = ch; }
+- }
+- if (i<DEF_STR_LEN) { attr_name[i-1] = '\0'; }
+- else { attr_name[DEF_STR_LEN-1] = '\0'; }
++ } /* post cond: i<=DEF_STR_LEN */
++ attr_name[i-1] = '\0';
+
+ if (ch=='>') { attr_ctnt[0]='\0'; return '>'; }
+
+@@ -116,11 +115,10 @@
+ i=0;
+ ch=read_char();
+ while(quote!=ch) {
+- if (i<DEF_STR_LEN) { temp[i++] = ch; }
++ if (i<DEF_STR_LEN-1) { temp[i++] = ch; }
+ ch=read_char();
+- }
+- if (i<DEF_STR_LEN) { temp[i] = '\0'; }
+- else { temp[DEF_STR_LEN] = '\0'; }
++ } /* post cond: i<=DEF_STR_LEN-1 */
++ temp[i] = '\0';
+ ch=read_char();
+ }
+ else
+@@ -131,9 +129,8 @@
+ while ((ch!='>') && (!isspace(ch))) {
+ ch=read_char();
+ if (i<DEF_STR_LEN) { temp[i++] = ch; }
+- }
+- if (i<DEF_STR_LEN) { temp[i-1] = '\0'; }
+- else { temp[DEF_STR_LEN-1] = '\0'; }
++ } /* post cond: i<=DEF_STR_LEN */
++ temp[i-1] = '\0';
+ }
+
+ uppercase_str(attr_name);
+diff -uwr vilistextum-2.6.7/src/html_tag.c vilistextum-2.6.7-gentoo/src/html_tag.c
+--- vilistextum-2.6.7/src/html_tag.c 2004-12-19 22:08:20.000000000 +0100
++++ vilistextum-2.6.7-gentoo/src/html_tag.c 2004-12-22 17:23:09.000000000 +0100
+@@ -52,12 +52,10 @@
+ /* read html tag */
+ while ((ch!='>') && (ch!=' ') && (ch!=13) && (ch!=10))
+ {
+- if (i<DEF_STR_LEN) { str[i] = ch; }
+- i++;
++ if (i<DEF_STR_LEN-1) { str[i++] = ch; }
+ ch = uppercase(read_char());
+- }
+- if (i>=DEF_STR_LEN) { str[DEF_STR_LEN] = '\0'; }
+- else { str[i] = '\0';}
++ } /* post cond: i<=DEF_STR_LEN-1 */
++ str[i] = '\0';
+
+ #ifdef debug
+ fprintf(stderr, "html_tag: %ls\n",str);
+@@ -332,6 +330,8 @@
+ else if CMP("/SCRIPT", str) {}
+ else if CMP("STYLE", str) {}
+ else if CMP("/STYLE", str) {}
++ else if CMP("TITLE", str) {}
++ else if CMP("/TITLE", str) {}
+ else { if (errorlevel>=2) { print_error("tag ignored: ", str);} }
+ }
+
+diff -uwr vilistextum-2.6.7/src/main.c vilistextum-2.6.7-gentoo/src/main.c
+--- vilistextum-2.6.7/src/main.c 2004-12-19 22:08:30.000000000 +0100
++++ vilistextum-2.6.7-gentoo/src/main.c 2004-12-22 17:16:05.000000000 +0100
+@@ -253,7 +253,7 @@
+ case 's':
+ shrink_lines = atoi(argument); if (shrink_lines==0) { shrink_lines = 1; } break;
+
+- case 'r': remove_empty_alt = 1; /* printf("remove_empty_alt\n"); */ break;
++ case 'r': remove_empty_alt = 1; break;
+ case 'i':
+ #ifdef MULTIBYTE
+ convert_string(argument, user_image);
+diff -uwr vilistextum-2.6.7/src/text.c vilistextum-2.6.7-gentoo/src/text.c
+--- vilistextum-2.6.7/src/text.c 2004-12-19 22:08:41.000000000 +0100
++++ vilistextum-2.6.7-gentoo/src/text.c 2004-12-22 15:43:26.000000000 +0100
+@@ -249,10 +249,12 @@
+
+ if (!palm)
+ {
++ if (wort_pos+len<DEF_STR_LEN) {
+ while (i<wort_pos+len) { wort[i] = s[j]; j++; i++; }
+ wort[i] = '\0';
+ wort_pos += len;
+ }
++ }
+
+ #ifdef proc_debug
+ printf("wort_plus_string_nocount() ende\n");
+@@ -273,9 +275,11 @@
+ printf("s: %ls len: %d\n", s,len);
+ #endif
+
++ if (wort_pos+len<DEF_STR_LEN) {
+ while (i<wort_pos+len) { wort[i] = s[j]; j++; i++; }
+ wort[i] = '\0';
+ wort_pos += len; wort_len += len;
++ }
+
+ #ifdef proc_debug
+ printf("wort_plus_string() ende\n");
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..395d03a7456f
--- /dev/null
+++ b/app-text/vilistextum/files/vilistextum-2.6.9-blockquote.patch
@@ -0,0 +1,113 @@
+Many clients seem to use blockquote tags to flag quotes these days, so
+write them out as quotes, so they remain readable.
+
+--- vilistextum-2.6.9/src/html_tag.c
++++ vilistextum-2.6.9/src/html_tag.c
+@@ -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('"'); }
+
+--- vilistextum-2.6.9/src/multibyte.h
++++ vilistextum-2.6.9/src/multibyte.h
+@@ -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)
+--- vilistextum-2.6.9/src/text.h
++++ vilistextum-2.6.9/src/text.h
+@@ -26,6 +26,7 @@
+
+ int tab;
+ int spaces;
++int quote;
+
+ void print_zeile();
+ int is_zeile_empty();
+--- vilistextum-2.6.9/src/text.c
++++ vilistextum-2.6.9/src/text.c
+@@ -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); }
+--- vilistextum-2.6.9/tests/check_utf8
++++ vilistextum-2.6.9/tests/check_utf8
+@@ -9,5 +9,6 @@
+ rm -f utf-8-sampler.output.test
+ ../src/vilistextum utf-8-sampler.html utf-8-sampler.output.test
+
+-diff >/dev/null utf-8-sampler.output utf-8-sampler.output.test
++sed 's/^> //' utf-8-sampler.output.test | \
++diff >/dev/null utf-8-sampler.output -
+
+--- vilistextum-2.6.9/tests/utf-8-sampler.output
++++ vilistextum-2.6.9/tests/utf-8-sampler.output
+@@ -100,8 +100,8 @@
+ ვეპხის ტყაოსანი შოთა რუსთაველი
+
+ ღმერთსი შემვედრე, ნუთუ კვლა დამხსნას სოფლისა შრომასა, ცეცხლს, წყალსა და
+-მიწასა, ჰაერთა თანა მრომასა; მომცნეს ფრთენი და აღვფრინდე, მივჰხვდე მას ჩემსა
+-ნდომასა, დღისით და ღამით ვჰხედვიდე მზისა ელვათა კრთომაასა.
++მიწასა, ჰაერთა თანა მრომასა; მომცნეს ფრთენი და აღვფრინდე, მივჰხვდე მას
++ჩემსა ნდომასა, დღისით და ღამით ვჰხედვიდე მზისა ელვათა კრთომაასა.
+
+ Tamil poetry of Cupiramaniya Paarathiyar: சுப்ரமணிய பாரதியார் (1882-1921)
+
+@@ -446,7 +446,8 @@
+ д, п, and/or т:
+
+ Bulgarian:   [ бгдпт ]   [ бгдпт ]   Мога да ям стъкло и не ме боли.
+- Russian: [ бгдпт ]   [ бгдпт ]   Я могу есть стекло, это мне не вредит.
++ Russian: [ бгдпт ]   [ бгдпт ]   Я могу есть стекло, это мне не
++вредит.
+ Serbian: [ бгдпт ]   [ бгдпт ]   Могу јести стакло а да ми не шкоди.
+
+ ------------------------------------------------------------------------
diff --git a/app-text/vilistextum/files/vilistextum-2.6.9-darwin11.patch b/app-text/vilistextum/files/vilistextum-2.6.9-darwin11.patch
new file mode 100644
index 000000000000..bda9f5d39c3e
--- /dev/null
+++ b/app-text/vilistextum/files/vilistextum-2.6.9-darwin11.patch
@@ -0,0 +1,23 @@
+OSX Lion has wcscasecmp, but is not GNU
+
+--- configure.in
++++ configure.in
+@@ -67,6 +67,7 @@
+ dnl Checks for library functions.
+ AC_CHECK_FUNCS(strstr)
+ AC_CHECK_FUNCS(strcasecmp)
++AC_CHECK_FUNCS(wcscasecmp)
+
+ dnl create testsuite
+ dnl AC_CONFIG_TESTDIR([tests])
+--- src/html.c
++++ src/html.c
+@@ -40,7 +40,7 @@
+ link_inline[DEF_STR_LEN]; /* Link of a HTML-Tag */
+
+ /* ------------------------------------------------ */
+-#if defined(MULTIBYTE) && ! defined(__GNU_LIBRARY__)
++#if defined(MULTIBYTE) && ! defined(HAVE_WCSCASECMP)
+ #include <wchar.h>
+ static int wcscasecmp(const wchar_t *s1, const wchar_t *s2)
+ {
diff --git a/app-text/vilistextum/files/vilistextum-2.6.9-gentoo.diff b/app-text/vilistextum/files/vilistextum-2.6.9-gentoo.diff
new file mode 100644
index 000000000000..42db519b080a
--- /dev/null
+++ b/app-text/vilistextum/files/vilistextum-2.6.9-gentoo.diff
@@ -0,0 +1,22 @@
+diff -ur vilistextum-2.6.9/src/Makefile.am vilistextum-2.6.9.new/src/Makefile.am
+--- vilistextum-2.6.9/src/Makefile.am 2006-10-24 01:48:54.000000000 +0700
++++ vilistextum-2.6.9.new/src/Makefile.am 2006-11-20 09:51:24.000000000 +0700
+@@ -6,7 +6,7 @@
+ main.c main.h util.c util.h \
+ multibyte.h unicode_entities.c unicode_entities.h
+
+-AM_CFLAGS = -Wall -O2 -ansi
++AM_CFLAGS = -Wall -ansi
+ AM_LDFLAGS = $(STATIC)
+
+ EXTRA_DIST = kilistextum.kaptn
+diff -ur vilistextum-2.6.9/tests/Makefile.am vilistextum-2.6.9.new/tests/Makefile.am
+--- vilistextum-2.6.9/tests/Makefile.am 2004-07-06 19:06:20.000000000 +0700
++++ vilistextum-2.6.9.new/tests/Makefile.am 2006-11-20 09:51:05.000000000 +0700
+@@ -16,5 +16,5 @@
+
+ test: check
+
+-all: check
++all:
+
diff --git a/app-text/vilistextum/files/vilistextum-2.6.9-prefix.patch b/app-text/vilistextum/files/vilistextum-2.6.9-prefix.patch
new file mode 100644
index 000000000000..1ff76250db13
--- /dev/null
+++ b/app-text/vilistextum/files/vilistextum-2.6.9-prefix.patch
@@ -0,0 +1,27 @@
+* don't look in /usr/local
+* try to hack around not being able to use AM_ICONV
+
+--- configure.in.orig 2006-10-23 22:20:19 +0200
++++ configure.in 2010-03-18 19:32:13 +0100
+@@ -21,10 +21,6 @@
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(getopt.h)
+
+-dnl add /usr/local
+-CFLAGS="$CFLAGS -I/usr/local/include"
+-LDFLAGS="$LDFLAGS -L/usr/local/lib"
+-
+ dnl checking for options
+ AC_MSG_CHECKING(if --enable-multibyte specified)
+ AC_ARG_ENABLE(multibyte,
+@@ -41,7 +37,9 @@
+ AC_CHECK_HEADERS(iconv.h,,
+ AC_MSG_ERROR(Need libiconv or iconv.h for multibyte support))
+
+-AC_CHECK_LIB(iconv, iconv,,
++dnl iconv_open_into is implemented only in GNU libiconv and not in other
++dnl iconv implementations
++AC_CHECK_LIB(iconv, libiconv_open_into,,
+ AC_MSG_WARN([Generic iconv found but not libiconv. See INSTALL for details]))
+
+ dnl setting INTERNAL_LOCALE
diff --git a/app-text/vilistextum/metadata.xml b/app-text/vilistextum/metadata.xml
new file mode 100644
index 000000000000..f23b9cae1593
--- /dev/null
+++ b/app-text/vilistextum/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>shell-tools</herd>
+</pkgmetadata>
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..37d6d7338e90
--- /dev/null
+++ b/app-text/vilistextum/vilistextum-2.6.9-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+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
+ 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() {
+ default
+ dohtml doc/*.html
+}