aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-06-06 02:23:44 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-06-11 17:23:08 +0200
commit39f91c11312bc05aa4ffbab6a2b700003ccb161c (patch)
tree8df63d97f587602bcd76cbba35b176a23b22d610 /app-dicts
parentsys-cluster/sionlib: don't enforce libomp (diff)
downloadguru-39f91c11312bc05aa4ffbab6a2b700003ccb161c.tar.gz
guru-39f91c11312bc05aa4ffbab6a2b700003ccb161c.tar.bz2
guru-39f91c11312bc05aa4ffbab6a2b700003ccb161c.zip
app-dicts/dictd-devils: new package
Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'app-dicts')
-rw-r--r--app-dicts/dictd-devils/Manifest1
-rw-r--r--app-dicts/dictd-devils/dictd-devils-20150822.ebuild65
-rw-r--r--app-dicts/dictd-devils/files/format.patch110
-rw-r--r--app-dicts/dictd-devils/metadata.xml8
4 files changed, 184 insertions, 0 deletions
diff --git a/app-dicts/dictd-devils/Manifest b/app-dicts/dictd-devils/Manifest
new file mode 100644
index 000000000..299d382c8
--- /dev/null
+++ b/app-dicts/dictd-devils/Manifest
@@ -0,0 +1 @@
+DIST dictd-devils-20150822.zip 164703 BLAKE2B cb8ac80e02617c4ced72b81de6e82d9b590953599444cc304647a50c78f080172fc0d15158de8f9a1d42abff37f68732f9076636c8102a2ebd85592c0bb0be10 SHA512 d2264626a8a34df7d9cabb671838b717a40385511d13b58bb60bf78481ad4e7ae6c9ab02a58847dddda7d3957efb3d0f67465fb9eabcbc515e2383fb202684a2
diff --git a/app-dicts/dictd-devils/dictd-devils-20150822.ebuild b/app-dicts/dictd-devils/dictd-devils-20150822.ebuild
new file mode 100644
index 000000000..eb3810b3b
--- /dev/null
+++ b/app-dicts/dictd-devils/dictd-devils-20150822.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="The Devil's Dictionary for dict"
+HOMEPAGE="http://www.dict.org"
+SRC_URI="http://www.gutenberg.org/files/972/972.zip -> ${P}.zip"
+S="$WORKDIR"
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND=">=app-text/dictd-1.5.5"
+
+PATCHES=( "${FILESDIR}/format.patch" )
+
+src_prepare() {
+ eapply_user
+
+ sed -e 's/\r//g' -i 972.txt
+ sed -e "/^ *THE DEVIL'S DICTIONARY/,/^End of Project Gutenberg's The Devil's Dictionary/!{w COPYING.gutenberg" -e 'd}' -i 972.txt
+ sed -e '/^\S/{: l;N;s/\n *\(.\)/ \1/g;t l}' -i 972.txt
+ sed -e "s/^\\([A-Zor .'?-]*[^,A-Zor .'?-]\\)/ \1/" -i 972.txt
+ sed -e '/^ /y/,/\a/' -i 972.txt
+}
+
+src_compile() {
+ head -n -6 972.txt | dictfmt -u "${SRC_URI% ->*}" \
+ -s "The Devil's Dictionary (2015-08-22 Project Gutenberg version)" \
+ --headword-separator " or " \
+ --columns 80 \
+ -h devils
+ sed -e 'y/\a/,/' -i devils.dict
+ dictzip devils.dict
+}
+
+src_install() {
+ insinto /var/dict
+ doins devils.dict.dz devils.index
+}
+
+pkg_preinst() {
+ HAS_OLD_VERSION="$(has_version app-dicts/${PN})"
+}
+
+pkg_postinst() {
+ if "${HAS_OLD_VERSION}" ; then
+ elog "You must restart your dictd server before the ${PN} dictionary is"
+ elog "completely updated. If you are using OpenRC, this may be accomplished by"
+ elog "running '/etc/init.d/dictd restart'."
+ else
+ elog "You must register ${PN} and restart your dictd server before the"
+ elog "dictionary is available for use. If you are using OpenRC, both tasks may be"
+ elog "accomplished by running '/etc/init.d/dictd restart'."
+ fi
+}
+
+pkg_postrm() {
+ if ! "${HAS_OLD_VERSION}" ; then
+ elog "You must unregister ${PN} and restart your dictd server before the"
+ elog "dictionary is completely removed. If you are using OpenRC, both tasks may be"
+ elog "accomplished by running '/etc/init.d/dictd restart'."
+ fi
+}
diff --git a/app-dicts/dictd-devils/files/format.patch b/app-dicts/dictd-devils/files/format.patch
new file mode 100644
index 000000000..fc21301ce
--- /dev/null
+++ b/app-dicts/dictd-devils/files/format.patch
@@ -0,0 +1,110 @@
+--- a/972.txt
++++ b/972.txt
+@@ -124,7 +124,7 @@
+ ABORIGINIES, n. Persons of little worth found cumbering the soil of a
+ newly discovered country. They soon cease to cumber; they fertilize.
+
+-ABRACADABRA.
++ABRACADABRA,
+
+ By _Abracadabra_ we signify
+ An infinite number of things.
+@@ -1405,7 +1405,7 @@
+ Ignores the Law as 't were a straw,
+ And wants to sin--don't let him.
+
+-CUI BONO? [Latin] What good would that do _me_?
++CUI BONO?, [Latin] What good would that do _me_?
+
+ CUNNING, n. The faculty that distinguishes a weak animal or person
+ from a strong one. It brings its possessor much mental satisfaction
+@@ -2571,7 +2571,7 @@
+ these persons from swift and awful death is one of the most striking
+ proofs of God's mercy to those that hate Him.
+
+-FORMA PAUPERIS. [Latin] In the character of a poor person--a
++FORMA PAUPERIS, [Latin] In the character of a poor person--a
+ method by which a litigant without money for lawyers is considerately
+ permitted to lose his case.
+
+@@ -3074,7 +3074,7 @@
+
+
+
+-HABEAS CORPUS. A writ by which a man may be taken out of jail when
++HABEAS CORPUS, A writ by which a man may be taken out of jail when
+ confined for the wrong crime.
+
+ HABIT, n. A shackle for the free.
+@@ -3539,7 +3539,7 @@
+
+
+
+-I is the first letter of the alphabet, the first word of the language,
++I, is the first letter of the alphabet, the first word of the language,
+ the first thought of the mind, the first object of affection. In
+ grammar it is a pronoun of the first person and singular number. Its
+ plural is said to be _We_, but how there can be more than one myself
+@@ -3718,7 +3718,7 @@
+ Pollo Doncas
+
+
+-IMPOSTOR n. A rival aspirant to public honors.
++IMPOSTOR, n. A rival aspirant to public honors.
+
+ IMPROBABILITY, n.
+
+@@ -4252,7 +4252,7 @@
+
+
+
+-J is a consonant in English, but some nations use it as a vowel--
++J, is a consonant in English, but some nations use it as a vowel--
+ than which nothing could be more absurd. Its original form, which has
+ been but slightly modified, was that of the tail of a subdued dog, and
+ it was not a letter but a character, standing for a Latin verb,
+@@ -4323,7 +4323,7 @@
+
+
+
+-K is a consonant that we get from the Greeks, but it can be traced
++K, is a consonant that we get from the Greeks, but it can be traced
+ away back beyond them to the Cerathians, a small commercial nation
+ inhabiting the peninsula of Smero. In their tongue it was called
+ _Klatch_, which means "destroyed." The form of the letter was
+@@ -4767,7 +4767,7 @@
+ live with. The liver is heaven's best gift to the goose; without it
+ that bird would be unable to supply us with the Strasbourg _pate_.
+
+-LL.D. Letters indicating the degree _Legumptionorum Doctor_, one
++LL.D., Letters indicating the degree _Legumptionorum Doctor_, one
+ learned in laws, gifted with legal gumption. Some suspicion is cast
+ upon this derivation by the fact that the title was formerly _LL.d._,
+ and conferred only upon gentlemen distinguished for their wealth. At
+@@ -8612,7 +8612,7 @@
+ civilization and enlightenment, despite their obvious agency in this
+ incomparable dictionary.
+
+-TZETZE (or TSETSE) FLY, n. An African insect (_Glossina morsitans_)
++TZETZE FLY or TSETSE FLY, n. An African insect (_Glossina morsitans_)
+ whose bite is commonly regarded as nature's most efficacious remedy
+ for insomnia, though some patients prefer that of the American
+ novelist (_Mendax interminabilis_).
+@@ -8781,7 +8781,7 @@
+
+
+
+-W (double U) has, of all the letters in our alphabet, the only
++W, (double U) has, of all the letters in our alphabet, the only
+ cumbrous name, the names of the others being monosyllabic. This
+ advantage of the Roman alphabet over the Grecian is the more valued
+ after audibly spelling out some simple Greek word, like
+@@ -9040,7 +9040,7 @@
+
+
+
+-X in our alphabet being a needless letter has an added invincibility
++X, in our alphabet being a needless letter has an added invincibility
+ to the attacks of the spelling reformers, and like them, will
+ doubtless last as long as the language. X is the sacred symbol of ten
+ dollars, and in such words as Xmas, Xn, etc., stands for Christ, not,
diff --git a/app-dicts/dictd-devils/metadata.xml b/app-dicts/dictd-devils/metadata.xml
new file mode 100644
index 000000000..29e5b1abf
--- /dev/null
+++ b/app-dicts/dictd-devils/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer needed -->
+ <longdescription>
+ A database for 'dict'-compatible dictionary software, based on Ambrose Bierce's satirical The Devil's Dictionary.
+ </longdescription>
+</pkgmetadata>