summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Shapovalov <george@gentoo.org>2002-04-19 21:53:06 +0000
committerGeorge Shapovalov <george@gentoo.org>2002-04-19 21:53:06 +0000
commit2a32c7e184fd05660bd2afa4abef7a7af56c6f63 (patch)
tree05b84f0a1dba2dcbd02cdb3f3965361e3fc8c680 /app-text/wv
parentadded libwmf - a library to convert windows wmf files to something else. (diff)
downloadgentoo-2-2a32c7e184fd05660bd2afa4abef7a7af56c6f63.tar.gz
gentoo-2-2a32c7e184fd05660bd2afa4abef7a7af56c6f63.tar.bz2
gentoo-2-2a32c7e184fd05660bd2afa4abef7a7af56c6f63.zip
added wv (formerly mswordview) - a command line util to convert MSWord docs to something
readable.
Diffstat (limited to 'app-text/wv')
-rw-r--r--app-text/wv/ChangeLog11
-rw-r--r--app-text/wv/files/digest-wv-0.7.11
-rw-r--r--app-text/wv/files/wv-0.7.1-rvt.patch155
-rw-r--r--app-text/wv/wv-0.7.1.ebuild51
4 files changed, 218 insertions, 0 deletions
diff --git a/app-text/wv/ChangeLog b/app-text/wv/ChangeLog
new file mode 100644
index 000000000000..aed381911e34
--- /dev/null
+++ b/app-text/wv/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for app-text/wv
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
+# /space/gentoo/cvsroot/gentoo-x86/dev-lang/swig/ChangeLog,v 1.1 2002/02/01 21:53:11 gbevin Exp
+
+*wv-0.7.1 (8 Feb 2002)
+
+ 19 Apr 2002; G.Shapovalov <georges@its.caltech.edu> all_files :
+
+ initial release. This is wv, formerly known as mswordview. This is a utility (or set of) which
+ can convert MSWord files to different formats from clear text, html, tex, etc. to ps, pdf.
+
diff --git a/app-text/wv/files/digest-wv-0.7.1 b/app-text/wv/files/digest-wv-0.7.1
new file mode 100644
index 000000000000..9ce34dc9b76a
--- /dev/null
+++ b/app-text/wv/files/digest-wv-0.7.1
@@ -0,0 +1 @@
+MD5 f4bf6e9efd6c6eccaad02d3f315beb75 wv-0.7.1.tar.gz 1259264
diff --git a/app-text/wv/files/wv-0.7.1-rvt.patch b/app-text/wv/files/wv-0.7.1-rvt.patch
new file mode 100644
index 000000000000..080bcf8f1675
--- /dev/null
+++ b/app-text/wv/files/wv-0.7.1-rvt.patch
@@ -0,0 +1,155 @@
+diff -Naur wv/escher.c wv.mod/escher.c
+--- wv/escher.c Wed Apr 11 01:27:47 2001
++++ wv.mod/escher.c Wed Jan 16 13:33:08 2002
+@@ -215,8 +215,7 @@
+ count +=
+ wvGetSpgrContainer (&
+ (item->spgrcontainer
+- [item->no_spgrcontainer - 1]),
+-&amsofbh, fd);
++ [item->no_spgrcontainer - 1]), &amsofbh, fd);
+ break;
+ default:
+ count += wvEatmsofbt (&amsofbh, fd);
+@@ -303,8 +302,7 @@
+ count +=
+ wvGetSpgrContainer (&
+ (item->spgrcontainer
+- [item->no_spgrcontainer - 1]),
+-&amsofbh, fd);
++ [item->no_spgrcontainer - 1]), &amsofbh, fd);
+ break;
+ default:
+ count += wvEatmsofbt (&amsofbh, fd);
+@@ -684,10 +682,14 @@
+ U32
+ wvEatmsofbt (MSOFBH * amsofbh, wvStream * fd)
+ {
++ /* Ries (rvt@dds.nl)
++ Changed read to bound to 32bit instead of 8bit
++ MS prolly does 32 bit bounderaries ??? */
+ U32 i;
+- for (i = 0; i < amsofbh->cbLength; i++)
+- read_8ubit (fd);
+- return (amsofbh->cbLength);
++ U32 check=(amsofbh->cbLength + 3) >> 2;
++ for (i = 0; i < check; i++)
++ read_32ubit (fd);
++ return (check << 2);
+ }
+
+ void
+diff -Naur wv/picf.c wv.mod/picf.c
+--- wv/picf.c Wed Jan 2 20:33:34 2002
++++ wv.mod/picf.c Wed Jan 16 13:33:08 2002
+@@ -218,13 +218,19 @@
+ break;
+ default:
+ {
+- U32 len = entry - 2;
++ U32 lene2 = entry - 2;
+ U32 i;
+ wvTrace (
+- ("len is %d, predict end of %x\n", len,
++ ("lene2 is %d, predict end of %x\n", len,
+ wvStream_tell (fd) + (entry - 2) * 2));
+- for (i = 0; i < len; i++)
++ /* RIES (rvt@dds.nl)
++ prolly a dirty patch because I check count
++ everytime it's incremnented against lene2.
++ This seems twork very well I tried it on around 15.000
++ word documents and it seems to work! */
++ for (i = 0; i < lene2; i++)
+ {
++ if ( (count + 1) >= len) return (count);
+ test = read_16ubit (fd);
+ if ((i == 0)
+ && ((test == 0x0f43) || (test == 0x0b41)))
+@@ -232,11 +238,13 @@
+ wvTrace (
+ ("Found a Bitmap, Will strip header and return with bitmap data\n"));
+ count += 2;
++ if ( (count + 1) >= len) return (count);
+ pad = test;
+ test = read_32ubit (fd); /*0x00cc0020 */
+ if (test != 0x00cc0020)
+ wvTrace (("Old Graphic\n"));
+ count += 4;
++ if ( (count + 1) >= len) return (count);
+
+ if (pad == 0x0f43)
+ {
+@@ -244,20 +252,26 @@
+ if (test != 0x0000)
+ wvTrace (("Old Graphic\n"));
+ count += 2;
++ if ( (count + 1) >= len) return (count);
+ }
+
+ read_16ubit (fd); /*width */
+ count += 2;
++ if ( (count + 1) >= len) return (count);
+ read_16ubit (fd); /*height */
+ count += 2;
++ if ( (count + 1) >= len) return (count);
+ test = read_32ubit (fd); /*0x00000000L */
+ if (test != 0x00000000L)
+ wvTrace (("Old Graphic\n"));
+ count += 4;
++ if ( (count + 1) >= len) return (count);
+ read_16ubit (fd); /*width */
+ count += 2;
++ if ( (count + 1) >= len) return (count);
+ read_16ubit (fd); /*height */
+ count += 2;
++ if ( (count + 1) >= len) return (count);
+ test = read_32ubit (fd); /*0x00000000L */
+ if (test != 0x00000000L)
+ wvTrace (("Old Graphic\n"));
+@@ -265,6 +279,7 @@
+ return (count);
+ }
+ count += 2;
++ if ( (count + 1) >= len) return (count);
+ }
+ }
+ break;
+diff -Naur wv/wvText.in wv.mod/wvText.in
+--- wv/wvText.in Sun Mar 11 20:00:24 2001
++++ wv.mod/wvText.in Wed Jan 16 13:33:08 2002
+@@ -3,6 +3,7 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datadir=@datadir@
++tmpdir=/tmp
+
+ # argument checking
+ if [ ${#} -ne "2" ]; then
+@@ -29,23 +30,23 @@
+ fi
+
+ # intermediate file
+- TMP_FILE="/tmp/wv$$.html"
++ TMP_FILE="wv$$.html"
+
+- wvHtml "${1}" "${TMP_FILE}" >/dev/null 2>&1
++ wvHtml "${1}" --targetdir="${tmpdir}" "${TMP_FILE}" >/dev/null 2>&1
+ if [ ${?} -ne "0" ]; then
+ echo "Could not convert into HTML"
+ exit 1
+ fi
+
+ # lynx actually does quite well
+- TERM=vt100 lynx -dump -force_html "${TMP_FILE}" > "${2}"
++ TERM=vt100 lynx -dump -force_html "${tmpdir}/${TMP_FILE}" > "${2}"
+ if [ ${?} -ne "0" ]; then
+ echo "Could not convert into Text"
+ exit 1
+ fi
+
+ # clean up
+- rm -f ${TMP_FILE}
++ rm -f "${tmpdir}/${TMP_FILE}"
+
+ else
+ # fall back onto our cruddy output
diff --git a/app-text/wv/wv-0.7.1.ebuild b/app-text/wv/wv-0.7.1.ebuild
new file mode 100644
index 000000000000..55a054f68ea8
--- /dev/null
+++ b/app-text/wv/wv-0.7.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2001 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License
+# Maintainer: George Shapovalov <georges@cco.caltech.edu>
+# /space/gentoo/cvsroot/gentoo-x86/dev-libs/libwmf/libwmf-0.2.2.ebuild,v 1.2 2002/01/24 19:40:43 karltk Exp
+
+
+
+S=${WORKDIR}/${P}
+DESCRIPTION="tool for convertion of MSWord doc and rtf files to something readable"
+SRC_URI="http://prdownloads.sourceforge.net/wvware/wv-0.7.1.tar.gz"
+HOMEPAGE="http://www.wvware.com"
+
+DEPEND="virtual/glibc
+ >=sys-devel/gcc-2.95.2
+ >=media-libs/libwmf-0.2.2
+ >=media-libs/freetype-2.0.1
+ sys-libs/zlib
+ media-libs/libpng"
+
+RDEPEND="media-gfx/imagemagick"
+
+rc_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ patch -p1 < ${FILESDIR}/wv-0.7.1-rvt.patch
+}
+
+
+src_compile() {
+
+ unset CXXFLAGS
+ unset CFLAGS
+
+ ./configure \
+ --host=${CHOST} \
+ --prefix=/usr \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ --with-docdir=/usr/share/doc/${PF} || die "./configure failed"
+
+ emake || die
+}
+
+src_install () {
+ make \
+ prefix=${D}/usr \
+ mandir=${D}/usr/share/man \
+ infodir=${D}/usr/share/info \
+ install || die
+}