Skip to content

Commit

Permalink
app-text/stardict: handle stardict plugins using USE flags
Browse files Browse the repository at this point in the history
Previously many stardict plugins were unconditionally enabled or
disabled, they are controllable now, except for festival, where
app-accessibility/festival should be updated first, and plugins for
unsupported interfaces, like maemo or gpe.

Package-Manager: portage-2.3.2
Signed-off-by: Andrew Savchenko <[email protected]>
  • Loading branch information
bircoph committed Dec 3, 2016
1 parent 9296b5d commit a9260fb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 15 deletions.
21 changes: 17 additions & 4 deletions app-text/stardict/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,28 @@
as Full-text translation, Net Dict.
</longdescription>
<use>
<flag name="espeak">Enable text to speech synthesizer using espeak
engine</flag>
<flag name="advertisement">Enable stardict advertisements plugin</flag>
<flag name="dictdotcn">Enable dict.cn network plugin (for Chinese language)</flag>
<flag name="espeak">Enable text to speech synthesizer plugin using
<pkg>app-accessibility/espeak</pkg> engine</flag>
<flag name="gucharmap">Enable plugin for unicode symbols description
using <pkg>gnome-extra/gucharmap</pkg></flag>
<flag name="htmlparse">Enable plugin to parse dictionaries with html content</flag>
<flag name="man">Enable plugin to read manual pages</flag>
<flag name="pronounce">Install WyabdcRealPeopleTTS package (it is just
many .wav files) to make StarDict pronounce English words</flag>
<flag name="qqwry">Enable QQWry plugin, which provides information (in
Chinese language) about geographical positions, owner, etc. for IP
addresses</flag>
<flag name="tools">Build and install dictionary management
tools and converters from various dictionary formats</flag>
<flag name="powerwordparse">Enable plugin to parse powerword dictionaries</flag>
<flag name="tools">Build and install dictionary management tools and
converters from various dictionary formats</flag>
<flag name="updateinfo">Enable plugin to check for stardict updates</flag>
<flag name="wikiparse">Enable plugin to parse dictionaries in wikimedia format</flag>
<flag name="wordnet">Enable wordnet plugin to find similar English words
using lexical database</flag>
<flag name="xdxfparse">Enable plugin to parse dictionaries
in xdxf (XML Dictionary eXchange Format)</flag>
</use>
<upstream>
<remote-id type="sourceforge">stardict-4</remote-id>
Expand Down
32 changes: 21 additions & 11 deletions app-text/stardict/stardict-3.0.6-r3.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ SRC_URI="mirror://sourceforge/${PN}-4/${P}.tar.bz2
LICENSE="CPL-1.0 GPL-3 LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="debug espeak pronounce spell tools qqwry"
IUSE="advertisement debug dictdotcn espeak +gucharmap +htmlparse
man +powerwordparse pronounce qqwry spell tools updateinfo
+wikiparse +wordnet +xdxfparse"

RESTRICT="test"

Expand All @@ -33,6 +35,7 @@ COMMON_DEPEND="
>=x11-libs/gtk+-2.20:2
x11-libs/libX11
x11-libs/pango
gucharmap? ( gnome-extra/gucharmap:0= )
spell? ( >=app-text/enchant-1.2 )
tools? (
dev-libs/libpcre:=
Expand Down Expand Up @@ -67,25 +70,32 @@ src_prepare() {
}

src_configure() {
# NOTE: Festival plugin crashes, bug 188684. Disable for now.

# Hint: EXTRA_ECONF="--enable-gnome-support" and manual install of
# libbonobo-2, libgnome-2, libgnomeui-2, gconf-2 and orbit-2 will
# give you GNOME 2.x support, that is otherwise considered deprecated
# because of the deep GNOME 2.x core library dependencies

# Festival plugin crashes, bug 188684. Disable for now.
gnome2_src_configure \
$(use_enable tools) \
--disable-festival \
--disable-gnome-support \
--disable-gpe-support \
--disable-schemas-install \
--disable-scrollkeeper \
$(use_enable spell) \
--disable-gucharmap \
$(use_enable advertisement) \
$(use_enable dictdotcn) \
$(use_enable debug) \
--disable-festival \
$(use_enable espeak) \
$(use_enable gucharmap) \
$(use_enable htmlparse) \
$(use_enable qqwry) \
--disable-updateinfo \
--disable-gnome-support \
--disable-gpe-support \
--disable-schemas-install
$(use_enable powerwordparse) \
$(use_enable spell) \
$(use_enable tools) \
$(use_enable updateinfo) \
$(use_enable wikiparse) \
$(use_enable wordnet) \
$(use_enable xdxfparse)
}

src_install() {
Expand Down

0 comments on commit a9260fb

Please sign in to comment.