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