diff options
Diffstat (limited to 'app-text/antiword')
-rw-r--r-- | app-text/antiword/Manifest | 2 | ||||
-rw-r--r-- | app-text/antiword/antiword-0.37-r1.ebuild | 51 | ||||
-rw-r--r-- | app-text/antiword/files/antiword-0.37-CVE-2014-8123.patch | 17 | ||||
-rw-r--r-- | app-text/antiword/files/antiword-0.37-prefix.patch | 71 | ||||
-rw-r--r-- | app-text/antiword/metadata.xml | 17 |
5 files changed, 158 insertions, 0 deletions
diff --git a/app-text/antiword/Manifest b/app-text/antiword/Manifest new file mode 100644 index 000000000000..7ce28e26fd26 --- /dev/null +++ b/app-text/antiword/Manifest @@ -0,0 +1,2 @@ +DIST antiword-0.37.tar.gz 317884 SHA256 8e2c000fcbc6d641b0e6ff95e13c846da3ff31097801e86702124a206888f5ac SHA512 6cd8fb9137238417544cf8754829a2d5296055d730ea62a8a025236baa79516190317d146401ff40cde73e1ee2c3c374a2ea01b2e5d24e149310bcabb8bfdce8 WHIRLPOOL 653299ddeba3c153651a664abe12d9c9960227289cfada037574d97dbb3a1a2bf958571815ce6995e38ce7a197714b1852a39aebae108986cb74e861e948c7e3 +DIST antiword-gentoo-patches-r2.tar.bz2 1747 SHA256 62de6106d47e80a5e890bfbe4d2c85c5c78022e196857a4fca035c7c035d583d SHA512 45ed3ee1c514a9ee78bc8963e56be18426b47ea628f02934dbcec83c2d632162e458f75f998da438daae4794fcce36fd8922a172804c0fc83c6f32c9a8092ffe WHIRLPOOL e3a578c1bb082378f0db480aaab640f56f53e23fb35416a04e06803a8fdbd0193f0fbe33cce074dad00d13feada2bc97ce62dae460123047bbe80cd49994b445 diff --git a/app-text/antiword/antiword-0.37-r1.ebuild b/app-text/antiword/antiword-0.37-r1.ebuild new file mode 100644 index 000000000000..08dbb9b81427 --- /dev/null +++ b/app-text/antiword/antiword-0.37-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils toolchain-funcs + +IUSE="kde" +PATCHVER="r2" +DESCRIPTION="free MS Word reader" +HOMEPAGE="http://www.winfield.demon.nl" +SRC_URI="http://www.winfield.demon.nl/linux/${P}.tar.gz + http://dev.gentoo.org/~grobian/distfiles/${PN}-gentoo-patches-${PATCHVER}.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="alpha amd64 ~hppa ppc ppc64 sparc x86 ~ppc-aix ~ia64-hpux ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" + +src_prepare() { + # Makefile is a symlink to Makefile.Linux, avoid that we patch it by + # accident using patch <2.7, see bug #435492 + rm Makefile || die + + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PN}-gentoo-patches-${PATCHVER}" + + # Re-add convenience symlink, see above + ln -s Makefile.Linux Makefile + + epatch "${FILESDIR}"/${P}-CVE-2014-8123.patch +} + +src_configure() { :; } + +src_compile() { + emake PREFIX="${EPREFIX}" OPT="${CFLAGS}" CC="$(tc-getCC)" LD="$(tc-getCC)" \ + LDFLAGS="${LDFLAGS}" || die "emake failed" +} + +src_install() { + emake -j1 PREFIX="${EPREFIX}" DESTDIR="${D}" global_install || die + + use kde || rm -f "${ED}"/usr/bin/kantiword + + insinto /usr/share/${PN}/examples + doins Docs/testdoc.doc Docs/antiword.php || die + + cd Docs + doman antiword.1 || die + dodoc ChangeLog Exmh Emacs FAQ History Netscape QandA ReadMe Mozilla Mutt || die +} diff --git a/app-text/antiword/files/antiword-0.37-CVE-2014-8123.patch b/app-text/antiword/files/antiword-0.37-CVE-2014-8123.patch new file mode 100644 index 000000000000..8b6baf9b2ca2 --- /dev/null +++ b/app-text/antiword/files/antiword-0.37-CVE-2014-8123.patch @@ -0,0 +1,17 @@ +index 8a95fb9..7797d1f 100644 +--- a/wordole.c ++++ b/wordole.c +@@ -259,6 +259,11 @@ bGetPPS(FILE *pFile, + } + tNameSize = (size_t)usGetWord(0x40, aucBytes); + tNameSize = (tNameSize + 1) / 2; ++ if (tNameSize >= sizeof(atPPSlist[0].szName)) { ++ werr(0, "PPS %d appears to be invalid.", iIndex); ++ atPPSlist = xfree(atPPSlist); ++ return FALSE; ++ } + vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize); + atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes); + if (atPPSlist[iIndex].ucType == 5) { +-- +2.1.2 diff --git a/app-text/antiword/files/antiword-0.37-prefix.patch b/app-text/antiword/files/antiword-0.37-prefix.patch new file mode 100644 index 000000000000..40053696f52e --- /dev/null +++ b/app-text/antiword/files/antiword-0.37-prefix.patch @@ -0,0 +1,71 @@ +--- antiword.h ++++ antiword.h +@@ -191,43 +191,11 @@ + #define FONT_SANS_SERIF_ITALIC "Helvetica-Oblique" + #define FONT_SANS_SERIF_BOLDITALIC "Helvetica-BoldOblique" + /* The name of the antiword directories and the font information file */ +-#if defined(__dos) +-#define GLOBAL_ANTIWORD_DIR "C:\\antiword" +-#define ANTIWORD_DIR "antiword" +-#define FONTNAMES_FILE "fontname.txt" +-#elif defined(__amigaos) +-#define GLOBAL_ANTIWORD_DIR "SYS:.antiword" +-#define ANTIWORD_DIR ".antiword" +-#define FONTNAMES_FILE "fontnames" +-#elif defined(N_PLAT_NLM) +-#define GLOBAL_ANTIWORD_DIR "SYS:/antiword" +-#define ANTIWORD_DIR "antiword" +-#define FONTNAMES_FILE "fontname.txt" +-#elif defined(__vms) +-#define GLOBAL_ANTIWORD_DIR "/usr/share/antiword" +-#define ANTIWORD_DIR "antiword" +-#define FONTNAMES_FILE "fontnames" +-#elif defined(__BEOS__) +-#define GLOBAL_ANTIWORD_DIR "/boot/home/config/apps/antiword" +-#define ANTIWORD_DIR "antiword" +-#define FONTNAMES_FILE "fontnames" +-#elif defined(__CYGMING__) +-#define GLOBAL_ANTIWORD_DIR "C:\\antiword" +-#define ANTIWORD_DIR "antiword" +-#define FONTNAMES_FILE "fontnames" +-#elif defined(__Plan9__) +-#define GLOBAL_ANTIWORD_DIR "/sys/lib/antiword" +-#define ANTIWORD_DIR "lib/antiword" +-#define FONTNAMES_FILE "fontnames" +-#elif defined(__sun__) +-#define GLOBAL_ANTIWORD_DIR "/usr/local/share/antiword" ++#ifndef GLOBAL_ANTIWORD_DIR ++#error "GLOBAL_ANTIWORD_DIR is unset!" ++#endif + #define ANTIWORD_DIR ".antiword" + #define FONTNAMES_FILE "fontnames" +-#else /* All others */ +-#define GLOBAL_ANTIWORD_DIR "/usr/share/antiword" +-#define ANTIWORD_DIR ".antiword" +-#define FONTNAMES_FILE "fontnames" +-#endif /* __dos */ + /* The names of grouped mapping files */ + /* ASCII */ + #define MAPPING_FILE_CP437 "cp437.txt" +--- Makefile ++++ Makefile +@@ -36,8 +36,8 @@ + LOCAL_INSTALL_DIR = $(HOME)/bin + LOCAL_RESOURCES_DIR = $(HOME)/.antiword + +-GLOBAL_INSTALL_DIR = /usr/bin +-GLOBAL_RESOURCES_DIR = /usr/share/antiword ++GLOBAL_INSTALL_DIR = $(PREFIX)/usr/bin ++GLOBAL_RESOURCES_DIR = $(PREFIX)/usr/share/antiword + + all: $(PROGS) + +@@ -83,7 +83,7 @@ + @chmod 750 $@ + + .c.o: +- $(CC) $(CFLAGS) -c $< ++ $(CC) $(CFLAGS) '-DGLOBAL_ANTIWORD_DIR="$(GLOBAL_RESOURCES_DIR)"' -c $< + + main_u.o: version.h + postscript.o: version.h diff --git a/app-text/antiword/metadata.xml b/app-text/antiword/metadata.xml new file mode 100644 index 000000000000..aaaf98dcc446 --- /dev/null +++ b/app-text/antiword/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>grobian@gentoo.org</email> + <name>Fabian Groffen</name> + </maintainer> + <maintainer> + <email>clabbe.montjoie@gmail.com</email> + <name>LABBE Corentin (Montjoie)</name> + <description>Maintainer. Assign bugs to him</description> + </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:antiword_project:antiword</remote-id> + </upstream> +</pkgmetadata> |