diff options
author | Murat D. Kadirov <banderols@gmail.com> | 2010-05-13 00:59:31 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-13 00:59:31 +0200 |
commit | fdce8ff1dea79e75c352d16543b6fad7def7f93d (patch) | |
tree | 6a796ab91c3e591fd5d3ad080207f018d1bfd6b4 /misc | |
parent | d3e1aa8a96374177e851e31e38278d8a8e38d366 (diff) |
misc/stardict: Added to 13.0 repository
Diffstat (limited to 'misc')
-rw-r--r-- | misc/stardict/README | 4 | ||||
-rw-r--r-- | misc/stardict/doinst.sh | 8 | ||||
-rw-r--r-- | misc/stardict/patches/05_g++-4.3.dpatch | 338 | ||||
-rw-r--r-- | misc/stardict/patches/stardict-transparent.patch | 101 | ||||
-rw-r--r-- | misc/stardict/slack-desc | 19 | ||||
-rw-r--r-- | misc/stardict/stardict.SlackBuild | 110 | ||||
-rw-r--r-- | misc/stardict/stardict.info | 10 |
7 files changed, 590 insertions, 0 deletions
diff --git a/misc/stardict/README b/misc/stardict/README new file mode 100644 index 0000000000000..88fe820b6fc81 --- /dev/null +++ b/misc/stardict/README @@ -0,0 +1,4 @@ +StarDict is a Cross-Platform and 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. diff --git a/misc/stardict/doinst.sh b/misc/stardict/doinst.sh new file mode 100644 index 0000000000000..e4e6459838cbf --- /dev/null +++ b/misc/stardict/doinst.sh @@ -0,0 +1,8 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + diff --git a/misc/stardict/patches/05_g++-4.3.dpatch b/misc/stardict/patches/05_g++-4.3.dpatch new file mode 100644 index 0000000000000..f7654e83da3a7 --- /dev/null +++ b/misc/stardict/patches/05_g++-4.3.dpatch @@ -0,0 +1,338 @@ +diff -urNad stardict-3.0.1~/src/gconf_file.cpp stardict-3.0.1/src/gconf_file.cpp +--- stardict-3.0.1~/src/gconf_file.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/gconf_file.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -21,6 +21,8 @@ + # include "config.h" + #endif + ++#include <memory> ++ + #include <glib/gi18n.h> + + #include "gconf_file.hpp" +diff -urNad stardict-3.0.1~/src/inifile.cpp stardict-3.0.1/src/inifile.cpp +--- stardict-3.0.1~/src/inifile.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/inifile.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -24,6 +24,7 @@ + #include <vector> + #include <cerrno> + #include <cstring> ++#include <cstdlib> + #include <cstdio> + #include <glib/gi18n.h> + #include <glib/gstdio.h> +diff -urNad stardict-3.0.1~/src/lib/common.cpp stardict-3.0.1/src/lib/common.cpp +--- stardict-3.0.1~/src/lib/common.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/lib/common.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -24,6 +24,8 @@ + #endif + + #include "common.hpp" ++#include <cstring> ++#include <cstdlib> + + static void parse_description(const char *p, long len, std::string &description) + { +diff -urNad stardict-3.0.1~/src/lib/data.cpp stardict-3.0.1/src/lib/data.cpp +--- stardict-3.0.1~/src/lib/data.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/lib/data.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -25,7 +25,7 @@ + + #include "data.hpp" + #include "getuint32.h" +- ++#include <cstring> + + DictBase::DictBase() + { +diff -urNad stardict-3.0.1~/src/lib/http_client.h stardict-3.0.1/src/lib/http_client.h +--- stardict-3.0.1~/src/lib/http_client.h 2008-03-24 16:00:43.000000000 +0800 ++++ stardict-3.0.1/src/lib/http_client.h 2008-06-17 02:27:35.000000000 +0800 +@@ -5,6 +5,7 @@ + #include "sigc++/sigc++.h" + #include <string> + #include <vector> ++#include <cstring> + + #ifndef _WIN32 + # include <netdb.h> +diff -urNad stardict-3.0.1~/src/lib/pluginmanager.cpp stardict-3.0.1/src/lib/pluginmanager.cpp +--- stardict-3.0.1~/src/lib/pluginmanager.cpp 2008-03-24 16:00:43.000000000 +0800 ++++ stardict-3.0.1/src/lib/pluginmanager.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,6 +1,7 @@ + #include "pluginmanager.h" + #include "file.hpp" + #include <string> ++#include <cstring> + + StarDictPluginBaseObject::StarDictPluginBaseObject(const char *filename, GModule *module_, plugin_configure_func_t configure_func_): + plugin_filename(filename), module(module_), configure_func(configure_func_) +diff -urNad stardict-3.0.1~/src/lib/stardict_client.cpp stardict-3.0.1/src/lib/stardict_client.cpp +--- stardict-3.0.1~/src/lib/stardict_client.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/lib/stardict_client.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -29,6 +29,8 @@ + #include "getuint32.h" + + #include "stardict_client.hpp" ++#include <cstdlib> ++#include <cstring> + + #define PROTOCOL_VERSION "0.3" + +diff -urNad stardict-3.0.1~/src/lib/stddict.cpp stardict-3.0.1/src/lib/stddict.cpp +--- stardict-3.0.1~/src/lib/stddict.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/lib/stddict.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -38,6 +38,7 @@ + #include "stddict.hpp" + #include <algorithm> + #include "getuint32.h" ++#include <cstring> + + static inline gint stardict_strcmp(const gchar *s1, const gchar *s2) + { +diff -urNad stardict-3.0.1~/src/lib/treedict.cpp stardict-3.0.1/src/lib/treedict.cpp +--- stardict-3.0.1~/src/lib/treedict.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/lib/treedict.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -28,6 +28,7 @@ + #include "getuint32.h" + + #include "treedict.hpp" ++#include <cstring> + + GtkTreeStore *TreeDict::model=NULL; + +diff -urNad stardict-3.0.1~/src/pangoview.cpp stardict-3.0.1/src/pangoview.cpp +--- stardict-3.0.1~/src/pangoview.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/pangoview.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -21,6 +21,8 @@ + # include "config.h" + #endif + ++#include <cstring> ++ + #include "gtktextviewpango.h" + #include "utils.h" + #include "skin.h"//for SkinCursor definition +diff -urNad stardict-3.0.1~/src/prefsdlg.cpp stardict-3.0.1/src/prefsdlg.cpp +--- stardict-3.0.1~/src/prefsdlg.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/prefsdlg.cpp 2008-06-17 02:28:06.000000000 +0800 +@@ -20,6 +20,8 @@ + # include "config.h" + #endif + ++#include <cstdlib> ++ + #include <glib/gi18n.h> + #include <glib/gstdio.h> + +diff -urNad stardict-3.0.1~/src/readword.cpp stardict-3.0.1/src/readword.cpp +--- stardict-3.0.1~/src/readword.cpp 2007-07-10 15:16:04.000000000 +0800 ++++ stardict-3.0.1/src/readword.cpp 2008-06-17 02:28:06.000000000 +0800 +@@ -3,6 +3,7 @@ + #endif + + #include <cstring> ++#include <cstdlib> + #include <string> + + #include <glib/gi18n.h> +diff -urNad stardict-3.0.1~/src/sigc++/signal.h stardict-3.0.1/src/sigc++/signal.h +--- stardict-3.0.1~/src/sigc++/signal.h 2007-07-10 15:16:01.000000000 +0800 ++++ stardict-3.0.1/src/sigc++/signal.h 2008-06-17 02:28:06.000000000 +0800 +@@ -18,7 +18,7 @@ + //Compilers, such as older versions of SUN Forte C++, that do not allow this also often + //do not allow a typedef to have the same name as a class in the typedef's definition. + //For Sun Forte CC 5.7 (SUN Workshop 10), comment this out to fix the build. +- #define SIGC_TYPEDEF_REDEFINE_ALLOWED 1 ++// #define SIGC_TYPEDEF_REDEFINE_ALLOWED 1 + #endif + + namespace sigc { +diff -urNad stardict-3.0.1~/src/utils.cpp stardict-3.0.1/src/utils.cpp +--- stardict-3.0.1~/src/utils.cpp 2008-06-17 02:27:34.000000000 +0800 ++++ stardict-3.0.1/src/utils.cpp 2008-06-17 02:28:06.000000000 +0800 +@@ -21,6 +21,8 @@ + # include "config.h" + #endif + ++#include <cstring> ++ + #include <glib.h> + #include <glib/gi18n.h> + #include <cstdlib> +diff -urNad stardict-3.0.1~/src/x11_iskeyspressed.hpp stardict-3.0.1/src/x11_iskeyspressed.hpp +--- stardict-3.0.1~/src/x11_iskeyspressed.hpp 2007-07-10 15:16:04.000000000 +0800 ++++ stardict-3.0.1/src/x11_iskeyspressed.hpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,6 +1,8 @@ + #ifndef _X11_ISKEYSPRESSED_HPP_ + #define _X11_ISKEYSPRESSED_HPP_ + ++#include <memory> ++ + #include <gdk/gdkx.h> + #include <X11/keysym.h> + #include <gtk/gtk.h> +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-dictdotcn-plugin/stardict_dictdotcn.cpp stardict-3.0.1/stardict-plugins/stardict-dictdotcn-plugin/stardict_dictdotcn.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-dictdotcn-plugin/stardict_dictdotcn.cpp 2007-10-10 17:28:29.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-dictdotcn-plugin/stardict_dictdotcn.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,6 +1,6 @@ + #include "stardict_dictdotcn.h" + #include <glib/gi18n.h> +-#include <string> ++#include <cstring> + #include <list> + + #ifdef _WIN32 +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp stardict-3.0.1/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp 2007-09-19 16:27:18.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-espeak-tts-plugin/stardict_espeak.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,4 +1,5 @@ + #include "stardict_espeak.h" ++#include <cstring> + #include <espeak/speak_lib.h> + #include <glib/gi18n.h> + +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-gucharmap-plugin/stardict_gucharmap.cpp stardict-3.0.1/stardict-plugins/stardict-gucharmap-plugin/stardict_gucharmap.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-gucharmap-plugin/stardict_gucharmap.cpp 2007-08-31 15:10:41.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-gucharmap-plugin/stardict_gucharmap.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,7 +1,8 @@ + #include "stardict_gucharmap.h" + #include <glib/gi18n.h> + #include <gucharmap/gucharmap.h> +-#include <string> ++#include <cstring> ++#include <cstdlib> + + static char *build_dictdata(char type, const char *definition) + { +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-html-parsedata-plugin/stardict_html_parsedata.cpp stardict-3.0.1/stardict-plugins/stardict-html-parsedata-plugin/stardict_html_parsedata.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-html-parsedata-plugin/stardict_html_parsedata.cpp 2007-09-13 15:51:55.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-html-parsedata-plugin/stardict_html_parsedata.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,4 +1,6 @@ + #include "stardict_html_parsedata.h" ++#include <cstring> ++#include <cstdlib> + #include <glib/gi18n.h> + + #ifdef _WIN32 +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-man-plugin/stardict_man.cpp stardict-3.0.1/stardict-plugins/stardict-man-plugin/stardict_man.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-man-plugin/stardict_man.cpp 2007-09-19 16:30:54.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-man-plugin/stardict_man.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,6 +1,6 @@ + #include "stardict_man.h" + #include <glib/gi18n.h> +-#include <string> ++#include <cstring> + + static const StarDictPluginSystemInfo *plugin_info = NULL; + static bool need_prefix; +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-powerword-parsedata-plugin/stardict_powerword_parsedata.cpp stardict-3.0.1/stardict-plugins/stardict-powerword-parsedata-plugin/stardict_powerword_parsedata.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-powerword-parsedata-plugin/stardict_powerword_parsedata.cpp 2007-10-25 16:16:37.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-powerword-parsedata-plugin/stardict_powerword_parsedata.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,4 +1,5 @@ + #include "stardict_powerword_parsedata.h" ++#include <cstring> + #include <glib/gi18n.h> + + #ifdef _WIN32 +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-qqwry-plugin/stardict_qqwry.cpp stardict-3.0.1/stardict-plugins/stardict-qqwry-plugin/stardict_qqwry.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-qqwry-plugin/stardict_qqwry.cpp 2007-11-02 16:41:26.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-qqwry-plugin/stardict_qqwry.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,7 +1,8 @@ + #include "stardict_qqwry.h" + #include <glib/gi18n.h> + #include <glib/gstdio.h> +-#include <string> ++#include <cstring> ++#include <cstdlib> + + #ifdef _WIN32 + #include <windows.h> +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-spell-plugin/stardict_spell.cpp stardict-3.0.1/stardict-plugins/stardict-spell-plugin/stardict_spell.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-spell-plugin/stardict_spell.cpp 2007-09-19 16:29:21.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-spell-plugin/stardict_spell.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,4 +1,5 @@ + #include "stardict_spell.h" ++#include <cstring> + #include <glib.h> + #include <glib/gi18n.h> + #include <enchant.h> +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki2xml.cpp stardict-3.0.1/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki2xml.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki2xml.cpp 2007-07-10 15:16:15.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki2xml.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,5 +1,6 @@ + #include "stardict_wiki2xml.h" + #include "WIKI2XML.h" ++#include <cstring> + #include <glib.h> + + std::string wiki2xml(std::string &str) +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki_parsedata.cpp stardict-3.0.1/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki_parsedata.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki_parsedata.cpp 2007-08-31 14:41:21.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-wiki-parsedata-plugin/stardict_wiki_parsedata.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,5 +1,6 @@ + #include "stardict_wiki_parsedata.h" + #include "stardict_wiki2xml.h" ++#include <cstring> + #include <glib/gi18n.h> + + #ifdef _WIN32 +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-wordnet-plugin/court_widget.cpp stardict-3.0.1/stardict-plugins/stardict-wordnet-plugin/court_widget.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-wordnet-plugin/court_widget.cpp 2007-10-18 09:36:22.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-wordnet-plugin/court_widget.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,4 +1,5 @@ + #include "court_widget.h" ++#include <cstring> + #include <math.h> + #include <list> + +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet.cpp stardict-3.0.1/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet.cpp 2007-10-15 11:32:04.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,5 +1,6 @@ + #include "stardict_wordnet.h" + #include "court_widget.h" ++#include <cstring> + #include <glib/gi18n.h> + + #ifdef _WIN32 +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet_parsedata.cpp stardict-3.0.1/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet_parsedata.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet_parsedata.cpp 2007-10-10 17:39:10.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-wordnet-plugin/stardict_wordnet_parsedata.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,4 +1,5 @@ + #include "stardict_wordnet_parsedata.h" ++#include <cstring> + #include <glib/gi18n.h> + + #ifdef _WIN32 +diff -urNad stardict-3.0.1~/stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp stardict-3.0.1/stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp +--- stardict-3.0.1~/stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp 2007-08-31 14:41:54.000000000 +0800 ++++ stardict-3.0.1/stardict-plugins/stardict-xdxf-parsedata-plugin/stardict_xdxf_parsedata.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -1,4 +1,5 @@ + #include "stardict_xdxf_parsedata.h" ++#include <cstring> + #include <glib/gi18n.h> + + #ifdef _WIN32 +diff -urNad stardict-3.0.1~/tests/t_config_file.cpp stardict-3.0.1/tests/t_config_file.cpp +--- stardict-3.0.1~/tests/t_config_file.cpp 2007-07-10 15:16:04.000000000 +0800 ++++ stardict-3.0.1/tests/t_config_file.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -8,6 +8,7 @@ + #include <cstring> + #include <iterator> + #include <iostream> ++#include <memory> + #include <gtk/gtk.h> + + #include "config_file.hpp" +diff -urNad stardict-3.0.1~/tests/t_xml.cpp stardict-3.0.1/tests/t_xml.cpp +--- stardict-3.0.1~/tests/t_xml.cpp 2007-07-10 15:16:04.000000000 +0800 ++++ stardict-3.0.1/tests/t_xml.cpp 2008-06-17 02:27:35.000000000 +0800 +@@ -5,6 +5,7 @@ + #include <glib.h> + #include <cstdlib> + #include <string> ++#include <cstring> + + + static void xml_decode(const char *str, std::string& decoded) diff --git a/misc/stardict/patches/stardict-transparent.patch b/misc/stardict/patches/stardict-transparent.patch new file mode 100644 index 0000000000000..1f4c149d522ff --- /dev/null +++ b/misc/stardict/patches/stardict-transparent.patch @@ -0,0 +1,101 @@ +Index: src/eggtrayicon.c +=================================================================== +--- src/eggtrayicon.c (revision 248) ++++ src/eggtrayicon.c (working copy) +@@ -66,6 +66,8 @@ + + static void egg_tray_icon_realize (GtkWidget *widget); + static void egg_tray_icon_unrealize (GtkWidget *widget); ++static void egg_tray_icon_add (GtkContainer *container, ++ GtkWidget *widget); + + #ifdef GDK_WINDOWING_X11 + static void egg_tray_icon_update_manager_window (EggTrayIcon *icon, +@@ -113,6 +115,7 @@ + { + GObjectClass *gobject_class = (GObjectClass *)klass; + GtkWidgetClass *widget_class = (GtkWidgetClass *)klass; ++ GtkContainerClass *container_class = (GtkContainerClass *)klass; + + parent_class = g_type_class_peek_parent (klass); + +@@ -121,6 +124,8 @@ + widget_class->realize = egg_tray_icon_realize; + widget_class->unrealize = egg_tray_icon_unrealize; + ++ container_class->add = egg_tray_icon_add; ++ + g_object_class_install_property (gobject_class, + PROP_ORIENTATION, + g_param_spec_enum ("orientation", +@@ -159,8 +164,37 @@ + } + + #ifdef GDK_WINDOWING_X11 ++static gboolean ++transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data) ++{ ++ gdk_window_clear_area (widget->window, event->area.x, event->area.y, ++ event->area.width, event->area.height); ++ return FALSE; ++} + + static void ++make_transparent_again (GtkWidget *widget, GtkStyle *previous_style, ++ gpointer user_data) ++{ ++ gdk_window_set_back_pixmap(widget->window, NULL, TRUE); ++} ++ ++static void ++make_transparent (GtkWidget *widget, gpointer user_data) ++{ ++ if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget)) ++ return; ++ ++ gtk_widget_set_app_paintable (widget, TRUE); ++ gtk_widget_set_double_buffered (widget, FALSE); ++ gdk_window_set_back_pixmap (widget->window, NULL, TRUE); ++ g_signal_connect (widget, "expose_event", ++ G_CALLBACK (transparent_expose_event), NULL); ++ g_signal_connect_after (widget, "style_set", ++ G_CALLBACK (make_transparent_again), NULL); ++} ++ ++static void + egg_tray_icon_get_orientation_property (EggTrayIcon *icon) + { + Display *xdisplay; +@@ -238,10 +272,22 @@ + } + return GDK_FILTER_CONTINUE; + } +- ++#else ++static void ++make_transparent (GtkWidget *widget, gpointer user_data) ++{ ++} + #endif + + static void ++egg_tray_icon_add (GtkContainer *container, GtkWidget *widget) ++{ ++ g_signal_connect (widget, "realize", ++ G_CALLBACK (make_transparent), NULL); ++ GTK_CONTAINER_CLASS (parent_class)->add (container, widget); ++} ++ ++static void + egg_tray_icon_unrealize (GtkWidget *widget) + { + #ifdef GDK_WINDOWING_X11 +@@ -381,6 +427,8 @@ + if (GTK_WIDGET_CLASS (parent_class)->realize) + GTK_WIDGET_CLASS (parent_class)->realize (widget); + ++ make_transparent (widget, NULL); ++ + screen = gtk_widget_get_screen (widget); + display = gdk_screen_get_display (screen); + xdisplay = gdk_x11_display_get_xdisplay (display); diff --git a/misc/stardict/slack-desc b/misc/stardict/slack-desc new file mode 100644 index 0000000000000..3730a737dde6e --- /dev/null +++ b/misc/stardict/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +stardict: stardict (international dictionary software) +stardict: +stardict: StarDict is a Cross-Platform and international dictionary written +stardict: in Gtk2. It has powerful features such as "Glob-style pattern +stardict: matching," "Scan selection word," "Fuzzy query," etc. +stardict: +stardict: Homepage: http://stardict.sourceforge.net/ +stardict: +stardict: +stardict: +stardict: diff --git a/misc/stardict/stardict.SlackBuild b/misc/stardict/stardict.SlackBuild new file mode 100644 index 0000000000000..80b0465c428ad --- /dev/null +++ b/misc/stardict/stardict.SlackBuild @@ -0,0 +1,110 @@ +#!/bin/sh + +# Slackware build script for StarDict + +# Copyright 2008-2009 Murat D. Kadirov <banderols@gmail.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=stardict +VERSION=${VERSION:-3.0.1} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Uncomment string below to fix transparent icon tray. Patch from svn. +# See http://www.stardict.org/forum/viewtopic.php?f=5&t=246 +patch src/eggtrayicon.c -p1 < $CWD/patches/stardict-transparent.patch +patch -p1 < $CWD/patches/05_g++-4.3.dpatch + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-gucharmap \ + --disable-festival \ + --disable-espeak \ + --disable-gnome-support \ + --disable-schemas-install \ + --disable-updateinfo \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog README TODO doc/FAQ doc/HACKING \ + doc/HowToCreateDictionary doc/Translation doc/StarDictFileFormat \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/misc/stardict/stardict.info b/misc/stardict/stardict.info new file mode 100644 index 0000000000000..1ea253b76be5d --- /dev/null +++ b/misc/stardict/stardict.info @@ -0,0 +1,10 @@ +PRGNAM="stardict" +VERSION="3.0.1" +HOMEPAGE="http://stardict.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/stardict/stardict-3.0.1.tar.bz2" +MD5SUM="93bb2d7825bc9d52a4f9ba4c1c506d1d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Murat D. Kadirov" +EMAIL="banderols@gmail.com" +APPROVED="rworkman" |