1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 # NOTE: Even though the *.dict.dz are the same as dictd/freedict's files,
8 # their indexes seem to be in a different format. So we'll keep them
11 # NOTE: Festival plugin crashes, bug 188684. Disable for now.
16 inherit eutils flag-o-matic gnome2
18 DESCRIPTION="A international dictionary supporting fuzzy and glob style matching"
19 HOMEPAGE="http://stardict-4.sourceforge.net/"
20 SRC_URI="mirror://sourceforge/${PN}-4/${P}.tar.bz2
21 pronounce? ( https://${PN}-3.googlecode.com/files/WyabdcRealPeopleTTS.tar.bz2 )
22 qqwry? ( mirror://gentoo/QQWry.Dat.bz2 )"
24 LICENSE="CPL-1.0 GPL-3 LGPL-2"
26 KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 sparc x86"
27 IUSE="espeak qqwry pronounce spell tools"
32 >=dev-libs/glib-2.16:2
36 >=x11-libs/gtk+-2.20:2
39 spell? ( >=app-text/enchant-1.2 )
46 RDEPEND="${COMMON_DEPEND}
47 espeak? ( >=app-accessibility/espeak-1.29 )
49 DEPEND="${COMMON_DEPEND}
50 app-text/docbook-xml-dtd:4.3
51 app-text/gnome-doc-utils
60 # Remove unneeded sigc++ header files to make it sure
61 # that we are using system-wide libsigc++
62 # (and these does not work on gcc43)
63 find dict/src/sigc++* -name \*.h -or -name \*.cc | xargs rm -f || die
65 # libsigc++ started to require c++11 support
66 append-cxxflags "-std=c++11"
72 # Hint: EXTRA_ECONF="--enable-gnome-support" and manual install of
73 # libbonobo-2, libgnome-2, libgnomeui-2, gconf-2 and orbit-2 will
74 # give you GNOME 2.x support, that is otherwise considered deprecated
75 # because of the deep GNOME 2.x core library dependencies
76 gnome2_src_configure \
78 --disable-scrollkeeper \
82 $(use_enable espeak) \
84 --disable-updateinfo \
85 --disable-gnome-support \
86 --disable-gpe-support \
87 --disable-schemas-install
93 dodoc dict/doc/{Documentation,FAQ,HACKING,HowToCreateDictionary,Skins,StarDictFileFormat,Translation}
96 insinto /usr/share/${PN}/data
100 if use pronounce; then
101 docinto WyabdcRealPeopleTTS
102 dodoc ../WyabdcRealPeopleTTS/{README,readme.txt}
103 rm -f ../WyabdcRealPeopleTTS/{README,readme.txt}
105 doins -r ../WyabdcRealPeopleTTS
108 # noinst_PROGRAMS with ${PN}_ prefix from tools/src/Makefile.am wrt #292773
111 local apps="${PN}-editor pydict2dic olddic2newdic oxford2dic directory2dic
112 dictd2dic wquick2dic ec50 directory2treedic treedict2dir jdictionary mova
113 xmlinout soothill kanjidic2 powerword kdic 21tech 21shiji buddhist
114 tabfile cedict edict duden ${PN}-dict-update degb2utf frgb2utf
115 jpgb2utf gmx2utf rucn kingsoft wikipedia wikipediaImage babylon
116 ${PN}2txt ${PN}-verify fest2dict i2e2dict downloadwiki
117 ooo2dict myspell2dic exc2i2e dictbuilder tabfile2sql KangXi Unihan
118 xiaoxuetang-ja wubi ydp2dict wordnet lingvosound2resdb
119 resdatabase2dir dir2resdatabase ${PN}-index sd2foldoc ${PN}-text2bin
120 ${PN}-bin2text ${PN}-repair"
122 for app in ${apps}; do
123 newbin tools/src/${app} ${PN}_${app}
129 elog "Note: festival text to speech (TTS) plugin is not built. To use festival"
130 elog 'TTS plugin, please, emerge festival and enable "Use TTS program." at:'
131 elog '"Preferences -> Dictionary -> Sound" and fill in "Commandline" with:'
132 elog '"echo %s | festival --tts"'
134 elog "You will now need to install ${PN} dictionary files. If"
135 elog "you have not, execute the below to get a list of dictionaries:"
137 elog " emerge -s ${PN}-"