Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 17 Jul 2021 11:26:50
Message-Id: 1626521140.a143dff1dc7f1aae7ca4d56ef0821e45bec4e51c.soap@gentoo
1 commit: a143dff1dc7f1aae7ca4d56ef0821e45bec4e51c
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 17 11:25:40 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 17 11:25:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a143dff1
7
8 cannadic.eclass: treeclean
9
10 Closes: https://github.com/gentoo/gentoo/pull/21687
11 Closes: https://bugs.gentoo.org/796878
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 eclass/cannadic.eclass | 153 -------------------------------------------------
15 1 file changed, 153 deletions(-)
16
17 diff --git a/eclass/cannadic.eclass b/eclass/cannadic.eclass
18 deleted file mode 100644
19 index ac56ef2849c..00000000000
20 --- a/eclass/cannadic.eclass
21 +++ /dev/null
22 @@ -1,153 +0,0 @@
23 -# Copyright 1999-2021 Gentoo Authors
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -# @DEAD
27 -# No consumers left. Removal in 30 days.
28 -
29 -# @ECLASS: cannadic.eclass
30 -# @MAINTAINER:
31 -# cjk@g.o
32 -# @AUTHOR:
33 -# Mamoru KOMACHI <usata@g.o>
34 -# @SUPPORTED_EAPIS: 7
35 -# @BLURB: Function for Canna compatible dictionaries
36 -# @DESCRIPTION:
37 -# The cannadic eclass is used for installation and setup of Canna
38 -# compatible dictionaries.
39 -
40 -case ${EAPI} in
41 - 7) ;;
42 - *) die "EAPI=${EAPI:-0} is not supported" ;;
43 -esac
44 -
45 -EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
46 -
47 -if [[ -z ${_CANNADIC_ECLASS} ]]; then
48 -_CANNADIC_ECLASS=1
49 -
50 -SRC_URI="mirror://gentoo/${P}.tar.gz"
51 -
52 -# You don't need to modify these
53 -readonly _CANNADIC_CANNA_DIR="/var/lib/canna/dic/canna"
54 -readonly _CANNADIC_DICS_DIR="/var/lib/canna/dic/dics.d"
55 -
56 -# @FUNCTION: cannadic-install
57 -# @DESCRIPTION:
58 -# Installs dictionaries to ${EPREFIX}/var/lib/canna/dic/canna
59 -cannadic-install() {
60 - insinto ${_CANNADIC_CANNA_DIR}
61 - insopts -m 0664 -o bin -g bin
62 - doins "${@}"
63 -}
64 -
65 -# @FUNCTION: dicsdir-install
66 -# @DESCRIPTION:
67 -# Installs dics.dir from ${DICSDIRFILE}
68 -dicsdir-install() {
69 - insinto ${_CANNADIC_DICS_DIR}
70 - doins ${DICSDIRFILE}
71 -}
72 -
73 -# @FUNCTION: cannadic_src_install
74 -# @DESCRIPTION:
75 -# Installs all dictionaries under ${WORKDIR}
76 -# plus dics.dir and docs
77 -cannadic_src_install() {
78 - keepdir ${_CANNADIC_CANNA_DIR}
79 - fowners bin:bin ${_CANNADIC_CANNA_DIR}
80 - fperms 0775 ${_CANNADIC_CANNA_DIR}
81 -
82 - local f
83 - for f in *.c[btl]d *.t; do
84 - if [[ -s ${f} ]]; then
85 - cannadic-install "${f}"
86 - fi
87 - done 2> /dev/null
88 -
89 - dicsdir-install
90 -
91 - einstalldocs
92 -}
93 -
94 -# @FUNCTION: update-cannadic-dir
95 -# @DESCRIPTION:
96 -# Updates dics.dir for Canna Server, script for this part taken from Debian GNU/Linux
97 -#
98 -# compiles dics.dir files for Canna Server
99 -# Copyright 2001 ISHIKAWA Mutsumi
100 -# Licensed under the GNU General Public License, version 2. See the file
101 -# /usr/portage/license/GPL-2 or <http://www.gnu.org/copyleft/gpl.txt>.
102 -update-cannadic-dir() {
103 - einfo
104 - einfo "Updating dics.dir for Canna ..."
105 - einfo
106 -
107 - # write new dics.dir file in case we are interrupted
108 - cat <<-EOF > "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir.update-new || die
109 - # dics.dir -- automatically generated file by Portage.
110 - # DO NOT EDIT BY HAND.
111 - EOF
112 -
113 - local f
114 - for f in "${EROOT}${_CANNADIC_DICS_DIR}"/*.dics.dir; do
115 - echo "# ${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir.update-new || die
116 - cat "${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir.update-new || die
117 - einfo "Added ${f}."
118 - done
119 -
120 - mv "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir.update-new \
121 - "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir || die
122 -
123 - einfo
124 - einfo "Done."
125 - einfo
126 -}
127 -
128 -# @FUNCTION: cannadic_pkg_postinst
129 -# @DESCRIPTION:
130 -# Updates dics.dir and print out notice after install
131 -cannadic_pkg_postinst() {
132 - debug-print-function ${FUNCNAME} "${@}"
133 -
134 - update-cannadic-dir
135 -
136 - einfo "Please restart cannaserver for changes to propagate."
137 - einfo "You need to modify your config file (~/.canna) to enable dictionaries."
138 -
139 - if [[ -n ${CANNADICS} ]]; then
140 - einfo "e.g) add"
141 - einfo
142 - einfo " $(IFS=' ' ; echo ${CANNADICS[*]})"
143 - einfo
144 - einfo "to section use-dictionary()."
145 - einfo "For details, see documents under ${EROOT}/usr/share/doc/${PF}."
146 - fi
147 -
148 - einfo "If you do not have ~/.canna, you can find sample files in ${EROOT}/usr/share/canna."
149 - ewarn "If you are upgrading from existing dictionary, you may need to recreate"
150 - ewarn "user dictionary if you have one."
151 -}
152 -
153 -# @FUNCTION: cannadic_pkg_postrm
154 -# @DESCRIPTION:
155 -# Updates dics.dir and print out notice after uninstall
156 -cannadic_pkg_postrm() {
157 - debug-print-function ${FUNCNAME} "${@}"
158 -
159 - update-cannadic-dir
160 -
161 - einfo "Please restart cannaserver for changes to propagate."
162 - einfo "and modify your config file (~/.canna) to disable dictionary."
163 -
164 - if [[ -n ${CANNADICS} ]]; then
165 - einfo "e.g) delete"
166 - einfo
167 - einfo " $(IFS=' ' ; echo ${CANNADICS[*]})"
168 - einfo
169 - einfo "from section use-dictionary()."
170 - fi
171 -
172 - einfo
173 -}
174 -
175 -fi