From 025a74ffe78f5132905270cbb04ebd530165aa3f Mon Sep 17 00:00:00 2001 From: Ignacio Vazquez-Abrams Date: Oct 07 2008 15:27:07 +0000 Subject: - Upstream update - Extract inner function in switchspell (#462822) --- diff --git a/.cvsignore b/.cvsignore index 6291e88..b693132 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -purple-plugin_pack-2.3.0.tar.bz2 +purple-plugin_pack-2.4.0.tar.bz2 diff --git a/purple-plugin_pack-2.3.0-switchspell-enchant.patch b/purple-plugin_pack-2.3.0-switchspell-enchant.patch deleted file mode 100644 index a3c6131..0000000 --- a/purple-plugin_pack-2.3.0-switchspell-enchant.patch +++ /dev/null @@ -1,245 +0,0 @@ -diff -up purple-plugin_pack-2.3.0/configure.enchant purple-plugin_pack-2.3.0/configure ---- purple-plugin_pack-2.3.0/configure.enchant 2008-04-06 12:33:13.000000000 -0400 -+++ purple-plugin_pack-2.3.0/configure 2008-04-06 12:38:06.000000000 -0400 -@@ -23809,18 +23809,18 @@ fi - - BUILD_SWITCH_SPELL=no - if test x"$gtkspell" = x"yes" ; then -- if test "${ac_cv_header_aspell_h+set}" = set; then -- { echo "$as_me:$LINENO: checking for aspell.h" >&5 --echo $ECHO_N "checking for aspell.h... $ECHO_C" >&6; } --if test "${ac_cv_header_aspell_h+set}" = set; then -+ if test "${ac_cv_header_enchant_h+set}" = set; then -+ { echo "$as_me:$LINENO: checking for enchant.h" >&5 -+echo $ECHO_N "checking for enchant.h... $ECHO_C" >&6; } -+if test "${ac_cv_header_enchant_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - fi --{ echo "$as_me:$LINENO: result: $ac_cv_header_aspell_h" >&5 --echo "${ECHO_T}$ac_cv_header_aspell_h" >&6; } -+{ echo "$as_me:$LINENO: result: $ac_cv_header_enchant_h" >&5 -+echo "${ECHO_T}$ac_cv_header_enchant_h" >&6; } - else - # Is the header compilable? --{ echo "$as_me:$LINENO: checking aspell.h usability" >&5 --echo $ECHO_N "checking aspell.h usability... $ECHO_C" >&6; } -+{ echo "$as_me:$LINENO: checking enchant.h usability" >&5 -+echo $ECHO_N "checking enchant.h usability... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -23828,7 +23828,7 @@ cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ - $ac_includes_default --#include -+#include - _ACEOF - rm -f conftest.$ac_objext - if { (ac_try="$ac_compile" -@@ -23860,15 +23860,15 @@ rm -f core conftest.err conftest.$ac_obj - echo "${ECHO_T}$ac_header_compiler" >&6; } - - # Is the header present? --{ echo "$as_me:$LINENO: checking aspell.h presence" >&5 --echo $ECHO_N "checking aspell.h presence... $ECHO_C" >&6; } -+{ echo "$as_me:$LINENO: checking enchant.h presence" >&5 -+echo $ECHO_N "checking enchant.h presence... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ --#include -+#include - _ACEOF - if { (ac_try="$ac_cpp conftest.$ac_ext" - case "(($ac_try" in -@@ -23901,25 +23901,25 @@ echo "${ECHO_T}$ac_header_preproc" >&6; - # So? What about this header? - case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) -- { echo "$as_me:$LINENO: WARNING: aspell.h: accepted by the compiler, rejected by the preprocessor!" >&5 --echo "$as_me: WARNING: aspell.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -- { echo "$as_me:$LINENO: WARNING: aspell.h: proceeding with the compiler's result" >&5 --echo "$as_me: WARNING: aspell.h: proceeding with the compiler's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: enchant.h: accepted by the compiler, rejected by the preprocessor!" >&5 -+echo "$as_me: WARNING: enchant.h: accepted by the compiler, rejected by the preprocessor!" >&2;} -+ { echo "$as_me:$LINENO: WARNING: enchant.h: proceeding with the compiler's result" >&5 -+echo "$as_me: WARNING: enchant.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) -- { echo "$as_me:$LINENO: WARNING: aspell.h: present but cannot be compiled" >&5 --echo "$as_me: WARNING: aspell.h: present but cannot be compiled" >&2;} -- { echo "$as_me:$LINENO: WARNING: aspell.h: check for missing prerequisite headers?" >&5 --echo "$as_me: WARNING: aspell.h: check for missing prerequisite headers?" >&2;} -- { echo "$as_me:$LINENO: WARNING: aspell.h: see the Autoconf documentation" >&5 --echo "$as_me: WARNING: aspell.h: see the Autoconf documentation" >&2;} -- { echo "$as_me:$LINENO: WARNING: aspell.h: section \"Present But Cannot Be Compiled\"" >&5 --echo "$as_me: WARNING: aspell.h: section \"Present But Cannot Be Compiled\"" >&2;} -- { echo "$as_me:$LINENO: WARNING: aspell.h: proceeding with the preprocessor's result" >&5 --echo "$as_me: WARNING: aspell.h: proceeding with the preprocessor's result" >&2;} -- { echo "$as_me:$LINENO: WARNING: aspell.h: in the future, the compiler will take precedence" >&5 --echo "$as_me: WARNING: aspell.h: in the future, the compiler will take precedence" >&2;} -+ { echo "$as_me:$LINENO: WARNING: enchant.h: present but cannot be compiled" >&5 -+echo "$as_me: WARNING: enchant.h: present but cannot be compiled" >&2;} -+ { echo "$as_me:$LINENO: WARNING: enchant.h: check for missing prerequisite headers?" >&5 -+echo "$as_me: WARNING: enchant.h: check for missing prerequisite headers?" >&2;} -+ { echo "$as_me:$LINENO: WARNING: enchant.h: see the Autoconf documentation" >&5 -+echo "$as_me: WARNING: enchant.h: see the Autoconf documentation" >&2;} -+ { echo "$as_me:$LINENO: WARNING: enchant.h: section \"Present But Cannot Be Compiled\"" >&5 -+echo "$as_me: WARNING: enchant.h: section \"Present But Cannot Be Compiled\"" >&2;} -+ { echo "$as_me:$LINENO: WARNING: enchant.h: proceeding with the preprocessor's result" >&5 -+echo "$as_me: WARNING: enchant.h: proceeding with the preprocessor's result" >&2;} -+ { echo "$as_me:$LINENO: WARNING: enchant.h: in the future, the compiler will take precedence" >&5 -+echo "$as_me: WARNING: enchant.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX - ## --------------------------------------------------- ## - ## Report this to plugins-devel@lists.guifications.org ## -@@ -23928,18 +23928,18 @@ _ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; - esac --{ echo "$as_me:$LINENO: checking for aspell.h" >&5 --echo $ECHO_N "checking for aspell.h... $ECHO_C" >&6; } --if test "${ac_cv_header_aspell_h+set}" = set; then -+{ echo "$as_me:$LINENO: checking for enchant.h" >&5 -+echo $ECHO_N "checking for enchant.h... $ECHO_C" >&6; } -+if test "${ac_cv_header_enchant_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else -- ac_cv_header_aspell_h=$ac_header_preproc -+ ac_cv_header_enchant_h=$ac_header_preproc - fi --{ echo "$as_me:$LINENO: result: $ac_cv_header_aspell_h" >&5 --echo "${ECHO_T}$ac_cv_header_aspell_h" >&6; } -+{ echo "$as_me:$LINENO: result: $ac_cv_header_enchant_h" >&5 -+echo "${ECHO_T}$ac_cv_header_enchant_h" >&6; } - - fi --if test $ac_cv_header_aspell_h = yes; then -+if test $ac_cv_header_enchant_h = yes; then - HAVE_ASPELL_H=yes - else - HAVE_ASPELL_H=no -@@ -23947,13 +23947,13 @@ fi - - - if test x"$HAVE_ASPELL_H" = x"yes" ; then -- { echo "$as_me:$LINENO: checking for new_aspell_config in -laspell" >&5 --echo $ECHO_N "checking for new_aspell_config in -laspell... $ECHO_C" >&6; } --if test "${ac_cv_lib_aspell_new_aspell_config+set}" = set; then -+ { echo "$as_me:$LINENO: checking for enchant_broker_init in -lenchant" >&5 -+echo $ECHO_N "checking for enchant_broker_init in -lenchant... $ECHO_C" >&6; } -+if test "${ac_cv_lib_enchant_enchant_broker_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-laspell $LIBS" -+LIBS="-lenchant $LIBS" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ - _ACEOF -@@ -23967,11 +23967,11 @@ cat >>conftest.$ac_ext <<_ACEOF - #ifdef __cplusplus - extern "C" - #endif --char new_aspell_config (); -+char enchant_broker_init (); - int - main () - { --return new_aspell_config (); -+return enchant_broker_init (); - ; - return 0; - } -@@ -23994,21 +23994,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then -- ac_cv_lib_aspell_new_aspell_config=yes -+ ac_cv_lib_enchant_enchant_broker_init=yes - else - echo "$as_me: failed program was:" >&5 - sed 's/^/| /' conftest.$ac_ext >&5 - -- ac_cv_lib_aspell_new_aspell_config=no -+ ac_cv_lib_enchant_enchant_broker_init=no - fi - - rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --{ echo "$as_me:$LINENO: result: $ac_cv_lib_aspell_new_aspell_config" >&5 --echo "${ECHO_T}$ac_cv_lib_aspell_new_aspell_config" >&6; } --if test $ac_cv_lib_aspell_new_aspell_config = yes; then -+{ echo "$as_me:$LINENO: result: $ac_cv_lib_enchant_enchant_broker_init" >&5 -+echo "${ECHO_T}$ac_cv_lib_enchant_enchant_broker_init" >&6; } -+if test $ac_cv_lib_enchant_enchant_broker_init = yes; then - BUILD_SWITCH_SPELL=yes - else - BUILD_SWITCH_SPELL=no -diff -up purple-plugin_pack-2.3.0/switchspell/switchspell.c.enchant purple-plugin_pack-2.3.0/switchspell/switchspell.c ---- purple-plugin_pack-2.3.0/switchspell/switchspell.c.enchant 2008-03-12 21:47:57.000000000 -0400 -+++ purple-plugin_pack-2.3.0/switchspell/switchspell.c 2008-04-06 12:31:44.000000000 -0400 -@@ -35,7 +35,7 @@ - #include - #include - --#include -+#include - #include - #include - -@@ -97,10 +97,7 @@ regenerate_switchspell_menu(PidginConver - GtkWidget *menu; - GtkWidget *mitem; - GSList *group = NULL; -- AspellConfig * config; -- AspellDictInfoList * dlist; -- AspellDictInfoEnumeration * dels; -- const AspellDictInfo * entry; -+ EnchantBroker * eb; - - if (gtkconv == NULL) - return; -@@ -122,24 +119,25 @@ regenerate_switchspell_menu(PidginConver - menu = gtk_menu_new(); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(mitem), menu); - -- config = new_aspell_config(); -- dlist = get_aspell_dict_info_list(config); -- delete_aspell_config(config); -- -- dels = aspell_dict_info_list_elements(dlist); -- aspell_dict_info_list_empty(dlist); -- while ((entry = aspell_dict_info_enumeration_next(dels)) != 0) { -- GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, entry->name); -+ void enchDictDescCb(const char * const lang_tag, -+ const char * const provider_name, -+ const char * const provider_desc, -+ const char * const provider_file, -+ void * user_data) -+ { -+ GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, lang_tag); - group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem)); - g_object_set_data(G_OBJECT(menuitem), "user_data", win); -- g_object_set_data(G_OBJECT(menuitem), "lang", (gchar *)entry->name); -+ g_object_set_data(G_OBJECT(menuitem), "lang", (gchar *)lang_tag); - g_signal_connect(G_OBJECT(menuitem), "activate", - G_CALLBACK(menu_conv_use_dict_cb), NULL); - gtk_widget_show(menuitem); - gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); - } - -- delete_aspell_dict_info_enumeration(dels); -+ eb = enchant_broker_init(); -+ enchant_broker_list_dicts(eb, enchDictDescCb, NULL); -+ enchant_broker_free(eb); - gtk_widget_show_all(menu); - } - diff --git a/purple-plugin_pack-2.4.0-switchspell-execstack.patch b/purple-plugin_pack-2.4.0-switchspell-execstack.patch new file mode 100644 index 0000000..68a7cc5 --- /dev/null +++ b/purple-plugin_pack-2.4.0-switchspell-execstack.patch @@ -0,0 +1,92 @@ +diff -up purple-plugin_pack-2.4.0/switchspell/switchspell.c.execstack purple-plugin_pack-2.4.0/switchspell/switchspell.c +--- purple-plugin_pack-2.4.0/switchspell/switchspell.c.execstack 2008-08-03 17:05:11.000000000 -0400 ++++ purple-plugin_pack-2.4.0/switchspell/switchspell.c 2008-10-05 02:47:14.000000000 -0400 +@@ -98,16 +98,44 @@ menu_conv_use_dict_cb(GObject *m, gpoint + purple_blist_node_set_string(node, "switchspell", lang); + } + ++#ifdef USE_ENCHANT ++struct nufan ++{ ++ GtkWidget *menu; ++ PidginWindow *win; ++}; ++ ++ void enchant_dict_desc_cb(const char * const lang_tag, const char * const provider_name, ++ const char * const provider_desc, const char * const provider_file, ++ void *user_data) ++ { ++ GtkWidget *menu = ((struct nufan *)user_data)->menu; ++ PidginWindow *win = ((struct nufan *)user_data)->win; ++ ++ GSList *group = NULL; ++ GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, lang_tag); ++ group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem)); ++ g_object_set_data(G_OBJECT(menuitem), "user_data", win); ++ g_object_set_data_full(G_OBJECT(menuitem), "lang", g_strdup(lang_tag), g_free); ++ g_signal_connect(G_OBJECT(menuitem), "activate", ++ G_CALLBACK(menu_conv_use_dict_cb), NULL); ++ gtk_widget_show(menuitem); ++ gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); ++ } ++ ++#endif ++ + static void + regenerate_switchspell_menu(PidginConversation *gtkconv) + { + PidginWindow *win; + GtkWidget *menu; + GtkWidget *mitem; +- GSList *group = NULL; + #ifdef USE_ENCHANT ++ struct nufan user_data; + EnchantBroker * eb; + #else ++ GSList *group = NULL; + AspellConfig * config; + AspellDictInfoList * dlist; + AspellDictInfoEnumeration * dels; +@@ -134,13 +162,7 @@ regenerate_switchspell_menu(PidginConver + menu = gtk_menu_new(); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(mitem), menu); + +-#ifdef USE_ENCHANT +- void enchant_dict_desc_cb(const char * const lang_tag, const char * const provider_name, +- const char * const provider_desc, const char * const provider_file, +- void *user_data) +- { +- GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, lang_tag); +-#else ++#ifndef USE_ENCHANT + config = new_aspell_config(); + dlist = get_aspell_dict_info_list(config); + delete_aspell_config(config); +@@ -149,23 +171,21 @@ regenerate_switchspell_menu(PidginConver + aspell_dict_info_list_empty(dlist); + while ((entry = aspell_dict_info_enumeration_next(dels)) != 0) { + GtkWidget *menuitem = gtk_radio_menu_item_new_with_label(group, entry->name); +-#endif + group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(menuitem)); + g_object_set_data(G_OBJECT(menuitem), "user_data", win); +-#ifdef USE_ENCHANT +- g_object_set_data_full(G_OBJECT(menuitem), "lang", g_strdup(lang_tag), g_free); +-#else + g_object_set_data_full(G_OBJECT(menuitem), "lang", g_strdup((gchar *)entry->name), g_free); +-#endif + g_signal_connect(G_OBJECT(menuitem), "activate", + G_CALLBACK(menu_conv_use_dict_cb), NULL); + gtk_widget_show(menuitem); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); + } ++#endif + + #ifdef USE_ENCHANT ++ user_data.menu = menu; ++ user_data.win = win; + eb = enchant_broker_init(); +- enchant_broker_list_dicts(eb, enchant_dict_desc_cb, NULL); ++ enchant_broker_list_dicts(eb, enchant_dict_desc_cb, &user_data); + enchant_broker_free(eb); + #else + delete_aspell_dict_info_enumeration(dels); diff --git a/purple-plugin_pack.spec b/purple-plugin_pack.spec index b48a676..cca4db8 100644 --- a/purple-plugin_pack.spec +++ b/purple-plugin_pack.spec @@ -1,5 +1,5 @@ Name: purple-plugin_pack -Version: 2.3.0 +Version: 2.4.0 Release: 1%{?dist} Summary: A set of plugins for libpurple, pidgin, and finch @@ -7,12 +7,12 @@ Group: Applications/Internet License: GPLv2+ URL: http://plugins.guifications.org/trac/wiki/PluginPack Source0: http://downloads.guifications.org/plugins/Plugin%20Pack/purple-plugin_pack-%{version}.tar.bz2 -Patch0: purple-plugin_pack-2.3.0-switchspell-enchant.patch +Patch0: purple-plugin_pack-2.4.0-switchspell-execstack.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pidgin-devel xmms-devel perl(XML::Parser) gettext-devel BuildRequires: enchant-devel gtkspell-devel -BuildRequires: diffutils +BuildRequires: diffutils intltool #Requires: Provides: purple-plugin-pack @@ -74,7 +74,7 @@ This package contains a plugin for pidgin to control xmms. %prep %setup -q -%patch0 -p 1 -b .enchant +%patch0 -p 1 -b .execstack %build %configure @@ -108,6 +108,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pidgin/xmmsremote.so %changelog +* Tue Oct 7 2008 Ignacio Vazquez-Abrams 2.4.0-1 +- Upstream update +- Extract inner function in switchspell (#462822) + * Sun Apr 6 2008 Ignacio Vazquez-Abrams 2.3.0-1 - Upstream update diff --git a/sources b/sources index c41458f..dcf6215 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -32a297e854341c5b043a5325ee6f0819 purple-plugin_pack-2.3.0.tar.bz2 +ae7e133119eb7f127e22566fe9f56145 purple-plugin_pack-2.4.0.tar.bz2