rpms/bluefish/devel bluefish-1.0.7-enchant-configure.patch, NONE, 1.1 bluefish-1.0.7-enchant.patch, NONE, 1.1 bluefish.spec, 1.28, 1.29
Paul Howarth
pghmcfc at fedoraproject.org
Fri Jul 31 13:29:09 UTC 2009
Author: pghmcfc
Update of /cvs/pkgs/rpms/bluefish/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1465
Modified Files:
bluefish.spec
Added Files:
bluefish-1.0.7-enchant-configure.patch
bluefish-1.0.7-enchant.patch
Log Message:
- Include patch from Caolan McNamara for using enchant rather than aspell for
spell-checking (#509514)
http://fedoraproject.org/wiki/Releases/FeatureDictionary
- Try to maintain timestamps on unmodified files from upstream
bluefish-1.0.7-enchant-configure.patch:
configure | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
--- NEW FILE bluefish-1.0.7-enchant-configure.patch ---
diff -ur bluefish-1.0.7.orig/configure bluefish-1.0.7/configure
--- bluefish-1.0.7.orig/configure 2006-11-05 19:36:59.000000000 +0000
+++ bluefish-1.0.7/configure 2009-07-30 16:38:30.000000000 +0100
@@ -4519,7 +4519,20 @@
fi
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+# Check ENCHANT is available
+echo -n "checking for enchant... "
+if pkg-config --exists enchant ; then
+ LIBS="$LIBS `pkg-config --libs enchant`"
+ CFLAGS="$CFLAGS `pkg-config --cflags enchant`"
+ echo "yes"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENCHANT 1
+_ACEOF
+
+else
+ echo "no"
+ # otherwise Check ASPELL is available
+ # On IRIX 5.3, sys/types and inttypes.h are conflicting.
@@ -4834,14 +4847,14 @@
echo "${ECHO_T}$ac_cv_lib_aspell_new_aspell_config" >&6; }
if test $ac_cv_lib_aspell_new_aspell_config = yes; then
LIBS="$LIBS -laspell"
- cat >>confdefs.h <<\_ACEOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBASPELL 1
_ACEOF
else
OLDLIBS=$LIBS
- LIBS="$OLDSLIBS -lstdc++"
- { echo "$as_me:$LINENO: checking for new_aspell_config in -laspell" >&5
+ LIBS="$OLDSLIBS -lstdc++"
+ { 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 $ECHO_N "(cached) $ECHO_C" >&6
@@ -4920,13 +4933,13 @@
echo "${ECHO_T}$ac_cv_lib_aspell_new_aspell_config" >&6; }
if test $ac_cv_lib_aspell_new_aspell_config = yes; then
LIBS="$LIBS -laspell"
- cat >>confdefs.h <<\_ACEOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBASPELL 1
_ACEOF
else
LIBS="$OLDSLIBS -laspell-common -lstdc++"
- { echo "$as_me:$LINENO: checking for new_aspell_config in -laspell" >&5
+ { 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 $ECHO_N "(cached) $ECHO_C" >&6
@@ -5005,13 +5018,13 @@
echo "${ECHO_T}$ac_cv_lib_aspell_new_aspell_config" >&6; }
if test $ac_cv_lib_aspell_new_aspell_config = yes; then
LIBS="$LIBS -laspell"
- cat >>confdefs.h <<\_ACEOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBASPELL 1
_ACEOF
else
LIBS=$OLDLIBS
- echo "libaspell not found please install libaspell-dev or similar"
+ echo "libaspell not found please install libaspell-dev or similar"
fi
@@ -5025,6 +5038,7 @@
fi
+fi
localedir='${prefix}/share/locale'
bluefish-1.0.7-enchant.patch:
INSTALL | 2
configure.ac | 33 +++++++----
redhat/bluefish.spec | 4 -
src/about.c | 3 +
src/bfspell.c | 148 ++++++++++++++++++++++++++++++++++++++++++---------
src/bfspell.h | 4 -
src/bluefish.h | 4 -
src/config.h.in | 3 +
src/gui.c | 8 +-
src/menu.c | 8 +-
src/rcfile.c | 4 -
11 files changed, 168 insertions(+), 53 deletions(-)
--- NEW FILE bluefish-1.0.7-enchant.patch ---
diff -ru bluefish-1.0.7.orig/configure.ac bluefish-1.0.7/configure.ac
--- bluefish-1.0.7.orig/configure.ac 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/configure.ac 2009-07-02 16:24:04.000000000 +0100
@@ -324,25 +324,36 @@
)
)
-AC_CHECK_HEADER(aspell.h,
- AC_CHECK_LIB(aspell, new_aspell_config,
- LIBS="$LIBS -laspell"
- AC_DEFINE(HAVE_LIBASPELL),
- OLDLIBS=$LIBS
- LIBS="$OLDSLIBS -lstdc++"
- AC_CHECK_LIB(aspell, new_aspell_config,
+# Check ENCHANT is available
+echo -n "checking for enchant... "
+if pkg-config --exists enchant ; then
+ LIBS="$LIBS `pkg-config --libs enchant`"
+ CFLAGS="$CFLAGS `pkg-config --cflags enchant`"
+ echo "yes"
+ AC_DEFINE(HAVE_ENCHANT)
+else
+ echo "no"
+ # otherwise Check ASPELL is available
+ AC_CHECK_HEADER(aspell.h,
+ AC_CHECK_LIB(aspell, new_aspell_config,
LIBS="$LIBS -laspell"
AC_DEFINE(HAVE_LIBASPELL),
- LIBS="$OLDSLIBS -laspell-common -lstdc++"
+ OLDLIBS=$LIBS
+ LIBS="$OLDSLIBS -lstdc++"
AC_CHECK_LIB(aspell, new_aspell_config,
LIBS="$LIBS -laspell"
AC_DEFINE(HAVE_LIBASPELL),
- LIBS=$OLDLIBS
- echo "libaspell not found please install libaspell-dev or similar"
+ LIBS="$OLDSLIBS -laspell-common -lstdc++"
+ AC_CHECK_LIB(aspell, new_aspell_config,
+ LIBS="$LIBS -laspell"
+ AC_DEFINE(HAVE_LIBASPELL),
+ LIBS=$OLDLIBS
+ echo "libaspell not found please install libaspell-dev or similar"
+ )
)
)
)
-)
+fi
localedir='${prefix}/share/locale'
AC_SUBST(localedir)
diff -ru bluefish-1.0.7.orig/INSTALL bluefish-1.0.7/INSTALL
--- bluefish-1.0.7.orig/INSTALL 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/INSTALL 2009-07-02 16:16:47.000000000 +0100
@@ -6,7 +6,7 @@
*libgtk2 (preferrably 2.2.2 or newer)
*libpcre
*gnome-vfs2 (Optional; for remote file handling)
- *aspell (Optional; for spell checking)
+ *enchant or aspell (Optional; for spell checking)
*grep and find are required to use the Advance Open function
2) run ./configure --help
diff -ru bluefish-1.0.7.orig/redhat/bluefish.spec bluefish-1.0.7/redhat/bluefish.spec
--- bluefish-1.0.7.orig/redhat/bluefish.spec 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/redhat/bluefish.spec 2009-07-02 16:16:29.000000000 +0100
@@ -13,9 +13,9 @@
URL: http://bluefish.openoffice.nl
License: GPL
Group: Development/Tools
-Requires: gtk2, pcre, aspell, gnome-vfs2
+Requires: gtk2, pcre, enchant, gnome-vfs2
BuildRequires: gtk2-devel, pcre-devel, gnome-vfs2-devel
-BuildRequires: aspell-devel, desktop-file-utils, gettext
+BuildRequires: enchant-devel, desktop-file-utils, gettext
Requires(post): desktop-file-utils, shared-mime-info
Requires(postun): desktop-file-utils, shared-mime-info
BuildRoot: %{_tmppath}/%{name}-%{release}-root
diff -ru bluefish-1.0.7.orig/src/about.c bluefish-1.0.7/src/about.c
--- bluefish-1.0.7.orig/src/about.c 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/src/about.c 2009-07-02 16:18:41.000000000 +0100
@@ -201,6 +201,9 @@
notebook = gtk_notebook_new();
config_options = g_strconcat (CONFIGURE_OPTIONS, _("\n\nResulting in the detection of:\n"),
+#ifdef HAVE_ENCHANT
+ "enchant\n",
+#endif
#ifdef HAVE_LIBASPELL
"libaspell\n",
#endif
diff -ru bluefish-1.0.7.orig/src/bfspell.c bluefish-1.0.7/src/bfspell.c
--- bluefish-1.0.7.orig/src/bfspell.c 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/src/bfspell.c 2009-07-03 08:58:12.000000000 +0100
@@ -22,8 +22,12 @@
#include "config.h"
-#ifdef HAVE_LIBASPELL
+#if defined(HAVE_ENCHANT) || defined(HAVE_LIBASPELL)
+#if defined(HAVE_LIBASPELL)
#include <aspell.h>
+#elif defined(HAVE_ENCHANT)
+#include <enchant.h>
+#endif
#include <gtk/gtk.h>
#include <string.h>
#include <ctype.h> /* isdigit() */
@@ -39,8 +43,13 @@
typedef enum {filtnone,filthtml} Tspellfilter;
typedef struct {
+#if defined(HAVE_ENCHANT)
+ EnchantBroker *broker;
+ EnchantDict *spell_checker;
+#else
AspellConfig *spell_config;
AspellSpeller *spell_checker;
+#endif
Tspellfilter filtert;
GtkWidget *win;
GtkWidget *lang;
@@ -119,19 +128,37 @@
void spell_add_to_session(Tbfspell *bfspell, gboolean to_session, const gchar * word) {
DEBUG_MSG("spell_add_to_session, to_session=%d, word=%s\n",to_session,word);
if (to_session) {
+#ifdef HAVE_ENCHANT
+ enchant_dict_add_to_session(bfspell->spell_checker, word, strlen(word));
+#else
aspell_speller_add_to_session(bfspell->spell_checker, word, -1);
+#endif
} else {
+#ifdef HAVE_ENCHANT
+ enchant_dict_add(bfspell->spell_checker, word, strlen(word));
+#else
aspell_speller_add_to_personal(bfspell->spell_checker, word, -1);
+#endif
}
-
}
gboolean spell_check_word(Tbfspell *bfspell, gchar * tocheck, GtkTextIter *itstart, GtkTextIter *itend) {
if (tocheck && !isdigit(tocheck[0])) {
+#ifdef HAVE_ENCHANT
+ int correct = enchant_dict_check(bfspell->spell_checker, tocheck, strlen(tocheck)) == 0;
+#else
int correct = aspell_speller_check(bfspell->spell_checker, tocheck, -1);
+#endif
DEBUG_MSG("word '%s' has correct=%d\n",tocheck,correct);
if (!correct) {
+#ifdef HAVE_ENCHANT
+ size_t n_suggs;
+ char ** suggs;
+
+ suggs = enchant_dict_suggest(bfspell->spell_checker, tocheck, strlen(tocheck), &n_suggs);
+#else
AspellWordList *awl = (AspellWordList *)aspell_speller_suggest(bfspell->spell_checker, tocheck,-1);
+#endif
if (!bfspell->so || !bfspell->eo) {
bfspell->so = gtk_text_buffer_create_mark(bfspell->doc->buffer,NULL,itstart,FALSE);
bfspell->eo = gtk_text_buffer_create_mark(bfspell->doc->buffer,NULL,itend,TRUE);
@@ -143,23 +170,39 @@
bfspell->offset = -1;
gtk_entry_set_text(GTK_ENTRY(bfspell->incorrectword), tocheck);
gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(bfspell->suggestions)->entry), "");
+#ifndef HAVE_ENCHANT
if (awl == 0) {
DEBUG_MSG("spell_check_word error: %s\n", aspell_speller_error_message(bfspell->spell_checker));
} else {
+
+#endif
GList *poplist=NULL;
+#ifdef HAVE_ENCHANT
+ size_t i;
+ for (i = 0; i < n_suggs; i++) {
+ poplist = g_list_append(poplist,g_strdup(suggs[i]));
+ }
+#else
AspellStringEnumeration *els = aspell_word_list_elements(awl);
const char *word;
while ((word = aspell_string_enumeration_next(els)) != 0) {
poplist = g_list_append(poplist,g_strdup(word));
}
+#endif
if (!poplist) {
poplist = g_list_append(poplist, g_strdup("(no suggested words)"));
}
gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(bfspell->suggestions)->entry), "");
gtk_combo_set_popdown_strings(GTK_COMBO(bfspell->suggestions), poplist);
free_stringlist(poplist);
+#ifdef HAVE_ENCHANT
+ if (suggs) {
+ enchant_dict_free_string_list (bfspell->spell_checker, suggs);
+ }
+#else
delete_aspell_string_enumeration(els);
}
+#endif
return FALSE;
}
}
@@ -175,8 +218,12 @@
gtk_combo_set_popdown_strings(GTK_COMBO(bfspell->suggestions), poplist);
g_list_free(poplist);
bfspell->offset = 0;
+#ifdef HAVE_ENCHANT
+ enchant_broker_free_dict(bfspell->broker, bfspell->spell_checker);
+#else
aspell_speller_save_all_word_lists(bfspell->spell_checker);
delete_aspell_speller(bfspell->spell_checker);
+#endif
bfspell->spell_checker = NULL;
spell_gui_set_button_status(bfspell, FALSE);
}
@@ -208,6 +255,10 @@
void spell_start(Tbfspell *bfspell) {
DEBUG_MSG("spell_start, started for bfspell=%p\n",bfspell);
+#ifdef HAVE_ENCHANT
+ bfspell->broker = enchant_broker_init();
+ DEBUG_MSG("spell_start, created enchant broker at %p\n",bfspell->broker);
+#else
bfspell->spell_config = new_aspell_config();
DEBUG_MSG("spell_start, created spell_config at %p\n",bfspell->spell_config);
/*
@@ -226,16 +277,24 @@
/*
* from the aspell manual
*/
+#endif
}
static void spell_gui_destroy(GtkWidget * widget, Tbfspell *bfspell) {
DEBUG_MSG("spell_gui_destroy started\n");
window_destroy(bfspell->win);
+#ifdef HAVE_ENCHANT
+ if (bfspell->spell_checker) {
+ enchant_broker_free_dict(bfspell->broker, bfspell->spell_checker);
+ }
+ enchant_broker_free(bfspell->broker);
+#else
if (bfspell->spell_checker) {
aspell_speller_save_all_word_lists(bfspell->spell_checker);
delete_aspell_speller(bfspell->spell_checker);
}
delete_aspell_config(bfspell->spell_config);
+#endif
if (bfspell->so) {
gtk_text_buffer_delete_mark(bfspell->doc->buffer, bfspell->so);
}
@@ -250,7 +309,9 @@
}
void spell_gui_ok_clicked_cb(GtkWidget *widget, Tbfspell *bfspell) {
+#ifndef HAVE_ENCHANT
AspellCanHaveError *possible_err;
+#endif
const gchar *lang;
DEBUG_MSG("spell_gui_ok_clicked_cb, bfspell=%p, bfwin=%p\n",bfspell, bfspell->bfwin);
bfspell->doc = bfspell->bfwin->current_document;
@@ -260,6 +321,9 @@
lang = g_list_nth_data(bfspell->langs, indx);
DEBUG_MSG("spell_gui_ok_clicked_cb, indx=%d has language %s\n",indx,lang);
}
+#ifdef HAVE_ENCHANT
+ bfspell->spell_checker = enchant_broker_request_dict (bfspell->broker, lang);
+#else
aspell_config_replace(bfspell->spell_config, "lang", lang);
DEBUG_MSG("spell_gui_ok_clicked_cb, about to create speller for spell_config=%p\n",bfspell->spell_config);
@@ -272,7 +336,7 @@
} else {
bfspell->spell_checker = to_aspell_speller(possible_err);
}
-
+#endif
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(bfspell->in_doc))) {
bfspell->stop_position = gtk_text_buffer_get_char_count(bfspell->doc->buffer);
} else {
@@ -289,38 +353,68 @@
}
}
+typedef struct _spellstruct
+{
+ Tbfspell *bfspell;
+ GtkWidget *menu;
+} spellstruct;
+
+void DictDescribe(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;
+ GtkWidget *label;
+ spellstruct *spellinfo = (spellstruct*)user_data;
+
+ menuitem = gtk_menu_item_new();
+ label = gtk_label_new(lang_tag);
+
+ gtk_misc_set_alignment(GTK_MISC(label),0,0.5);
+ gtk_container_add(GTK_CONTAINER(menuitem), label);
+/* g_signal_connect(G_OBJECT (menuitem), "activate",G_CALLBACK(),GINT_TO_POINTER(0));*/
+ if (strcmp(lang_tag, main_v->props.spell_default_lang) == 0) {
+ DEBUG_MSG("spell_gui_fill_dicts, lang %s is the default language, inserting menuitem %p at position 0\n",lang_tag,menuitem);
+ gtk_menu_shell_insert(GTK_MENU_SHELL(spellinfo->menu), menuitem, 0);
+ spellinfo->bfspell->langs = g_list_prepend(spellinfo->bfspell->langs,g_strdup(lang_tag));
+ } else {
+ DEBUG_MSG("spell_gui_fill_dicts, lang %s is not the default language, appending menuitem %p\n",lang_tag,menuitem);
+ gtk_menu_shell_append(GTK_MENU_SHELL(spellinfo->menu), menuitem);
+ spellinfo->bfspell->langs = g_list_append(spellinfo->bfspell->langs,g_strdup(lang_tag));
+ }
+}
+
+
void spell_gui_fill_dicts(Tbfspell *bfspell) {
- GtkWidget *menu, *menuitem;
+#ifndef HAVE_ENCHANT
AspellDictInfoEnumeration * dels;
AspellDictInfoList * dlist;
const AspellDictInfo * entry;
+
dlist = get_aspell_dict_info_list(bfspell->spell_config);
dels = aspell_dict_info_list_elements(dlist);
+#endif
free_stringlist(bfspell->langs);
bfspell->langs = NULL;
- menu = gtk_menu_new();
- gtk_option_menu_set_menu(GTK_OPTION_MENU(bfspell->lang), menu);
+
+ spellstruct spellinfo;
+ spellinfo.bfspell = bfspell;
+ spellinfo.menu = gtk_menu_new();
+ gtk_option_menu_set_menu(GTK_OPTION_MENU(bfspell->lang), spellinfo.menu);
+
+#ifdef HAVE_ENCHANT
+ enchant_broker_list_dicts(bfspell->broker, DictDescribe, &spellinfo);
+#else
while ( (entry = aspell_dict_info_enumeration_next(dels)) != 0) {
- GtkWidget *label;
- menuitem = gtk_menu_item_new();
- label = gtk_label_new(entry->name);
- gtk_misc_set_alignment(GTK_MISC(label),0,0.5);
- gtk_container_add(GTK_CONTAINER(menuitem), label);
-/* g_signal_connect(G_OBJECT (menuitem), "activate",G_CALLBACK(),GINT_TO_POINTER(0));*/
- if (strcmp(entry->name, main_v->props.spell_default_lang) == 0) {
- DEBUG_MSG("spell_gui_fill_dicts, lang %s is the default language, inserting menuitem %p at position 0\n",entry->name,menuitem);
- gtk_menu_shell_insert(GTK_MENU_SHELL(menu), menuitem, 0);
- bfspell->langs = g_list_prepend(bfspell->langs,g_strdup(entry->name));
- } else {
- DEBUG_MSG("spell_gui_fill_dicts, lang %s is not the default language, appending menuitem %p\n",entry->name,menuitem);
- gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
- bfspell->langs = g_list_append(bfspell->langs,g_strdup(entry->name));
- }
+ DictDescribe(entry->name, "", "", "", &spellinfo);
}
delete_aspell_dict_info_enumeration(dels);
- gtk_widget_show_all(menu);
- gtk_option_menu_set_menu(GTK_OPTION_MENU(bfspell->lang), menu);
+#endif
+ gtk_widget_show_all(spellinfo.menu);
+ gtk_option_menu_set_menu(GTK_OPTION_MENU(bfspell->lang), spellinfo.menu);
DEBUG_MSG("spell_gui_fill_dicts, set item 0 as selected item\n");
gtk_option_menu_set_history(GTK_OPTION_MENU(bfspell->lang),0);
}
@@ -353,8 +447,12 @@
GtkTextIter iter;
const gchar *original = gtk_entry_get_text(GTK_ENTRY(bfspell->incorrectword));
const gchar *newstring = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(bfspell->suggestions)->entry));
-
+#ifdef HAVE_ENCHANT
+ enchant_dict_store_replacement (bfspell->spell_checker, original, strlen(original),
+ newstring, strlen(newstring));
+#else
aspell_speller_store_replacement(bfspell->spell_checker,original,-1,newstring,-1);
+#endif
gtk_text_buffer_get_iter_at_mark(bfspell->doc->buffer,&iter,bfspell->so);
start = gtk_text_iter_get_offset(&iter);
@@ -498,4 +596,4 @@
spell_start(bfspell);
spell_gui_fill_dicts(bfspell);
}
-#endif /* HAVE_LIBASPELL */
+#endif /* HAVE_ENCHANT || HAVE_LIBASPELL */
diff -ru bluefish-1.0.7.orig/src/bfspell.h bluefish-1.0.7/src/bfspell.h
--- bluefish-1.0.7.orig/src/bfspell.h 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/src/bfspell.h 2009-07-02 16:30:48.000000000 +0100
@@ -18,6 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifdef HAVE_LIBASPELL
+#if defined(HAVE_ENCHANT) || defined(HAVE_LIBASPELL)
void spell_check_cb(GtkWidget *widget, Tbfwin *bfwin);
-#endif /* HAVE_LIBASPELL */
+#endif /* HAVE_ENCHANT || HAVE_LIBASPELL */
diff -ru bluefish-1.0.7.orig/src/bluefish.h bluefish-1.0.7/src/bluefish.h
--- bluefish-1.0.7.orig/src/bluefish.h 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/src/bluefish.h 2009-07-02 16:21:41.000000000 +0100
@@ -220,9 +220,9 @@
gint leftpanel_tabposition;
gchar *default_basedir;
gchar *project_suffix;
-#ifdef HAVE_LIBASPELL
+#if defined(HAVE_ENCHANT) || defined(HAVE_LIBASPELL)
gchar *spell_default_lang;
-#endif /* HAVE_LIBASPELL */
+#endif /* HAVE_ENCHANT || HAVE_LIBASPELL */
/* not yet in use */
gchar *image_editor_cline; /* image editor commandline */
gint allow_dep; /* allow <FONT>... */
diff -ru bluefish-1.0.7.orig/src/config.h.in bluefish-1.0.7/src/config.h.in
--- bluefish-1.0.7.orig/src/config.h.in 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/src/config.h.in 2009-07-02 16:17:15.000000000 +0100
@@ -51,6 +51,9 @@
/* libaspell */
#undef HAVE_LIBASPELL
+/* libaspell */
+#undef HAVE_ENCHANT
+
/* gnome-vfs-2.0 */
#undef HAVE_GNOME_VFS
diff -ru bluefish-1.0.7.orig/src/gui.c bluefish-1.0.7/src/gui.c
--- bluefish-1.0.7.orig/src/gui.c 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/src/gui.c 2009-07-02 16:21:09.000000000 +0100
@@ -55,9 +55,9 @@
#include "quickstart.h"
#endif /* HAVE_ATLEAST_GTK_2_4 */
-#ifdef HAVE_LIBASPELL
+#if defined(HAVE_ENCHANT) || defined(HAVE_LIBASPELL)
#include "bfspell.h"
-#endif /* HAVE_LIBASPELL */
+#endif /* HAVE_ENCHANT || HAVE_LIBASPELL */
typedef struct {
GtkWidget *window;
@@ -1123,10 +1123,10 @@
/*
gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL, _("Print..."), "",
new_pixmap(015), G_CALLBACK(file_print_cb), NULL);*/
-#ifdef HAVE_LIBASPELL
+#if defined(HAVE_ENCHANT) || defined(HAVE_LIBASPELL)
gtk_toolbar_insert_stock (GTK_TOOLBAR (toolbar), GTK_STOCK_SPELL_CHECK, _("Spellcheck..."),
"", G_CALLBACK(spell_check_cb), bfwin, -1);
-#endif /* HAVE_LIBASPELL */
+#endif /* HAVE_ENCHANT || HAVE_LIBASPELL */
gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), NULL,
_("View in browser"), "",
diff -ru bluefish-1.0.7.orig/src/menu.c bluefish-1.0.7/src/menu.c
--- bluefish-1.0.7.orig/src/menu.c 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/src/menu.c 2009-07-02 16:20:01.000000000 +0100
@@ -280,11 +280,11 @@
exit(123);
}
}
-#ifdef HAVE_LIBASPELL
+#if defined(HAVE_ENCHANT) || defined(HAVE_LIBASPELL)
static void spell_check_menu_cb(Tbfwin *bfwin,guint callback_action, GtkWidget *widget) {
spell_check_cb(NULL, bfwin);
}
-#endif /* HAVE_LIBASPELL */
+#endif /* HAVE_ENCHANT || HAVE_LIBASPELL */
static void menu_bmark_operations_cb(Tbfwin *bfwin,guint callback_action, GtkWidget *widget) {
switch(callback_action) {
@@ -696,9 +696,9 @@
{N_("/Document/Character _Encoding"), NULL, NULL, 0, "<Branch>"},
{"/Document/Character Encoding/tearoff1", NULL, NULL, 0, "<Tearoff>"},
{"/Document/sep4", NULL, NULL, 0, "<Separator>"},
-#ifdef HAVE_LIBASPELL
+#if defined(HAVE_ENCHANT) || defined(HAVE_LIBASPELL)
{N_("/Document/Check _Spelling..."), NULL, spell_check_menu_cb, 0, "<StockItem>", GTK_STOCK_SPELL_CHECK},
-#endif /* HAVE_LIBASPELL */
+#endif /* HAVE_ENCHANT || HAVE_LIBASPELL */
{N_("/Document/_Floating window"), NULL, file_floatingview_menu_cb, 1, "<Item>"},
{N_("/Document/Word _Count"), NULL, word_count_cb, 1, "<Item>"},
{N_("/_Go"), NULL, NULL, 0, "<Branch>"},
diff -ru bluefish-1.0.7.orig/src/rcfile.c bluefish-1.0.7/src/rcfile.c
--- bluefish-1.0.7.orig/src/rcfile.c 2009-07-02 16:05:14.000000000 +0100
+++ bluefish-1.0.7/src/rcfile.c 2009-07-02 16:20:29.000000000 +0100
@@ -391,9 +391,9 @@
init_prop_integer (&config_rc, &main_v->props.leftpanel_tabposition,"leftpanel_tabposition:",(gint)GTK_POS_BOTTOM, TRUE);
init_prop_string (&config_rc, &main_v->props.default_basedir,"default_basedir:",g_get_home_dir());
init_prop_string (&config_rc, &main_v->props.project_suffix,"project_suffix:",".bfproject");
-#ifdef HAVE_LIBASPELL
+#if defined(HAVE_ENCHANT) || defined(HAVE_LIBASPELL)
init_prop_string(&config_rc, &main_v->props.spell_default_lang, "spell_default_lang:", "en");
-#endif /* HAVE_LIBASPELL */
+#endif /* HAVE_ENCHANT || HAVE_LIBASPELL */
/* not yet in use */
init_prop_string(&config_rc, &main_v->props.image_editor_cline, "image_editor_command:", "gimp-remote -n \"%s\"&");
init_prop_integer(&config_rc, &main_v->props.allow_dep, "allow_the_use_of_font:", 0, TRUE);
Index: bluefish.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bluefish/devel/bluefish.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- bluefish.spec 24 Jul 2009 18:14:47 -0000 1.28
+++ bluefish.spec 31 Jul 2009 13:29:09 -0000 1.29
@@ -9,16 +9,18 @@
Name: bluefish
Version: 1.0.7
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: GTK2 web development application for experienced users
Group: Development/Tools
License: GPLv2+
URL: http://bluefish.openoffice.nl/
Source0: http://www.bennewitz.com/bluefish/stable/source/bluefish-%{version}.tar.bz2
Patch0: bluefish-1.0.7-syntax-highlight.patch
+Patch1: bluefish-1.0.7-enchant.patch
+Patch2: bluefish-1.0.7-enchant-configure.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: aspell-devel >= 0.5
BuildRequires: desktop-file-utils
+BuildRequires: enchant-devel
BuildRequires: gettext
BuildRequires: gnome-vfs2-devel
BuildRequires: gtk2-devel >= 2.0.6
@@ -54,8 +56,14 @@ Files common to every architecture versi
%prep
%setup -q
+
+# Upstream patch to work around problem editing syntax highlighting patterns (#390871)
%patch0 -p0
+# Use enchant rather than aspell (#509514, http://bugzilla.gnome.org/587666)
+%patch1 -p1
+%patch2 -p1
+
%build
%configure --disable-update-databases
%{__make} %{?_smp_mflags}
@@ -63,7 +71,10 @@ Files common to every architecture versi
%install
%{__rm} -rf %{buildroot}
%{__mkdir_p} %{buildroot}%{_datadir}/applications
-%{__make} install DESTDIR=%{buildroot} INSTALL_PROGRAM="%{__install} -m 755"
+%{__make} install \
+ DESTDIR=%{buildroot} \
+ INSTALL="%{__install} -p" \
+ INSTALL_PROGRAM="%{__install} -m 755"
%find_lang %{name}
/usr/bin/desktop-file-install --vendor fedora --delete-original \
@@ -115,6 +126,12 @@ Files common to every architecture versi
%{_mandir}/man1/bluefish.1*
%changelog
+* Thu Jul 30 2009 Paul Howarth <paul at city-fan.org> - 1.0.7-8
+- Include patch from Caolan McNamara for using enchant rather than aspell for
+ spell-checking (#509514)
+ http://fedoraproject.org/wiki/Releases/FeatureDictionary
+- Try to maintain timestamps on unmodified files from upstream
+
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
More information about the fedora-extras-commits
mailing list