Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-dicts/dictd-devils/, app-dicts/dictd-devils/files/
Date: Fri, 11 Jun 2021 15:23:17
Message-Id: 1623424988.39f91c11312bc05aa4ffbab6a2b700003ccb161c.Alessandro-Barbieri@gentoo
1 commit: 39f91c11312bc05aa4ffbab6a2b700003ccb161c
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sun Jun 6 00:23:44 2021 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Fri Jun 11 15:23:08 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=39f91c11
7
8 app-dicts/dictd-devils: new package
9
10 Package-Manager: Portage-3.0.19, Repoman-3.0.3
11 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
12
13 app-dicts/dictd-devils/Manifest | 1 +
14 .../dictd-devils/dictd-devils-20150822.ebuild | 65 ++++++++++++
15 app-dicts/dictd-devils/files/format.patch | 110 +++++++++++++++++++++
16 app-dicts/dictd-devils/metadata.xml | 8 ++
17 4 files changed, 184 insertions(+)
18
19 diff --git a/app-dicts/dictd-devils/Manifest b/app-dicts/dictd-devils/Manifest
20 new file mode 100644
21 index 000000000..299d382c8
22 --- /dev/null
23 +++ b/app-dicts/dictd-devils/Manifest
24 @@ -0,0 +1 @@
25 +DIST dictd-devils-20150822.zip 164703 BLAKE2B cb8ac80e02617c4ced72b81de6e82d9b590953599444cc304647a50c78f080172fc0d15158de8f9a1d42abff37f68732f9076636c8102a2ebd85592c0bb0be10 SHA512 d2264626a8a34df7d9cabb671838b717a40385511d13b58bb60bf78481ad4e7ae6c9ab02a58847dddda7d3957efb3d0f67465fb9eabcbc515e2383fb202684a2
26
27 diff --git a/app-dicts/dictd-devils/dictd-devils-20150822.ebuild b/app-dicts/dictd-devils/dictd-devils-20150822.ebuild
28 new file mode 100644
29 index 000000000..eb3810b3b
30 --- /dev/null
31 +++ b/app-dicts/dictd-devils/dictd-devils-20150822.ebuild
32 @@ -0,0 +1,65 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +DESCRIPTION="The Devil's Dictionary for dict"
39 +HOMEPAGE="http://www.dict.org"
40 +SRC_URI="http://www.gutenberg.org/files/972/972.zip -> ${P}.zip"
41 +S="$WORKDIR"
42 +LICENSE="public-domain"
43 +SLOT="0"
44 +KEYWORDS="~amd64"
45 +
46 +DEPEND=">=app-text/dictd-1.5.5"
47 +
48 +PATCHES=( "${FILESDIR}/format.patch" )
49 +
50 +src_prepare() {
51 + eapply_user
52 +
53 + sed -e 's/\r//g' -i 972.txt
54 + sed -e "/^ *THE DEVIL'S DICTIONARY/,/^End of Project Gutenberg's The Devil's Dictionary/!{w COPYING.gutenberg" -e 'd}' -i 972.txt
55 + sed -e '/^\S/{: l;N;s/\n *\(.\)/ \1/g;t l}' -i 972.txt
56 + sed -e "s/^\\([A-Zor .'?-]*[^,A-Zor .'?-]\\)/ \1/" -i 972.txt
57 + sed -e '/^ /y/,/\a/' -i 972.txt
58 +}
59 +
60 +src_compile() {
61 + head -n -6 972.txt | dictfmt -u "${SRC_URI% ->*}" \
62 + -s "The Devil's Dictionary (2015-08-22 Project Gutenberg version)" \
63 + --headword-separator " or " \
64 + --columns 80 \
65 + -h devils
66 + sed -e 'y/\a/,/' -i devils.dict
67 + dictzip devils.dict
68 +}
69 +
70 +src_install() {
71 + insinto /var/dict
72 + doins devils.dict.dz devils.index
73 +}
74 +
75 +pkg_preinst() {
76 + HAS_OLD_VERSION="$(has_version app-dicts/${PN})"
77 +}
78 +
79 +pkg_postinst() {
80 + if "${HAS_OLD_VERSION}" ; then
81 + elog "You must restart your dictd server before the ${PN} dictionary is"
82 + elog "completely updated. If you are using OpenRC, this may be accomplished by"
83 + elog "running '/etc/init.d/dictd restart'."
84 + else
85 + elog "You must register ${PN} and restart your dictd server before the"
86 + elog "dictionary is available for use. If you are using OpenRC, both tasks may be"
87 + elog "accomplished by running '/etc/init.d/dictd restart'."
88 + fi
89 +}
90 +
91 +pkg_postrm() {
92 + if ! "${HAS_OLD_VERSION}" ; then
93 + elog "You must unregister ${PN} and restart your dictd server before the"
94 + elog "dictionary is completely removed. If you are using OpenRC, both tasks may be"
95 + elog "accomplished by running '/etc/init.d/dictd restart'."
96 + fi
97 +}
98
99 diff --git a/app-dicts/dictd-devils/files/format.patch b/app-dicts/dictd-devils/files/format.patch
100 new file mode 100644
101 index 000000000..fc21301ce
102 --- /dev/null
103 +++ b/app-dicts/dictd-devils/files/format.patch
104 @@ -0,0 +1,110 @@
105 +--- a/972.txt
106 ++++ b/972.txt
107 +@@ -124,7 +124,7 @@
108 + ABORIGINIES, n. Persons of little worth found cumbering the soil of a
109 + newly discovered country. They soon cease to cumber; they fertilize.
110 +
111 +-ABRACADABRA.
112 ++ABRACADABRA,
113 +
114 + By _Abracadabra_ we signify
115 + An infinite number of things.
116 +@@ -1405,7 +1405,7 @@
117 + Ignores the Law as 't were a straw,
118 + And wants to sin--don't let him.
119 +
120 +-CUI BONO? [Latin] What good would that do _me_?
121 ++CUI BONO?, [Latin] What good would that do _me_?
122 +
123 + CUNNING, n. The faculty that distinguishes a weak animal or person
124 + from a strong one. It brings its possessor much mental satisfaction
125 +@@ -2571,7 +2571,7 @@
126 + these persons from swift and awful death is one of the most striking
127 + proofs of God's mercy to those that hate Him.
128 +
129 +-FORMA PAUPERIS. [Latin] In the character of a poor person--a
130 ++FORMA PAUPERIS, [Latin] In the character of a poor person--a
131 + method by which a litigant without money for lawyers is considerately
132 + permitted to lose his case.
133 +
134 +@@ -3074,7 +3074,7 @@
135 +
136 +
137 +
138 +-HABEAS CORPUS. A writ by which a man may be taken out of jail when
139 ++HABEAS CORPUS, A writ by which a man may be taken out of jail when
140 + confined for the wrong crime.
141 +
142 + HABIT, n. A shackle for the free.
143 +@@ -3539,7 +3539,7 @@
144 +
145 +
146 +
147 +-I is the first letter of the alphabet, the first word of the language,
148 ++I, is the first letter of the alphabet, the first word of the language,
149 + the first thought of the mind, the first object of affection. In
150 + grammar it is a pronoun of the first person and singular number. Its
151 + plural is said to be _We_, but how there can be more than one myself
152 +@@ -3718,7 +3718,7 @@
153 + Pollo Doncas
154 +
155 +
156 +-IMPOSTOR n. A rival aspirant to public honors.
157 ++IMPOSTOR, n. A rival aspirant to public honors.
158 +
159 + IMPROBABILITY, n.
160 +
161 +@@ -4252,7 +4252,7 @@
162 +
163 +
164 +
165 +-J is a consonant in English, but some nations use it as a vowel--
166 ++J, is a consonant in English, but some nations use it as a vowel--
167 + than which nothing could be more absurd. Its original form, which has
168 + been but slightly modified, was that of the tail of a subdued dog, and
169 + it was not a letter but a character, standing for a Latin verb,
170 +@@ -4323,7 +4323,7 @@
171 +
172 +
173 +
174 +-K is a consonant that we get from the Greeks, but it can be traced
175 ++K, is a consonant that we get from the Greeks, but it can be traced
176 + away back beyond them to the Cerathians, a small commercial nation
177 + inhabiting the peninsula of Smero. In their tongue it was called
178 + _Klatch_, which means "destroyed." The form of the letter was
179 +@@ -4767,7 +4767,7 @@
180 + live with. The liver is heaven's best gift to the goose; without it
181 + that bird would be unable to supply us with the Strasbourg _pate_.
182 +
183 +-LL.D. Letters indicating the degree _Legumptionorum Doctor_, one
184 ++LL.D., Letters indicating the degree _Legumptionorum Doctor_, one
185 + learned in laws, gifted with legal gumption. Some suspicion is cast
186 + upon this derivation by the fact that the title was formerly _LL.d._,
187 + and conferred only upon gentlemen distinguished for their wealth. At
188 +@@ -8612,7 +8612,7 @@
189 + civilization and enlightenment, despite their obvious agency in this
190 + incomparable dictionary.
191 +
192 +-TZETZE (or TSETSE) FLY, n. An African insect (_Glossina morsitans_)
193 ++TZETZE FLY or TSETSE FLY, n. An African insect (_Glossina morsitans_)
194 + whose bite is commonly regarded as nature's most efficacious remedy
195 + for insomnia, though some patients prefer that of the American
196 + novelist (_Mendax interminabilis_).
197 +@@ -8781,7 +8781,7 @@
198 +
199 +
200 +
201 +-W (double U) has, of all the letters in our alphabet, the only
202 ++W, (double U) has, of all the letters in our alphabet, the only
203 + cumbrous name, the names of the others being monosyllabic. This
204 + advantage of the Roman alphabet over the Grecian is the more valued
205 + after audibly spelling out some simple Greek word, like
206 +@@ -9040,7 +9040,7 @@
207 +
208 +
209 +
210 +-X in our alphabet being a needless letter has an added invincibility
211 ++X, in our alphabet being a needless letter has an added invincibility
212 + to the attacks of the spelling reformers, and like them, will
213 + doubtless last as long as the language. X is the sacred symbol of ten
214 + dollars, and in such words as Xmas, Xn, etc., stands for Christ, not,
215
216 diff --git a/app-dicts/dictd-devils/metadata.xml b/app-dicts/dictd-devils/metadata.xml
217 new file mode 100644
218 index 000000000..29e5b1abf
219 --- /dev/null
220 +++ b/app-dicts/dictd-devils/metadata.xml
221 @@ -0,0 +1,8 @@
222 +<?xml version="1.0" encoding="UTF-8"?>
223 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
224 +<pkgmetadata>
225 + <!-- maintainer needed -->
226 + <longdescription>
227 + A database for 'dict'-compatible dictionary software, based on Ambrose Bierce's satirical The Devil's Dictionary.
228 + </longdescription>
229 +</pkgmetadata>