Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-dicts/wordnet/
Date: Wed, 26 Apr 2017 14:04:46
Message-Id: 1493215469.2536b924a6ea1050361636d0aabf3aa9dcce2f51.mgorny@gentoo
1 commit: 2536b924a6ea1050361636d0aabf3aa9dcce2f51
2 Author: Ethan Kiang <chocopuff298 <AT> gmail <DOT> com>
3 AuthorDate: Sun Apr 23 07:15:01 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 26 14:04:29 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2536b924
7
8 app-dicts/wordnet: Update database files to 3.1
9
10 Closes: https://github.com/gentoo/gentoo/pull/4474
11
12 app-dicts/wordnet/Manifest | 1 +
13 app-dicts/wordnet/wordnet-3.1.ebuild | 94 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 95 insertions(+)
15
16 diff --git a/app-dicts/wordnet/Manifest b/app-dicts/wordnet/Manifest
17 index 0c1ab1f8439..23ab21dfe03 100644
18 --- a/app-dicts/wordnet/Manifest
19 +++ b/app-dicts/wordnet/Manifest
20 @@ -1,2 +1,3 @@
21 DIST WordNet-3.0.tar.gz 11537227 SHA256 b4d8b1feeb22defe686cf1c5062d723bd854997614da9547fa135e5137843531 SHA512 d39c008cec41de8f1b2aeacb4ad818f9997a13b30a992fda100b6dcc9c11c253530b00a1909b55ff7b564bafc33f7763c1ce9b0a6ae3e591695db2083e9ead7a WHIRLPOOL cfba84209b4366b1ab381957f82cc2a32039d073baf8fbd44252c829c9291be76f05b214e014157f3ec03a354aaec68a14e20103dde37d11f13b846056aa90f4
22 +DIST wn3.1.dict.tar.gz 16358468 SHA256 3f7d8be8ef6ecc7167d39b10d66954ec734280b5bdcd57f7d9eafe429d11c22a SHA512 16dca17a87026d8a0b7b4758219cd21a869c3ef3da23ce7875924546f2eacac4c2f376cb271b798b2c458fe8c078fb43d681356e3d9beef40f4bd88d3579394f WHIRLPOOL 67b1dd7cfc0df9957d2dedf405dea72ef2aeffb0e696778d88550405070aad11ae59d4cf8f1063f9d828edd88f6032e6e07c351be546e672b44df4a063305997
23 DIST wordnet-3.0-patchset-1.tar.bz2 8076 SHA256 d8333b107f53e188981e9ec0e1e53890c8bd7155924ae140c777c3f443d8aba7 SHA512 17668d736dd6dfe83e4d5d328729cbcdfb4dbca9a9707651534169bd2ce6fc2238d5c820d63330c51c20ab9b2964b56a609f58242b05dabbcfdfc0da61c048cb WHIRLPOOL 30e3820c2679148206bc14d5acf8eb7a2bde422f13ce2e9b0a90145e510667d70b1c1ef5d3486c85eddf6492c72b2243672683164f917f8ff5910370e30bd0f8
24
25 diff --git a/app-dicts/wordnet/wordnet-3.1.ebuild b/app-dicts/wordnet/wordnet-3.1.ebuild
26 new file mode 100644
27 index 00000000000..48f463038ef
28 --- /dev/null
29 +++ b/app-dicts/wordnet/wordnet-3.1.ebuild
30 @@ -0,0 +1,94 @@
31 +# Copyright 1999-2017 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +inherit autotools eutils flag-o-matic
37 +
38 +DESCRIPTION="A lexical database for the English language"
39 +HOMEPAGE="http://wordnet.princeton.edu/"
40 +SRC_URI="
41 + http://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.gz
42 + mirror://gentoo/${PN}-3.0-patchset-1.tar.bz2
43 + http://wordnetcode.princeton.edu/wn3.1.dict.tar.gz"
44 +LICENSE="Princeton"
45 +
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
48 +IUSE="doc"
49 +
50 +# In contrast to what the configure script seems to imply, Tcl/Tk is NOT
51 +# optional. cf. bug 163478 for details. (Yes, it's about 2.1 but it's
52 +# still the same here.)
53 +DEPEND="
54 + dev-lang/tcl:0=
55 + dev-lang/tk:0="
56 +RDEPEND="${DEPEND}"
57 +
58 +S="${WORKDIR}/WordNet-3.0"
59 +
60 +PATCHES1=(
61 + # Don't install into PREFIX/dict but PREFIX/share/wordnet/dict
62 + "${WORKDIR}/"${PN}-3.0"-dict-location.patch"
63 + # Fixes bug 130024, make an additional shared lib
64 + "${WORKDIR}/"${PN}-3.0"-shared-lib.patch"
65 + # Don't install the docs directly into PREFIX/doc but PREFIX/doc/PN
66 + "${WORKDIR}/"${PN}-3.0"-docs-path.patch"
67 + "${WORKDIR}"/"${PN}-3.0"-CVE-2008-3908.patch #211491
68 +
69 + "${FILESDIR}"/"${PN}-3.0"-tcl8.6.patch
70 + "${FILESDIR}"/"${PN}-3.0"-format-security.patch
71 + "${FILESDIR}"/"${PN}-3.0"-src_stubs_c.patch
72 + "${FILESDIR}"/"${PN}-3.0"-fix-indexing-bug-314799.patch
73 +)
74 +
75 +PATCHES0=(
76 + "${WORKDIR}"/"${PN}-3.0"-CVE-2008-2149.patch #211491
77 +)
78 +
79 +src_prepare() {
80 + eapply -p1 "${PATCHES1[@]}"
81 + eapply -p0 "${PATCHES0[@]}"
82 + eapply_user
83 +
84 + # Don't install all the extra docs (html, pdf, ps) without doc USE flag.
85 + if ! use doc; then
86 + sed -i -e "s:SUBDIRS =.*:SUBDIRS = man:" doc/Makefile.am || die
87 + fi
88 +
89 + # Drop installation of OLD tk.h headers #255590
90 + sed '/^SUBDIRS/d' -i include/Makefile.am || die
91 + sed 's: include/tk/Makefile::' -i configure.ac || die
92 + eautoreconf
93 +}
94 +
95 +src_configure() {
96 + append-cppflags -DUNIX -I"${T}"/usr/include
97 +
98 + PLATFORM=linux WN_ROOT="${T}/usr" \
99 + WN_DICTDIR="${T}/usr/share/wordnet/dict" \
100 + WN_MANDIR="${T}/usr/share/man" \
101 + WN_DOCDIR="${T}/usr/share/doc/wordnet-3.0" \
102 + WNHOME="${EPREFIX}/usr/share/wordnet" \
103 + econf \
104 + --with-tcl="${EPREFIX}"/usr/$(get_libdir) \
105 + --with-tk="${EPREFIX}"/usr/$(get_libdir)
106 +}
107 +
108 +src_compile(){
109 + emake -e || die "emake failed"
110 +}
111 +
112 +src_install(){
113 + # For clarification, WN is still on version 3.0. Only the database files
114 + # have been updated to 3.1 as a package for 3.1 does not currently exist.
115 + emake -e DESTDIR="${D}" install
116 + einstalldocs
117 + rm -r "${D}/usr/share/wordnet/dict" || die
118 + mv "${WORKDIR}/dict" "${D}/usr/share/wordnet" || die
119 +}
120 +
121 +pkg_postinst(){
122 + elog "The WordNet 3.1 ebuild has installed WordNet v3.0 with v3.1 database files instead."
123 + elog "See http://wordnet.princeton.edu/wordnet/download/current-version/ for more."
124 +}