Add patch from Fredrik Hedberg to stop files being opened for read/write.
authorDaniel Drake <dsd@gentoo.org>
Thu, 6 Oct 2005 22:14:51 +0000 (22:14 +0000)
committerDaniel Drake <dsd@gentoo.org>
Thu, 6 Oct 2005 22:14:51 +0000 (22:14 +0000)
Package-Manager: portage-1.589-cvs

app-text/wv/ChangeLog
app-text/wv/Manifest
app-text/wv/files/digest-wv-1.0.3-r1 [new file with mode: 0644]
app-text/wv/files/wv-1.0.3-libole2-readonly.patch [new file with mode: 0644]
app-text/wv/wv-1.0.3-r1.ebuild [new file with mode: 0644]

index 4b032b922c1f504915e8b09f56c649c14f575648..4bbd214464da1e4fef029a0bc4a1baa35f711d22 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for app-text/wv
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/wv/ChangeLog,v 1.25 2005/04/26 09:14:49 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/wv/ChangeLog,v 1.26 2005/10/06 22:14:51 dsd Exp $
+
+*wv-1.0.3-r1 (06 Oct 2005)
+
+  06 Oct 2005; Daniel Drake <dsd@gentoo.org>
+  +files/wv-1.0.3-libole2-readonly.patch, +wv-1.0.3-r1.ebuild:
+  Add patch from Fredrik Hedberg to stop files being opened for read/write.
 
   26 Apr 2005; Martin Schlemmer <azarah@gentoo.org>
   +files/wv-1.0.3-gcc4.patch, wv-1.0.3.ebuild:
index 3f72db1a3659b714fa74f87f60186f695451651b..4476c3fdf9167e381afbe2ae8ab600baa474ecf9 100644 (file)
@@ -1,18 +1,21 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 2a1f4f0053f65564cdaaafaf9c71b8d2 ChangeLog 2715
+MD5 6335e6111535a1ebd438e329cee9694e wv-1.0.0-r1.ebuild 1052
+MD5 0577e093bf220e56cb0c3072451c3f0b wv-1.0.3-r1.ebuild 1213
 MD5 4e910ed161d84f6c609edce01a082529 wv-1.0.3.ebuild 1140
+MD5 dadfa1fe3e6969fbbf48893d177fc5a0 ChangeLog 2925
 MD5 525c7299058f839eff524bc25c39267e metadata.xml 345
-MD5 6335e6111535a1ebd438e329cee9694e wv-1.0.0-r1.ebuild 1052
-MD5 a1897cf5f55250ffef22b746b2b277f7 files/wv-1.0.3-gcc4.patch 1131
-MD5 79e495e6bfc4b192499c4d28f631ea01 files/digest-wv-1.0.3 60
 MD5 97079efa2a5256ad07ada6260b7ec298 files/digest-wv-1.0.0-r1 60
+MD5 79e495e6bfc4b192499c4d28f631ea01 files/digest-wv-1.0.3-r1 60
 MD5 29b026d4ff443552a80797b397d37ec6 files/wv-1.0.0-fix_overflow.patch 1693
+MD5 a1897cf5f55250ffef22b746b2b277f7 files/wv-1.0.3-gcc4.patch 1131
+MD5 f7e6bc9c507c536f3b48679fe2dfafba files/wv-1.0.3-libole2-readonly.patch 1053
+MD5 79e495e6bfc4b192499c4d28f631ea01 files/digest-wv-1.0.3 60
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
+Version: GnuPG v1.4.2 (GNU/Linux)
 
-iD8DBQFCbgeV1ZcsMnZjRyIRAofhAKCKR5gJNz9b2+Jke9zleONkqxBYxgCdF3zQ
-AnFnFEmNOFnhMSi1yn+yQw0=
-=DZYn
+iD8DBQFDRaHsTOXg++0VvJQRAu1HAJ4h6Bk4WqtE5IawsmHsl+O60hKV9wCeO9ZJ
+T0rY+ygPcD5Sp95Qi8idWWo=
+=Uxhm
 -----END PGP SIGNATURE-----
diff --git a/app-text/wv/files/digest-wv-1.0.3-r1 b/app-text/wv/files/digest-wv-1.0.3-r1
new file mode 100644 (file)
index 0000000..a4593f8
--- /dev/null
@@ -0,0 +1 @@
+MD5 71e42aa9af1e03cc8c608bbbdcb43af8 wv-1.0.3.tar.gz 857412
diff --git a/app-text/wv/files/wv-1.0.3-libole2-readonly.patch b/app-text/wv/files/wv-1.0.3-libole2-readonly.patch
new file mode 100644 (file)
index 0000000..aff8929
--- /dev/null
@@ -0,0 +1,32 @@
+From http://users.avafan.com/~fredrik/beagle/wv-libole2-readonly.patch
+See http://mail.gnome.org/archives/dashboard-hackers/2005-August/msg00018.html
+
+--- libole2/ms-ole.c-old       2004-10-22 20:59:51.000000000 -0400
++++ libole2/ms-ole.c   2005-08-03 10:06:14.000000000 -0400
+@@ -1723,7 +1723,7 @@
+                gboolean try_mmap,
+                MsOleSysWrappers *wrappers)
+ {
+-      int prot = PROT_READ | PROT_WRITE;
++      int prot = PROT_READ;
+       MsOle *f;
+       MsOleHandleType file;
+ 
+@@ -1737,15 +1737,9 @@
+       f = *fs = ms_ole_new ();
+       take_wrapper_functions (f, wrappers);
+ 
+-      f->file_des = file = f->syswrap->open2 (name, O_RDWR, f->syswrap->closure);
++      f->file_des = file = f->syswrap->open2 (name, O_RDONLY, f->syswrap->closure);
+       f->ref_count = 0;
+-      f->mode = 'w';
+-
+-      if (file == BAD_MSOLE_HANDLE) {
+-              f->file_des = file = f->syswrap->open2 (name, O_RDONLY, f->syswrap->closure);
+-              f->mode = 'r';
+-              prot &= ~PROT_WRITE;
+-      }
++      f->mode = 'r';
+ 
+       if ((file == BAD_MSOLE_HANDLE) || !(f->syswrap->isregfile (file, f->syswrap->closure))) {
+               g_warning ("No such file '%s'\n", name);
diff --git a/app-text/wv/wv-1.0.3-r1.ebuild b/app-text/wv/wv-1.0.3-r1.ebuild
new file mode 100644 (file)
index 0000000..0fde026
--- /dev/null
@@ -0,0 +1,59 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/wv/wv-1.0.3-r1.ebuild,v 1.1 2005/10/06 22:14:51 dsd Exp $
+
+inherit eutils
+
+DESCRIPTION="Tool for conversion of MSWord doc and rtf files to something readable"
+SRC_URI="mirror://sourceforge/wvware/${P}.tar.gz"
+HOMEPAGE="http://wvware.sourceforge.net"
+
+IUSE="xml2 wmf"
+KEYWORDS="~x86 ~ppc ~sparc ~hppa ~alpha ~ia64 ~amd64 ~ppc64"
+SLOT="0"
+LICENSE="GPL-2"
+
+RDEPEND="sys-libs/zlib
+       dev-libs/glib
+       media-libs/libpng
+       wmf? ( >=media-libs/libwmf-0.2.2 )
+       xml2? ( dev-libs/libxml2 )"
+
+DEPEND="${RDEPEND}
+       dev-util/pkgconfig"
+
+src_unpack() {
+
+       unpack ${A}
+
+       cd ${S}
+       # Fix building with gcc4 (namespace collide with libxml2)
+       epatch ${FILESDIR}/${P}-gcc4.patch
+
+       # Open file as readonly
+       epatch ${FILESDIR}/${P}-libole2-readonly.patch
+}
+
+src_compile() {
+
+       econf \
+               `use_with xml2 libxml2` \
+               `use_with wmf libwmf` \
+               --with-docdir=/usr/share/doc/${PF} \
+               || die
+
+       make || die
+
+}
+
+src_install () {
+
+       einstall
+
+       insinto /usr/include
+       doins wvinternal.h
+
+       rm -f ${D}/usr/share/man/man1/wvConvert.1
+       dosym  /usr/share/man/man1/wvWare.1 /usr/share/man/man1/wvConvert.1
+
+}