1 |
commit: a31726101fbd16c0520916c2e075012f36f13b93 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 26 22:35:15 2016 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 26 22:35:37 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3172610 |
7 |
|
8 |
app-dicts/wordnet: new revision fixing two bugs. |
9 |
|
10 |
This package is unmaintained and has two open bugs. The first has a |
11 |
patch, thanks to Edgar Gonzàlez i Pellicer, which fixes a problem |
12 |
introduced by an earlier patch. It is now applied. The second bug |
13 |
reports that the package's SRC_URI is no longer valid, so I have |
14 |
updated it from the homepage. |
15 |
|
16 |
The ebuild was updated to EAPI=6 in the process. This allowed the |
17 |
removal of multilib.eclass in exchange for a call to eapply_user. |
18 |
|
19 |
Gentoo-Bug: 314799 |
20 |
Gentoo-Bug: 543946 |
21 |
|
22 |
Package-Manager: portage-2.2.28 |
23 |
|
24 |
.../wordnet-3.0-fix-indexing-bug-314799.patch | 20 ++++++ |
25 |
app-dicts/wordnet/wordnet-3.0-r5.ebuild | 76 ++++++++++++++++++++++ |
26 |
2 files changed, 96 insertions(+) |
27 |
|
28 |
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 |
29 |
new file mode 100644 |
30 |
index 0000000..fafaa2c |
31 |
--- /dev/null |
32 |
+++ b/app-dicts/wordnet/files/wordnet-3.0-fix-indexing-bug-314799.patch |
33 |
@@ -0,0 +1,20 @@ |
34 |
+diff -p -u -r WordNet-3.0/lib/morph.c WordNet-3.0-mine/lib/morph.c |
35 |
+--- a/lib/morph.c 2010-04-12 13:53:04.000000000 +0200 |
36 |
++++ b/lib/morph.c 2010-04-12 13:54:53.000000000 +0200 |
37 |
+@@ -375,14 +375,14 @@ static char *exc_lookup(char *word, int |
38 |
+ static char line[WORDBUF], *beglp, *endlp; |
39 |
+ char *excline; |
40 |
+ |
41 |
+- if (exc_fps[pos] == NULL) |
42 |
++ if (exc_fps[pos-1] == NULL) |
43 |
+ return(NULL); |
44 |
+ |
45 |
+ /* first time through load line from exception file */ |
46 |
+ if(word != NULL){ |
47 |
+ if (strlen(word) > WORDBUF - 1) |
48 |
+ return(NULL); |
49 |
+- if ((excline = bin_search(word, exc_fps[pos])) != NULL) { |
50 |
++ if ((excline = bin_search(word, exc_fps[pos-1])) != NULL) { |
51 |
+ strcpy(line, excline); |
52 |
+ endlp = strchr(line,' '); |
53 |
+ } else |
54 |
|
55 |
diff --git a/app-dicts/wordnet/wordnet-3.0-r5.ebuild b/app-dicts/wordnet/wordnet-3.0-r5.ebuild |
56 |
new file mode 100644 |
57 |
index 0000000..e3018e4 |
58 |
--- /dev/null |
59 |
+++ b/app-dicts/wordnet/wordnet-3.0-r5.ebuild |
60 |
@@ -0,0 +1,76 @@ |
61 |
+# Copyright 1999-2016 Gentoo Foundation |
62 |
+# Distributed under the terms of the GNU General Public License v2 |
63 |
+# $Id$ |
64 |
+ |
65 |
+EAPI=6 |
66 |
+ |
67 |
+inherit autotools eutils flag-o-matic |
68 |
+ |
69 |
+DESCRIPTION="A lexical database for the English language" |
70 |
+HOMEPAGE="http://wordnet.princeton.edu/" |
71 |
+SRC_URI=" |
72 |
+ http://wordnetcode.princeton.edu/${PV}/WordNet-${PV}.tar.gz |
73 |
+ mirror://gentoo/${P}-patchset-1.tar.bz2" |
74 |
+LICENSE="Princeton" |
75 |
+ |
76 |
+SLOT="0" |
77 |
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" |
78 |
+IUSE="doc" |
79 |
+ |
80 |
+# In contrast to what the configure script seems to imply, Tcl/Tk is NOT |
81 |
+# optional. cf. bug 163478 for details. (Yes, it's about 2.1 but it's |
82 |
+# still the same here.) |
83 |
+DEPEND=" |
84 |
+ dev-lang/tcl:0= |
85 |
+ dev-lang/tk:0=" |
86 |
+RDEPEND="${DEPEND}" |
87 |
+ |
88 |
+S="${WORKDIR}/WordNet-${PV}" |
89 |
+ |
90 |
+PATCHES=( |
91 |
+ # Don't install into PREFIX/dict but PREFIX/share/wordnet/dict |
92 |
+ "${WORKDIR}/${P}-dict-location.patch" |
93 |
+ # Fixes bug 130024, make an additional shared lib |
94 |
+ "${WORKDIR}/${P}-shared-lib.patch" |
95 |
+ # Don't install the docs directly into PREFIX/doc but PREFIX/doc/PN |
96 |
+ "${WORKDIR}/${P}-docs-path.patch" |
97 |
+ "${WORKDIR}"/${P}-CVE-2008-3908.patch #211491 |
98 |
+ "${WORKDIR}"/${P}-CVE-2008-2149.patch #211491 |
99 |
+ |
100 |
+ "${FILESDIR}"/${P}-tcl8.6.patch |
101 |
+ "${FILESDIR}"/${P}-format-security.patch |
102 |
+ "${FILESDIR}"/${P}-src_stubs_c.patch |
103 |
+ "${FILESDIR}"/${P}-fix-indexing-bug-314799.patch |
104 |
+) |
105 |
+ |
106 |
+src_prepare() { |
107 |
+ epatch ${PATCHES[@]} |
108 |
+ eapply_user |
109 |
+ |
110 |
+ # Don't install all the extra docs (html, pdf, ps) without doc USE flag. |
111 |
+ if ! use doc; then |
112 |
+ sed -i -e "s:SUBDIRS =.*:SUBDIRS = man:" doc/Makefile.am || die |
113 |
+ fi |
114 |
+ |
115 |
+ # Drop installation of OLD tk.h headers #255590 |
116 |
+ sed '/^SUBDIRS/d' -i include/Makefile.am || die |
117 |
+ sed 's: include/tk/Makefile::' -i configure.ac || die |
118 |
+ rm -rf include/tk/ || die |
119 |
+ |
120 |
+ rm -f configure || die |
121 |
+ eautoreconf |
122 |
+ MAKEOPTS+=" -e" |
123 |
+} |
124 |
+ |
125 |
+src_configure() { |
126 |
+ append-cppflags -DUNIX -I"${T}"/usr/include |
127 |
+ |
128 |
+ PLATFORM=linux WN_ROOT="${T}/usr" \ |
129 |
+ WN_DICTDIR="${T}/usr/share/wordnet/dict" \ |
130 |
+ WN_MANDIR="${T}/usr/share/man" \ |
131 |
+ WN_DOCDIR="${T}/usr/share/doc/wordnet-${PV}" \ |
132 |
+ WNHOME="${EPREFIX}/usr/share/wordnet" \ |
133 |
+ econf \ |
134 |
+ --with-tcl="${EPREFIX}"/usr/$(get_libdir) \ |
135 |
+ --with-tk="${EPREFIX}"/usr/$(get_libdir) |
136 |
+} |