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, 03 Dec 2016 16:47:43
Message-Id: 1480783653.9296b5ddf49633f09d0188114e57f1d9cdd2556b.bircoph@gentoo
1 commit: 9296b5ddf49633f09d0188114e57f1d9cdd2556b
2 Author: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 2 16:32:20 2016 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 3 16:47:33 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9296b5dd
7
8 app-text/stardict: update to EAPI 6
9
10 Package-Manager: portage-2.3.2
11 Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>
12
13 app-text/stardict/stardict-3.0.6-r3.ebuild | 141 +++++++++++++++++++++++++++++
14 1 file changed, 141 insertions(+)
15
16 diff --git a/app-text/stardict/stardict-3.0.6-r3.ebuild b/app-text/stardict/stardict-3.0.6-r3.ebuild
17 new file mode 100644
18 index 00000000..1f059fa
19 --- /dev/null
20 +++ b/app-text/stardict/stardict-3.0.6-r3.ebuild
21 @@ -0,0 +1,141 @@
22 +# Copyright 1999-2016 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +# $Id$
25 +
26 +EAPI=6
27 +
28 +# NOTE: Even though the *.dict.dz are the same as dictd/freedict's files,
29 +# their indexes seem to be in a different format. So we'll keep them
30 +# seperate for now.
31 +
32 +GNOME2_LA_PUNT=yes
33 +
34 +inherit flag-o-matic gnome2
35 +
36 +DESCRIPTION="A international dictionary supporting fuzzy and glob style matching"
37 +HOMEPAGE="http://stardict-4.sourceforge.net/"
38 +SRC_URI="mirror://sourceforge/${PN}-4/${P}.tar.bz2
39 + pronounce? ( https://${PN}-3.googlecode.com/files/WyabdcRealPeopleTTS.tar.bz2 )
40 + qqwry? ( mirror://gentoo/QQWry.Dat.bz2 )"
41 +
42 +LICENSE="CPL-1.0 GPL-3 LGPL-2"
43 +SLOT="0"
44 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
45 +IUSE="debug espeak pronounce spell tools qqwry"
46 +
47 +RESTRICT="test"
48 +
49 +COMMON_DEPEND="
50 + >=dev-libs/glib-2.16:2
51 + dev-libs/libsigc++:2=
52 + sys-libs/zlib:=
53 + x11-libs/gdk-pixbuf:2
54 + >=x11-libs/gtk+-2.20:2
55 + x11-libs/libX11
56 + x11-libs/pango
57 + spell? ( >=app-text/enchant-1.2 )
58 + tools? (
59 + dev-libs/libpcre:=
60 + dev-libs/libxml2:=
61 + virtual/mysql
62 + )
63 +"
64 +RDEPEND="${COMMON_DEPEND}
65 + espeak? ( >=app-accessibility/espeak-1.29 )
66 +"
67 +DEPEND="${COMMON_DEPEND}
68 + app-text/docbook-xml-dtd:4.3
69 + app-text/gnome-doc-utils
70 + dev-libs/libxslt
71 + dev-util/intltool
72 + sys-devel/gettext
73 + virtual/pkgconfig
74 +"
75 +
76 +src_prepare() {
77 + # From Fedora
78 + # Remove unneeded sigc++ header files to make it sure
79 + # that we are using system-wide libsigc++
80 + # (and these does not work on gcc43)
81 + find dict/src/sigc++* -name \*.h -or -name \*.cc | xargs rm -f || die
82 +
83 + # libsigc++ started to require c++11 support
84 + append-cxxflags "-std=c++11"
85 +
86 + eapply_user
87 + gnome2_src_prepare
88 +}
89 +
90 +src_configure() {
91 + # NOTE: Festival plugin crashes, bug 188684. Disable for now.
92 +
93 + # Hint: EXTRA_ECONF="--enable-gnome-support" and manual install of
94 + # libbonobo-2, libgnome-2, libgnomeui-2, gconf-2 and orbit-2 will
95 + # give you GNOME 2.x support, that is otherwise considered deprecated
96 + # because of the deep GNOME 2.x core library dependencies
97 + gnome2_src_configure \
98 + $(use_enable tools) \
99 + --disable-scrollkeeper \
100 + $(use_enable spell) \
101 + --disable-gucharmap \
102 + $(use_enable debug) \
103 + --disable-festival \
104 + $(use_enable espeak) \
105 + $(use_enable qqwry) \
106 + --disable-updateinfo \
107 + --disable-gnome-support \
108 + --disable-gpe-support \
109 + --disable-schemas-install
110 +}
111 +
112 +src_install() {
113 + gnome2_src_install
114 +
115 + dodoc dict/doc/{Documentation,FAQ,HACKING,HowToCreateDictionary,Skins,StarDictFileFormat,Translation}
116 +
117 + if use qqwry; then
118 + insinto /usr/share/${PN}/data
119 + doins ../QQWry.Dat
120 + fi
121 +
122 + if use pronounce; then
123 + docinto WyabdcRealPeopleTTS
124 + dodoc ../WyabdcRealPeopleTTS/{README,readme.txt}
125 + rm -f ../WyabdcRealPeopleTTS/{README,readme.txt}
126 + insinto /usr/share
127 + doins -r ../WyabdcRealPeopleTTS
128 + fi
129 +
130 + # noinst_PROGRAMS with ${PN}_ prefix from tools/src/Makefile.am wrt #292773
131 + if use tools; then
132 + local app
133 + local apps="${PN}-editor pydict2dic olddic2newdic oxford2dic directory2dic
134 + dictd2dic wquick2dic ec50 directory2treedic treedict2dir jdictionary mova
135 + xmlinout soothill kanjidic2 powerword kdic 21tech 21shiji buddhist
136 + tabfile cedict edict duden ${PN}-dict-update degb2utf frgb2utf
137 + jpgb2utf gmx2utf rucn kingsoft wikipedia wikipediaImage babylon
138 + ${PN}2txt ${PN}-verify fest2dict i2e2dict downloadwiki
139 + ooo2dict myspell2dic exc2i2e dictbuilder tabfile2sql KangXi Unihan
140 + xiaoxuetang-ja wubi ydp2dict wordnet lingvosound2resdb
141 + resdatabase2dir dir2resdatabase ${PN}-index sd2foldoc ${PN}-text2bin
142 + ${PN}-bin2text ${PN}-repair"
143 +
144 + for app in ${apps}; do
145 + newbin tools/src/${app} ${PN}_${app}
146 + done
147 + fi
148 +}
149 +
150 +pkg_postinst() {
151 + elog "Note: festival text to speech (TTS) plugin is not built. To use festival"
152 + elog 'TTS plugin, please, emerge festival and enable "Use TTS program." at:'
153 + elog '"Preferences -> Dictionary -> Sound" and fill in "Commandline" with:'
154 + elog '"echo %s | festival --tts"'
155 + elog
156 + elog "You will now need to install ${PN} dictionary files. If"
157 + elog "you have not, execute the below to get a list of dictionaries:"
158 + elog
159 + elog " emerge -s ${PN}-"
160 +
161 + gnome2_pkg_postinst
162 +}