summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2012-01-24 23:12:51 +0100
committerMartin Väth <martin@mvath.de>2015-10-11 10:47:08 +0200
commit0f254326e3a8bb552cc7dbe405c80799115e3436 (patch)
treeadaef3f51c5a1e875d8b7e71da544884bfe23869 /app-text
parentBump noscript, update checksums (diff)
downloadmv-0f254326e3a8bb552cc7dbe405c80799115e3436.tar.gz
mv-0f254326e3a8bb552cc7dbe405c80799115e3436.tar.bz2
mv-0f254326e3a8bb552cc7dbe405c80799115e3436.zip
Add stardict to drop dependencies with USE=-gnome. Update Checksums
Diffstat (limited to 'app-text')
-rw-r--r--app-text/stardict/ChangeLog7
-rw-r--r--app-text/stardict/Manifest3
-rw-r--r--app-text/stardict/files/stardict-3.0.3-compositelookup_cpp.patch19
-rw-r--r--app-text/stardict/files/stardict-3.0.3-correct-glib-include.patch13
-rw-r--r--app-text/stardict/files/stardict-3.0.3-entry.patch20
-rw-r--r--app-text/stardict/files/stardict-3.0.3-gcc46.patch13
-rw-r--r--app-text/stardict/files/stardict-3.0.3-overflow.patch26
-rw-r--r--app-text/stardict/metadata.xml25
-rw-r--r--app-text/stardict/stardict-3.0.3-r2.ebuild146
9 files changed, 272 insertions, 0 deletions
diff --git a/app-text/stardict/ChangeLog b/app-text/stardict/ChangeLog
new file mode 100644
index 00000000..2a3fde09
--- /dev/null
+++ b/app-text/stardict/ChangeLog
@@ -0,0 +1,7 @@
+# ChangeLog for app-text/stardict
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header $
+
+ 24 Jan 2012; Martin Väth <martin@mvath.de>
+ Copy from tree to make dependencies for dependencies for help optional.
+ Clean old ChangeLog
diff --git a/app-text/stardict/Manifest b/app-text/stardict/Manifest
new file mode 100644
index 00000000..4906bcd2
--- /dev/null
+++ b/app-text/stardict/Manifest
@@ -0,0 +1,3 @@
+DIST QQWry.Dat.bz2 4114875 RMD160 646916f7ac234a95526f9e43cfca674c2b4b7bd1 SHA1 de7ff7208da0f889ec08911119948780d7ee4738 SHA256 3eda90ee8ea13ec88767336b078d2dfe2c971d6a31df60f409d526e3e29a4f83
+DIST WyabdcRealPeopleTTS.tar.bz2 84329208 RMD160 9c9bd37cf85aaed8d5b090b2014c3122e98ba8e4 SHA1 056609ec9743bda105ff6db956b321436ae50b90 SHA256 96a398eaef3e84f6f23e61683e6439913a4d44055e695dd4a1936f9340d64870
+DIST stardict-3.0.3.tar.bz2 9147947 RMD160 4c63f3cf439a7c34829b371e75c16db97fb35fd1 SHA1 5043c0918963cd4d40e6d6289353f295766ec74f SHA256 9ba10a5b3dcdd02b81c7a138dac15903a6bc2355856f60338f3775e371472b73
diff --git a/app-text/stardict/files/stardict-3.0.3-compositelookup_cpp.patch b/app-text/stardict/files/stardict-3.0.3-compositelookup_cpp.patch
new file mode 100644
index 00000000..86825555
--- /dev/null
+++ b/app-text/stardict/files/stardict-3.0.3-compositelookup_cpp.patch
@@ -0,0 +1,19 @@
+This patch is from OpenSUSE .src.rpm for the following crash on startup:
+
+ERROR:compositelookup.cpp:53:void CompositeLookup::send_net_dict_request(const string&, const string&): assertion failed: (NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request))
+
+--- dict/src/lib/compositelookup.cpp
++++ dict/src/lib/compositelookup.cpp
+@@ -50,8 +50,10 @@
+ void CompositeLookup::send_net_dict_request(const std::string& dict_id, const std::string& key)
+ {
+ NetDictRequest request(dict_id, key);
+- g_assert(NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request));
+- NetDictRequests.push_back(request);
++ if(NetDictRequests.end() == std::find(NetDictRequests.begin(), NetDictRequests.end(), request))
++ {
++ NetDictRequests.push_back(request);
++ }
+ }
+
+ /* returns true if got expected response */
diff --git a/app-text/stardict/files/stardict-3.0.3-correct-glib-include.patch b/app-text/stardict/files/stardict-3.0.3-correct-glib-include.patch
new file mode 100644
index 00000000..fd892439
--- /dev/null
+++ b/app-text/stardict/files/stardict-3.0.3-correct-glib-include.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/396219
+
+--- dict/src/tomboykeybinder.h
++++ dict/src/tomboykeybinder.h
+@@ -21,7 +21,7 @@
+ #ifndef __TOMBOY_KEY_BINDER_H__
+ #define __TOMBOY_KEY_BINDER_H__
+
+-#include <glib/gtypes.h>
++#include <glib.h>
+
+ G_BEGIN_DECLS
+
diff --git a/app-text/stardict/files/stardict-3.0.3-entry.patch b/app-text/stardict/files/stardict-3.0.3-entry.patch
new file mode 100644
index 00000000..38182b0c
--- /dev/null
+++ b/app-text/stardict/files/stardict-3.0.3-entry.patch
@@ -0,0 +1,20 @@
+warning: key "Encoding" in group "Desktop Entry" is deprecated
+error: value "stardict.png" for key "Icon" in group "Desktop Entry" is an icon name with an extension, but there should be no extension
+error: value "Dictionary" in key "Categories" in group "Desktop Entry" requires another category to be present among the following categories: Office;TextTools
+
+--- dict/data/stardict.desktop.in
++++ dict/data/stardict.desktop.in
+@@ -1,11 +1,10 @@
+ [Desktop Entry]
+-Encoding=UTF-8
+ _Name=StarDict
+ _Comment=Lookup words
+ Exec=stardict
+ Terminal=false
+ Type=Application
+-Icon=stardict.png
++Icon=stardict
+ StartupNotify=true
+-Categories=Utility;Dictionary;
++Categories=Utility;Office;TextTools;Dictionary;
+ X-GNOME-DocPath=stardict/stardict.xml
diff --git a/app-text/stardict/files/stardict-3.0.3-gcc46.patch b/app-text/stardict/files/stardict-3.0.3-gcc46.patch
new file mode 100644
index 00000000..d85bc0de
--- /dev/null
+++ b/app-text/stardict/files/stardict-3.0.3-gcc46.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/362299
+
+--- dict/stardict-plugins/stardict-wordnet-plugin/scene.h
++++ dict/stardict-plugins/stardict-wordnet-plugin/scene.h
+@@ -25,6 +25,8 @@
+ #ifndef __PHYSICS_H__
+ #define __PHYSICS_H__
+
++#include <cstddef>
++
+ #include "partic.h"
+ #include "spring.h"
+
diff --git a/app-text/stardict/files/stardict-3.0.3-overflow.patch b/app-text/stardict/files/stardict-3.0.3-overflow.patch
new file mode 100644
index 00000000..48249010
--- /dev/null
+++ b/app-text/stardict/files/stardict-3.0.3-overflow.patch
@@ -0,0 +1,26 @@
+This patch is stardict-tools-3.0.3-destbufferoverflow.patch from OpenSUSE .src.rpm for:
+
+warning: call to ‘__fgets_chk_warn’ declared with attribute warning: fgets called with bigger size than length of destination buffer [enabled by default]
+
+--- tools/src/myspell2dic.c
++++ tools/src/myspell2dic.c
+@@ -132,7 +132,7 @@ if (argc<3)
+
+ fprintf(stderr, "Enter grammar language [Spanish]: ");
+ fflush(stderr);
+-fgets(lang, 100, stdin);
++fgets(lang, 50, stdin);
+ if ((p=strchr(lang, '\n'))!=NULL) *p=0;
+ if (*lang==0) strcpy(lang, "Spanish");
+
+--- tools/src/ooo2dict.c
++++ tools/src/ooo2dict.c
+@@ -71,7 +71,7 @@ current2=malloc(10000);
+
+ fprintf(stderr, "Enter thesaurus language [WordNet_English]: ");
+ fflush(stderr);
+-fgets(lang, 100, stdin);
++fgets(lang, 50, stdin);
+ if ((p=strchr(lang, '\n'))!=NULL) *p=0;
+ if (*lang==0) strcpy(lang, "WordNet_English");
+ F=fopen((argc>1)? argv[1]: "/usr/share/myspell/dicts/th_en_US_v2.dat", "rt");
diff --git a/app-text/stardict/metadata.xml b/app-text/stardict/metadata.xml
new file mode 100644
index 00000000..d6985892
--- /dev/null
+++ b/app-text/stardict/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>app-dicts</herd>
+ <longdescription>
+ StarDict is an international dictionary Software. It has powerful features
+ such as "Glob-style pattern matching", "Scan selection word," "Fuzzy
+ query," etc. Stardict Version3.0 has developed a lot of new functions, such
+ as Full-text translation, Net Dict.
+ </longdescription>
+ <use>
+ <flag name='editor'>Build and install the stardict-editor utility</flag>
+ <flag name='espeak'>Enable text to speech synthesizer using espeak
+ engine</flag>
+ <flag name='festival'>Enable text to speech synthesizer using festival
+ engine</flag>
+ <flag name='gucharmap'>Enable gucharmap dictionary plugin</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 the extra stardict tools</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-text/stardict/stardict-3.0.3-r2.ebuild b/app-text/stardict/stardict-3.0.3-r2.ebuild
new file mode 100644
index 00000000..66e56bd1
--- /dev/null
+++ b/app-text/stardict/stardict-3.0.3-r2.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header $
+
+# NOTE: Even though the *.dict.dz are the same as dictd/freedict's files,
+# their indexes seem to be in a different format. So we'll keep them
+# seperate for now.
+
+# NOTE: Festival plugin crashes, bug 188684. Disable for now.
+
+EAPI=4
+
+GNOME2_LA_PUNT=yes
+GCONF_DEBUG=no
+
+inherit eutils gnome2 autotools
+
+DESCRIPTION="A international dictionary supporting fuzzy and glob style matching"
+HOMEPAGE="http://code.google.com/p/stardict-3/"
+SRC_URI="http://${PN}-3.googlecode.com/files/${P}.tar.bz2
+ pronounce? ( http://${PN}-3.googlecode.com/files/WyabdcRealPeopleTTS.tar.bz2 )
+ qqwry? ( mirror://gentoo/QQWry.Dat.bz2 )"
+
+LICENSE="CPL-1.0 GPL-3 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="espeak gnome gucharmap qqwry pronounce spell tools"
+
+COMMON_DEPEND=">=dev-libs/glib-2.16
+ dev-libs/libsigc++:2
+ sys-libs/zlib
+ >=x11-libs/gtk+-2.20:2
+ gnome? (
+ >=gnome-base/libbonobo-2
+ >=gnome-base/libgnome-2
+ >=gnome-base/libgnomeui-2
+ >=gnome-base/gconf-2
+ >=gnome-base/orbit-2
+ )
+ gucharmap? ( >=gnome-extra/gucharmap-2.22.1:0 )
+ spell? ( >=app-text/enchant-1.2 )
+ tools? (
+ dev-libs/libpcre
+ dev-libs/libxml2
+ virtual/mysql
+ )"
+RDEPEND="${COMMON_DEPEND}
+ espeak? ( >=app-accessibility/espeak-1.29 )"
+DEPEND="${COMMON_DEPEND}
+ gnome? (
+ app-text/docbook-xml-dtd:4.3
+ app-text/gnome-doc-utils
+ dev-libs/libxslt
+ )
+ dev-util/intltool
+ dev-util/pkgconfig
+ sys-devel/gettext"
+
+RESTRICT="test"
+
+pkg_setup() {
+ G2CONF="$(use_enable tools)
+ --disable-scrollkeeper
+ $(use_enable spell)
+ $(use_enable gucharmap)
+ --disable-festival
+ $(use_enable espeak)
+ $(use_enable qqwry)
+ --disable-updateinfo
+ $(use_enable gnome gnome-support)
+ --disable-gpe-support
+ --disable-schemas-install"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-correct-glib-include.patch \
+ "${FILESDIR}"/${P}-entry.patch \
+ "${FILESDIR}"/${P}-gcc46.patch \
+ "${FILESDIR}"/${P}-compositelookup_cpp.patch \
+ "${FILESDIR}"/${P}-overflow.patch
+ if ! use gnome
+ then sed -i \
+ -e "s/GNOME_DOC_INIT/GNOME_DOC_INIT([0.32],[:],[:])/" \
+ -e "/AM_GCONF_SOURCE/d" \
+ -e "/help\/Makefile/d" \
+ dict/configure.ac
+ sed -i \
+ -e "s/ help / /" \
+ dict/Makefile.am
+ eautoreconf
+ fi
+ gnome2_src_prepare
+}
+
+src_install() {
+ gnome2_src_install
+
+ dodoc dict/doc/{Documentation,FAQ,HACKING,HowToCreateDictionary,Skins,StarDictFileFormat,Translation}
+
+ if use qqwry; then
+ insinto /usr/share/stardict/data
+ doins ../QQWry.Dat
+ fi
+
+ if use pronounce; then
+ docinto WyabdcRealPeopleTTS
+ dodoc ../WyabdcRealPeopleTTS/{README,readme.txt}
+ rm -f ../WyabdcRealPeopleTTS/{README,readme.txt}
+ insinto /usr/share
+ doins -r ../WyabdcRealPeopleTTS
+ fi
+
+ # noinst_PROGRAMS with stardict_ prefix from tools/src/Makefile.am wrt #292773
+ if use tools; then
+ local app
+ local apps="pydict2dic olddic2newdic oxford2dic directory2dic dictd2dic
+ wquick2dic ec50 directory2treedic treedict2dir jdictionary mova
+ xmlinout soothill kanjidic2 powerword kdic 21tech 21shiji buddhist
+ tabfile cedict edict duden stardict-dict-update degb2utf frgb2utf
+ jpgb2utf gmx2utf rucn kingsoft wikipedia wikipediaImage babylon
+ stardict2txt stardict-verify fest2dict i2e2dict downloadwiki
+ ooo2dict myspell2dic exc2i2e dictbuilder tabfile2sql KangXi Unihan
+ xiaoxuetang-ja wubi ydp2dict wordnet lingvosound2resdb
+ resdatabase2dir dir2resdatabase stardict-index stardict-text2bin
+ stardict-bin2text stardict-repair"
+
+ for app in ${apps}; do
+ newbin tools/src/${app} ${PN}_${app}
+ done
+ fi
+}
+
+pkg_postinst() {
+ elog "Note: festival text to speech (TTS) plugin is not built. To use festival"
+ elog 'TTS plugin, please, emerge festival and enable "Use TTS program." at:'
+ elog '"Preferences -> Dictionary -> Sound" and fill in "Commandline" with:'
+ elog '"echo %s | festival --tts"'
+ elog
+ elog "You will now need to install stardict dictionary files. If"
+ elog "you have not, execute the below to get a list of dictionaries:"
+ elog
+ elog " emerge -s stardict-"
+
+ gnome2_pkg_postinst
+}