Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/stardict/
Date: Sat, 25 Aug 2018 14:45:37
Message-Id: 1535206290.8d0fcece2dd2cc2f6998e6bc9ac81175779c5af9.bircoph@gentoo
1 commit: 8d0fcece2dd2cc2f6998e6bc9ac81175779c5af9
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 25 14:11:30 2018 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 25 14:11:30 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d0fcece
7
8 app-text/stardict: version bump
9
10 - Update to the latest git snapshot.
11 - Migrate to dev-db/mysql-connector-c (bug 631230).
12 - Remove deprecated gnome2 support (bug 644346).
13 - Update gucharmap slot dependency (bug 664374).
14
15 Closes: https://bugs.gentoo.org/664374
16 Closes: https://bugs.gentoo.org/644346
17 Closes: https://bugs.gentoo.org/631230
18 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
19 Package-Manager: Portage-2.3.48, Repoman-2.3.10
20
21 app-text/stardict/Manifest | 1 +
22 .../stardict/stardict-4.0.0_pre20170304.ebuild | 221 +++++++++++++++++++++
23 2 files changed, 222 insertions(+)
24
25 diff --git a/app-text/stardict/Manifest b/app-text/stardict/Manifest
26 index 5eada587fbf..f88a0975552 100644
27 --- a/app-text/stardict/Manifest
28 +++ b/app-text/stardict/Manifest
29 @@ -2,3 +2,4 @@ DIST QQWry.Dat.bz2 4114875 BLAKE2B 3fb1a3b223b799645fcc7adc3d8158c80551bd1d35689
30 DIST WyabdcRealPeopleTTS.tar.bz2 84329208 BLAKE2B 1dd9c00e4e914b0d747876aa566db59a4b973b3ec61fa1ed7a55f885d7f415f573f2f8783eca46c565bc52df4ba3576b3a0f4e863b4f7ba688007f6d6b375209 SHA512 1553e62c139ecb005bb04163147d94aa58e4ba7f9ee3172b760c6e4776587c12bf816c42e0131c82195b7c738ec9ee5082f39b974790f5cacd522367919beaa0
31 DIST stardict-3.0.6.tar.bz2 9341740 BLAKE2B df0ccfbd485dfb514bdcf4edaf92b2faf3c11016b025ca09596adcc12738027395a049d9d27420427acdf5c46923cb43ba521d334f875070f5451b7ff147e36f SHA512 81d93324b6e8954af7c20ea6d2a3054bb564d786a21b1cb541c728da7a18a6e7ddb23e595055ccc77e6866bbb8c89fb4f17023e33664761dbe1ee8cd55768658
32 DIST stardict-4.0.0_pre20160518.tar.xz 3605324 BLAKE2B bd160edddef547c72f3002e8a6c290a1538ea25335c8eb66b77d0bc261fe7666019b6e746b1a7d47d3098d5b35fdd091f47132a511cfa118dc3c44dea8361dbe SHA512 5fb04d7870019f17038e0750a2250a0dca44c427f427cd987542eea2bdfab91223e2c01bae844c43f7d8991d51c0420bd4d77ad6d3f7d86cf6f9c50dae7ca50e
33 +DIST stardict-4.0.0_pre20170304.tar.xz 3603012 BLAKE2B c9ac41f1e27c013e9c20e5b5477889cb4933ebaf35629311362ec48e820b10a7492d464ac7eddded697ca49f56f65032a1af36088e8e731643e83532e0586e48 SHA512 ec27bb95069d727fd96cb30f2d7ad94992cc53e55903b373612e29265263ea5da2c8a25f6c9618db50dc38c33efebe13324c2b8eb09b198559a1ee70029f0b6a
34
35 diff --git a/app-text/stardict/stardict-4.0.0_pre20170304.ebuild b/app-text/stardict/stardict-4.0.0_pre20170304.ebuild
36 new file mode 100644
37 index 00000000000..7ef439a91b4
38 --- /dev/null
39 +++ b/app-text/stardict/stardict-4.0.0_pre20170304.ebuild
40 @@ -0,0 +1,221 @@
41 +# Copyright 1999-2018 Gentoo Foundation
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=6
45 +
46 +# NOTE: Even though the *.dict.dz are the same as dictd/freedict's files,
47 +# their indexes seem to be in a different format. So we'll keep them
48 +# seperate for now.
49 +
50 +GNOME2_LA_PUNT=yes
51 +PYTHON_COMPAT=( python2_7 )
52 +
53 +inherit autotools flag-o-matic gnome2 python-single-r1
54 +
55 +DESCRIPTION="A international dictionary supporting fuzzy and glob style matching"
56 +HOMEPAGE="http://stardict-4.sourceforge.net/
57 + https://github.com/huzheng001/stardict-3"
58 +SRC_URI="https://dev.gentoo.org/~bircoph/distfiles/${P}.tar.xz
59 + pronounce? ( https://${PN}-3.googlecode.com/files/WyabdcRealPeopleTTS.tar.bz2 )
60 + qqwry? ( mirror://gentoo/QQWry.Dat.bz2 )"
61 +
62 +LICENSE="CPL-1.0 GPL-3 LGPL-2"
63 +SLOT="0"
64 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
65 +IUSE="advertisement cal debug dictdotcn espeak examples flite
66 +fortune gucharmap +htmlparse info man perl +powerwordparse
67 +pronounce python qqwry spell tools updateinfo +wikiparse +wordnet
68 ++xdxfparse youdaodict"
69 +
70 +RESTRICT="test"
71 +
72 +COMMON_DEPEND="
73 + >=dev-libs/glib-2.32:2
74 + dev-libs/libsigc++:2=
75 + media-libs/libcanberra[gtk3]
76 + sys-libs/zlib:=
77 + x11-libs/gdk-pixbuf:2
78 + x11-libs/gtk+:3
79 + x11-libs/libX11
80 + x11-libs/pango
81 + espeak? ( >=app-accessibility/espeak-1.29 )
82 + flite? ( app-accessibility/flite )
83 + gucharmap? ( gnome-extra/gucharmap:2.90= )
84 + spell? ( >=app-text/enchant-1.2 )
85 + tools? (
86 + dev-db/mysql-connector-c
87 + dev-libs/expat
88 + dev-libs/libpcre:=
89 + dev-libs/libxml2:=
90 + python? ( ${PYTHON_DEPS} )
91 + )
92 +"
93 +RDEPEND="${COMMON_DEPEND}
94 + info? ( sys-apps/texinfo )
95 + fortune? ( games-misc/fortune-mod )
96 + perl? ( dev-lang/perl )
97 +"
98 +DEPEND="${COMMON_DEPEND}
99 + app-text/docbook-xml-dtd:4.3
100 + app-text/gnome-doc-utils
101 + dev-libs/libxslt
102 + dev-util/intltool
103 + sys-devel/gettext
104 + virtual/pkgconfig
105 +"
106 +REQUIRED_USE="tools? ( python? ( ${PYTHON_REQUIRED_USE} ) )"
107 +
108 +# docs are messy, installed manually below
109 +DOCS=""
110 +
111 +PATCHES=( "${FILESDIR}/${PN}-4.0.0_pre20160518-tabfile.patch" )
112 +
113 +src_prepare() {
114 + # From Fedora
115 + # Remove unneeded sigc++ header files to make it sure
116 + # that we are using system-wide libsigc++
117 + # (and these does not work on gcc43)
118 + find dict/src/sigc++* -name \*.h -or -name \*.cc | xargs rm -f || die
119 +
120 + # libsigc++ started to require c++11 support
121 + append-cxxflags "-std=c++11"
122 +
123 + if use python; then
124 + local f
125 + # force python shebangs handlable by python_doscript
126 + for f in tools/src/*.py; do
127 + [[ $(head -n1 "${f}") =~ ^#! ]] || continue
128 + sed -i '1 s|.*|#!/usr/bin/python|' tools/src/*.py || die
129 + done
130 + # script contains UTF-8 symbols, but has no ecoding set
131 + sed -i '1 a # -*- coding: utf-8 -*-' tools/src/uyghur2dict.py || die
132 + fi
133 +
134 + # bug 604318
135 + sed -i '/AM_GCONF_SOURCE_2/d' dict/configure.ac || die
136 +
137 + eapply_user
138 + eautoreconf
139 + gnome2_src_prepare
140 +}
141 +
142 +src_configure() {
143 + # Festival plugin crashes, bug 188684. Disable for now.
144 + # Gnome2 support is disabled due to deprecation request, bug 644346
145 + gnome2_src_configure \
146 + --disable-darwin-support \
147 + --disable-festival \
148 + --disable-gnome-support \
149 + --disable-gpe-support \
150 + --disable-maemo-support \
151 + --disable-schemas-install \
152 + --disable-scrollkeeper \
153 + $(use_enable advertisement) \
154 + $(use_enable cal) \
155 + $(use_enable debug) \
156 + $(use_enable dictdotcn) \
157 + $(use_enable espeak) \
158 + $(use_enable flite) \
159 + $(use_enable fortune) \
160 + $(use_enable gucharmap) \
161 + $(use_enable htmlparse) \
162 + $(use_enable info) \
163 + $(use_enable man) \
164 + $(use_enable powerwordparse) \
165 + $(use_enable qqwry) \
166 + $(use_enable spell) \
167 + $(use_enable tools) \
168 + $(use_enable updateinfo) \
169 + $(use_enable wikiparse) \
170 + $(use_enable wordnet) \
171 + $(use_enable xdxfparse) \
172 + $(use_enable youdaodict)
173 +}
174 +
175 +src_install() {
176 + gnome2_src_install
177 +
178 + dodoc AUTHORS ChangeLog README
179 +
180 + docinto dict
181 + dodoc dict/{AUTHORS,ChangeLog,README,TODO}
182 + dodoc dict/doc/{Documentation,FAQ,HowToCreateDictionary,Skins,StarDictFileFormat,TextualDictionaryFileFormat,Translation}
183 + dodoc -r dict/doc/wiki
184 +
185 + docinto lib
186 + dodoc lib/{AUTHORS,ChangeLog,README}
187 +
188 + if use examples; then
189 + insinto /usr/share/doc/${PF}/dict
190 + doins dict/doc/stardict-textual-dict*
191 + fi
192 +
193 + if use qqwry; then
194 + insinto /usr/share/${PN}/data
195 + doins ../QQWry.Dat
196 + fi
197 +
198 + if use pronounce; then
199 + docinto WyabdcRealPeopleTTS
200 + dodoc ../WyabdcRealPeopleTTS/{README,readme.txt}
201 + rm -f ../WyabdcRealPeopleTTS/{README,readme.txt}
202 + insinto /usr/share
203 + doins -r ../WyabdcRealPeopleTTS
204 + fi
205 +
206 + # noinst_PROGRAMS with ${PN}_ prefix from tools/src/Makefile.am wrt #292773
207 + # and additional scripts from tools dir
208 + if use tools; then
209 + local app
210 + local apps="${PN}-editor pydict2dic olddic2newdic oxford2dic directory2dic dictd2dic
211 + wquick2dic ec50 directory2treedic treedict2dir jdictionary mova xmlinout
212 + soothill kanjidic2 powerword kdic 21tech 21shiji buddhist tabfile
213 + cedict edict duden ${PN}-dict-update degb2utf frgb2utf jpgb2utf gmx2utf
214 + rucn kingsoft kingsoft2 wikipedia wikipediaImage babylon ${PN}2txt ${PN}-verify
215 + fest2dict i2e2dict downloadwiki ooo2dict myspell2dic exc2i2e
216 + dictbuilder tabfile2sql KangXi Unihan xiaoxuetang-ja wubi ydp2dict
217 + wordnet lingvosound2resdb resdatabase2dir dir2resdatabase ${PN}-index
218 + sd2foldoc
219 + ${PN}-text2bin ${PN}-bin2text ${PN}-repair"
220 +
221 + use perl && apps+=" dicts-dump.pl ncce2stardict.pl parse-oxford.perl"
222 + use python && apps+=" hanzim2dict.py jm2stardict.py lingea-trd-decoder.py
223 + makevietdict.py uyghur2dict.py"
224 +
225 + for app in ${apps}; do
226 + if [[ "${app}" =~ ^${PN} ]]; then
227 + dobin "tools/src/${app}"
228 + else
229 + newbin "tools/src/${app}" "${PN}_${app}"
230 + fi
231 + done
232 + use python && python_doscript "${ED}"usr/bin/*.py
233 +
234 + docinto tools
235 + dodoc tools/{AUTHORS,ChangeLog,README}
236 +
237 + if use examples; then
238 + insinto /usr/share/doc/${PF}/tools
239 + doins tools/src/{dictbuilder.{example,readme},example.ifo,example_treedict.tar.bz2}
240 + fi
241 + fi
242 +}
243 +
244 +pkg_postinst() {
245 + elog
246 + elog "Note: festival text to speech (TTS) plugin is not built. To use festival"
247 + elog 'TTS plugin, please, emerge festival and enable "Use TTS program." at:'
248 + elog '"Preferences -> Dictionary -> Sound" and fill in "Commandline" with:'
249 + elog '"echo %s | festival --tts"'
250 + elog
251 + elog "You will now need to install ${PN} dictionary files. If"
252 + elog "you have not, execute the below to get a list of dictionaries:"
253 + elog " emerge -s ${PN}-"
254 + elog
255 + elog "Additionally you may install any stardict dictionary from the net"
256 + elog "by unpacking it to:"
257 + elog " /usr/share/stardict/dic"
258 + elog
259 +
260 + gnome2_pkg_postinst
261 +}