From a31726101fbd16c0520916c2e075012f36f13b93 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 26 Jul 2016 18:35:15 -0400 Subject: [PATCH] app-dicts/wordnet: new revision fixing two bugs. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This package is unmaintained and has two open bugs. The first has a patch, thanks to Edgar Gonzàlez i Pellicer, which fixes a problem introduced by an earlier patch. It is now applied. The second bug reports that the package's SRC_URI is no longer valid, so I have updated it from the homepage. The ebuild was updated to EAPI=6 in the process. This allowed the removal of multilib.eclass in exchange for a call to eapply_user. Gentoo-Bug: 314799 Gentoo-Bug: 543946 Package-Manager: portage-2.2.28 --- .../wordnet-3.0-fix-indexing-bug-314799.patch | 20 +++++ app-dicts/wordnet/wordnet-3.0-r5.ebuild | 76 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 app-dicts/wordnet/files/wordnet-3.0-fix-indexing-bug-314799.patch create mode 100644 app-dicts/wordnet/wordnet-3.0-r5.ebuild diff --git a/app-dicts/wordnet/files/wordnet-3.0-fix-indexing-bug-314799.patch b/app-dicts/wordnet/files/wordnet-3.0-fix-indexing-bug-314799.patch new file mode 100644 index 000000000000..fafaa2c331d7 --- /dev/null +++ b/app-dicts/wordnet/files/wordnet-3.0-fix-indexing-bug-314799.patch @@ -0,0 +1,20 @@ +diff -p -u -r WordNet-3.0/lib/morph.c WordNet-3.0-mine/lib/morph.c +--- a/lib/morph.c 2010-04-12 13:53:04.000000000 +0200 ++++ b/lib/morph.c 2010-04-12 13:54:53.000000000 +0200 +@@ -375,14 +375,14 @@ static char *exc_lookup(char *word, int + static char line[WORDBUF], *beglp, *endlp; + char *excline; + +- if (exc_fps[pos] == NULL) ++ if (exc_fps[pos-1] == NULL) + return(NULL); + + /* first time through load line from exception file */ + if(word != NULL){ + if (strlen(word) > WORDBUF - 1) + return(NULL); +- if ((excline = bin_search(word, exc_fps[pos])) != NULL) { ++ if ((excline = bin_search(word, exc_fps[pos-1])) != NULL) { + strcpy(line, excline); + endlp = strchr(line,' '); + } else diff --git a/app-dicts/wordnet/wordnet-3.0-r5.ebuild b/app-dicts/wordnet/wordnet-3.0-r5.ebuild new file mode 100644 index 000000000000..e3018e460a13 --- /dev/null +++ b/app-dicts/wordnet/wordnet-3.0-r5.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit autotools eutils flag-o-matic + +DESCRIPTION="A lexical database for the English language" +HOMEPAGE="http://wordnet.princeton.edu/" +SRC_URI=" + http://wordnetcode.princeton.edu/${PV}/WordNet-${PV}.tar.gz + mirror://gentoo/${P}-patchset-1.tar.bz2" +LICENSE="Princeton" + +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="doc" + +# In contrast to what the configure script seems to imply, Tcl/Tk is NOT +# optional. cf. bug 163478 for details. (Yes, it's about 2.1 but it's +# still the same here.) +DEPEND=" + dev-lang/tcl:0= + dev-lang/tk:0=" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/WordNet-${PV}" + +PATCHES=( + # Don't install into PREFIX/dict but PREFIX/share/wordnet/dict + "${WORKDIR}/${P}-dict-location.patch" + # Fixes bug 130024, make an additional shared lib + "${WORKDIR}/${P}-shared-lib.patch" + # Don't install the docs directly into PREFIX/doc but PREFIX/doc/PN + "${WORKDIR}/${P}-docs-path.patch" + "${WORKDIR}"/${P}-CVE-2008-3908.patch #211491 + "${WORKDIR}"/${P}-CVE-2008-2149.patch #211491 + + "${FILESDIR}"/${P}-tcl8.6.patch + "${FILESDIR}"/${P}-format-security.patch + "${FILESDIR}"/${P}-src_stubs_c.patch + "${FILESDIR}"/${P}-fix-indexing-bug-314799.patch +) + +src_prepare() { + epatch ${PATCHES[@]} + eapply_user + + # Don't install all the extra docs (html, pdf, ps) without doc USE flag. + if ! use doc; then + sed -i -e "s:SUBDIRS =.*:SUBDIRS = man:" doc/Makefile.am || die + fi + + # Drop installation of OLD tk.h headers #255590 + sed '/^SUBDIRS/d' -i include/Makefile.am || die + sed 's: include/tk/Makefile::' -i configure.ac || die + rm -rf include/tk/ || die + + rm -f configure || die + eautoreconf + MAKEOPTS+=" -e" +} + +src_configure() { + append-cppflags -DUNIX -I"${T}"/usr/include + + PLATFORM=linux WN_ROOT="${T}/usr" \ + WN_DICTDIR="${T}/usr/share/wordnet/dict" \ + WN_MANDIR="${T}/usr/share/man" \ + WN_DOCDIR="${T}/usr/share/doc/wordnet-${PV}" \ + WNHOME="${EPREFIX}/usr/share/wordnet" \ + econf \ + --with-tcl="${EPREFIX}"/usr/$(get_libdir) \ + --with-tk="${EPREFIX}"/usr/$(get_libdir) +} -- 2.26.2