rpms/gnome-spell/F-9 gnome-spell-enchant.patch, 1.2, 1.3 gnome-spell.spec, 1.32, 1.33
Matthew Barnes (mbarnes)
fedora-extras-commits at redhat.com
Wed Apr 30 17:59:43 UTC 2008
- Previous message (by thread): rpms/brazil/devel brazil-build.xml, NONE, 1.1 brazil-remove-proprietary-sun-api.patch, NONE, 1.1 brazil.spec, NONE, 1.1 get-brazil.sh, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/brazil/F-9 brazil-build.xml, NONE, 1.1 brazil-remove-proprietary-sun-api.patch, NONE, 1.1 brazil.spec, NONE, 1.1 get-brazil.sh, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mbarnes
Update of /cvs/pkgs/rpms/gnome-spell/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29458
Modified Files:
gnome-spell-enchant.patch gnome-spell.spec
Log Message:
* Wed Apr 30 2008 Matthew Barnes <mbarnes at redhat.com> - 1.0.8-5.fc9
- Revise patch for RH bug #426347 (rework language support).
- Add build dependency on iso-codes-devel.
gnome-spell-enchant.patch:
Index: gnome-spell-enchant.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-spell/F-9/gnome-spell-enchant.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gnome-spell-enchant.patch 17 Feb 2008 17:19:05 -0000 1.2
+++ gnome-spell-enchant.patch 30 Apr 2008 17:59:07 -0000 1.3
@@ -1,7 +1,7 @@
diff -up gnome-spell-1.0.8/gnome-spell/dictionary.c.enchant gnome-spell-1.0.8/gnome-spell/dictionary.c
--- gnome-spell-1.0.8/gnome-spell/dictionary.c.enchant 2007-01-01 17:18:09.000000000 -0500
-+++ gnome-spell-1.0.8/gnome-spell/dictionary.c 2008-02-17 12:07:33.000000000 -0500
-@@ -30,16 +30,21 @@
++++ gnome-spell-1.0.8/gnome-spell/dictionary.c 2008-04-30 13:51:52.000000000 -0400
+@@ -30,18 +30,24 @@
#include <glib.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-config.h>
@@ -11,7 +11,7 @@
#include "Spell.h"
#include "dictionary.h"
-+#include <enchant/enchant.h>
++#include <enchant.h>
+
+typedef struct {
+ EnchantBroker * config;
@@ -24,8 +24,11 @@
-#define GNOME_SPELL_GCONF_DIR "/GNOME/Spell"
static void release_engines (GNOMESpellDictionary *dict);
++extern const GSList *spell_checker_get_available_languages (void);
-@@ -72,12 +77,24 @@ gnome_spell_dictionary_init (GObject *ob
+ static gchar *
+ engine_to_language (GNOMESpellDictionary *dict, SpellEngine *se)
+@@ -72,12 +78,24 @@ gnome_spell_dictionary_init (GObject *ob
{
GNOMESpellDictionary *dict = GNOME_SPELL_DICTIONARY (object);
@@ -51,7 +54,7 @@
static void
dictionary_finalize (GObject *object)
{
-@@ -93,15 +110,16 @@ dictionary_finalize (GObject *object)
+@@ -93,15 +111,16 @@ dictionary_finalize (GObject *object)
}
static SpellEngine *
@@ -73,7 +76,7 @@
return se;
}
-@@ -129,9 +147,9 @@ release_engines (GNOMESpellDictionary *d
+@@ -129,9 +148,9 @@ release_engines (GNOMESpellDictionary *d
SpellEngine *se = dict->engines->data;
if (se->speller)
@@ -85,54 +88,247 @@
g_free (se);
dict->engines = g_slist_remove (dict->engines, se);
}
-@@ -140,7 +158,6 @@ release_engines (GNOMESpellDictionary *d
+@@ -140,302 +159,6 @@ release_engines (GNOMESpellDictionary *d
g_hash_table_foreach_remove (dict->languages, remove_engine_ht, NULL);
dict->engines = NULL;
- dict->changed = TRUE;
- }
-
- static LangInfo known_languages [] = {
-@@ -352,88 +369,31 @@ static LangInfo known_languages [] = {
- };
-
- static GSList *
+-}
+-
+-static LangInfo known_languages [] = {
+-/* check <http://aspell.sourceforge.net/man-html/Supported.html> and
+- <http://aspell.sourceforge.net/man-html/Unsupported.html>.
+- short language codes according to ISO 639-1. */
+- {"aa", N_("Afar")},
+- {"af", N_("Afrikaans")},
+- {"ak", N_("Akan")},
+- {"am", N_("Amharic")},
+- {"ar", N_("Arabic")},
+- {"as", N_("Assamese")},
+- {"ast", N_("Asturian")},
+- {"av", N_("Avar")},
+- {"ay", N_("Aymara")},
+- {"az", N_("Azerbaijani")},
+- {"ba", N_("Bashkir")},
+- {"ban", N_("Balinese")},
+- {"be", N_("Belarusian")},
+- {"bem", N_("Bemba")},
+- {"bg", N_("Bulgarian")},
+- {"bh", N_("Bihari")},
+- {"bi", N_("Bislama")},
+- {"bm", N_("Bambara")},
+- {"bn", N_("Bengali")},
+- {"bo", N_("Tibetan")},
+- {"br", N_("Breton")},
+- {"bs", N_("Bosnian")},
+- {"ca", N_("Catalan")},
+- {"ce", N_("Chechen")},
+- {"ceb", N_("Cebuano")},
+- {"ch", N_("Chamorro")},
+- {"chk", N_("Chuukese")},
+- {"co", N_("Corsican")},
+- {"cs", N_("Czech")},
+- {"csb", N_("Kashubian")},
+- {"cv", N_("Chuvash")},
+- {"cy", N_("Welsh")},
+- {"da", N_("Danish")},
+- {"de-AT", N_("German (Austria)")},
+- {"de-DE", N_("German (Germany)")},
+- {"de-CH", N_("German (Swiss)")},
+- {"ee", N_("Ewe")},
+- {"el", N_("Greek")},
+- {"en-US", N_("English (American)")},
+- {"en-GB", N_("English (British)")},
+- {"en-CA", N_("English (Canadian)")},
+- {"eo", N_("Esperanto")},
+- {"es", N_("Spanish")},
+- {"et", N_("Estonian")},
+- {"eu", N_("Basque")},
+- {"fa", N_("Farsi")},
+- {"ff", N_("Fulah")},
+- {"fi", N_("Finnish")},
+- {"fj", N_("Fijian")},
+- {"fo", N_("Faroese")},
+- {"fr-FR", N_("French (France)")},
+- {"fr-CH", N_("French (Swiss)")},
+- {"fur", N_("Friulian")},
+- {"fy", N_("Frisian")},
+- {"ga", N_("Irish")},
+- {"gd", N_("Scottish Gaelic")},
+- {"gl", N_("Galician")},
+- {"gn", N_("Guarani")},
+- {"gu", N_("Gujarati")},
+- {"gv", N_("Manx Gaelic")},
+- {"ha", N_("Hausa")},
+- {"haw", N_("Hawaiian")},
+- {"he", N_("Hebrew")},
+- {"hi", N_("Hindi")},
+- {"hil", N_("Hiligaynon")},
+- {"ho", N_("Hiri Motu")},
+- {"hr", N_("Croatian")},
+- {"hsb", N_("Upper Sorbian")},
+- {"ht", N_("Haitian Creole")},
+- {"hu", N_("Hungarian")},
+- {"hy", N_("Armenian")},
+- {"hz", N_("Herero")},
+- {"ia", N_("Interlingua")},
+- {"iba", N_("Iban")},
+- {"id", N_("Indonesian")},
+- {"ig", N_("Igbo")},
+- {"ii", N_("Sichuan Yi")},
+- {"ilo", N_("Iloko")},
+- {"io", N_("Ido")},
+- {"is", N_("Icelandic")},
+- {"it", N_("Italian")},
+- {"ja", N_("Japanese")},
+- {"jv", N_("Javanese")},
+- {"ka", N_("Georgian")},
+- {"kac", N_("Kachin")},
+- {"kg", N_("Kongo")},
+- {"kha", N_("Khasi")},
+- {"ki", N_("Kikuyu")},
+- {"kj", N_("Kwanyama")},
+- {"kk", N_("Kazakh")},
+- {"kl", N_("Kalaallisut / Greenlandic")},
+- {"km", N_("Khmer")},
+- {"kn", N_("Kannada")},
+- {"ko", N_("Korean")},
+- {"kok", N_("Konkani")},
+- {"kr", N_("Kanuri")},
+- {"ks", N_("Kashmiri")},
+- {"ku", N_("Kurdish")},
+- {"kv", N_("Komi")},
+- {"kw", N_("Cornish")},
+- {"ky", N_("Kirghiz")},
+- {"la", N_("Latin")},
+- {"lb", N_("Luxembourgish")},
+- {"lg", N_("Ganda")},
+- {"li", N_("Limburgian")},
+- {"ln", N_("Lingala")},
+- {"lo", N_("Lao")},
+- {"loz", N_("Lozi")},
+- {"lt", N_("Lithuanian")},
+- {"lu", N_("Luba-Katanga")},
+- {"luo", N_("Luo")},
+- {"lv", N_("Latvian")},
+- {"mg", N_("Malagasy")},
+- {"mh", N_("Marshallese")},
+- {"mi", N_("Maori")},
+- {"min", N_("Minangkabau")},
+- {"mk", N_("Macedonian")},
+- {"ml", N_("Malayalam")},
+- {"mn", N_("Mongolian")},
+- {"mo", N_("Moldavian")},
+- {"mr", N_("Marathi")},
+- {"ms", N_("Malay")},
+- {"mt", N_("Maltese")},
+- {"my", N_("Burmese")},
+- {"nb-NO", N_("Norwegian (Bokmal)")},
+- {"nd", N_("North Ndebele")},
+- {"nds", N_("Low Saxon")},
+- {"ne", N_("Nepali")},
+- {"ng", N_("Ndonga")},
+- {"niu", N_("Niuean")},
+- {"nl", N_("Dutch")},
+- {"nn-NO", N_("Norwegian (Nyorsk)")},
+- {"no", N_("Norwegian")},
+- {"nr", N_("South Ndebele")},
+- {"nso", N_("Northern Sotho")},
+- {"nv", N_("Navajo")},
+- {"ny", N_("Nyanja/Chichewa")},
+- {"oc", N_("Occitan")},
+- {"om", N_("Oromo")},
+- {"or", N_("Oriya")},
+- {"os", N_("Ossetic")},
+- {"pa", N_("Punjabi")},
+- {"pam", N_("Pampanga")},
+- {"pap", N_("Papiamento")},
+- {"pl", N_("Polish")},
+- {"ps", N_("Pushto")},
+- {"pt-PT", N_("Portuguese (Portugal)")},
+- {"pt-BR", N_("Portuguese (Brazilian)")},
+- {"qu", N_("Quechua")},
+- {"rar", N_("Rarotongan")},
+- {"rn", N_("Rundi")},
+- {"ro", N_("Romanian")},
+- {"ru", N_("Russian")},
+- {"rw", N_("Kinyarwanda")},
+- {"sc", N_("Sardinian")},
+- {"sd", N_("Sindhi")},
+- {"se", N_("Northern Sami")},
+- {"sg", N_("Sango")},
+- {"si", N_("Sinhalese")},
+- {"sk", N_("Slovak")},
+- {"sl", N_("Slovenian")},
+- {"sm", N_("Samoan")},
+- {"sn", N_("Shona")},
+- {"so", N_("Somali")},
+- {"sq", N_("Albanian")},
+- {"sr", N_("Serbian")},
+- {"ss", N_("Swati")},
+- {"st", N_("Southern Sotho")},
+- {"su", N_("Sundanese")},
+- {"sv", N_("Swedish")},
+- {"sw", N_("Swahili")},
+- {"ta", N_("Tamil")},
+- {"te", N_("Telugu")},
+- {"tet", N_("Tetum")},
+- {"tg", N_("Tajik")},
+- {"th", N_("Thai")},
+- {"ti", N_("Tigrinya")},
+- {"tk", N_("Turkmen")},
+- {"tkl", N_("Tokelau")},
+- {"tl", N_("Tagalog")},
+- {"tn", N_("Tswana")},
+- {"to", N_("Tonga")},
+- {"tpi", N_("Tok Pisin")},
+- {"tr", N_("Turkish")},
+- {"ts", N_("Tsonga")},
+- {"tt", N_("Tatar")},
+- {"tw", N_("Twi")},
+- {"ty", N_("Tahitian")},
+- {"ug", N_("Uighur")},
+- {"uk", N_("Ukrainian")},
+- {"ur", N_("Urdu")},
+- {"uz", N_("Uzbek")},
+- {"ve", N_("Venda")},
+- {"vi", N_("Vietnamese")},
+- {"wa", N_("Walloon")},
+- {"wo", N_("Wolof")},
+- {"xh", N_("Xhosa")},
+- {"yi", N_("Yiddish")},
+- {"yo", N_("Yoruba")},
+- {"za", N_("Zhuang")},
+- {"zh", N_("Chinese")},
+- {"zu", N_("Zulu")}
+-};
+-
+-static GSList *
-get_languages_real (gint *ln)
-+get_languages (gint *ln)
- {
- GSList *langs;
+-{
+- GSList *langs;
- AspellCanHaveError *err;
- AspellConfig *config;
- AspellSpeller *speller;
- gint i;
-+ EnchantBroker *broker;
-+ gint i, nb_langs;
-
+-
- DICT_DEBUG (printf ("get_languages_real\n"));
-+ DICT_DEBUG (printf ("get_languages\n"));
-
-+ /* todo: this could probably be better done by enchant_broker_list_dicts(), but let's keep
-+ the initial code change to a minimum */
-+
-+ broker = enchant_broker_init ();
- langs = NULL;
+-
+- langs = NULL;
- *ln = 0;
-+ nb_langs = 0;
- for (i=0; i < G_N_ELEMENTS (known_languages); i++) {
+- for (i=0; i < G_N_ELEMENTS (known_languages); i++) {
- config = new_aspell_config ();
- aspell_config_replace (config, "language-tag", known_languages [i].abbreviation);
- err = new_aspell_speller (config);
- if (aspell_error_number (err) == 0) {
- speller = to_aspell_speller (err);
-+ if (enchant_broker_dict_exists (broker, known_languages [i].abbreviation)) {
- DICT_DEBUG (printf ("Language: %s\n", known_languages [i].name));
+- DICT_DEBUG (printf ("Language: %s\n", known_languages [i].name));
- delete_aspell_speller (speller);
- langs = g_slist_prepend (langs, GINT_TO_POINTER (i));
+- langs = g_slist_prepend (langs, GINT_TO_POINTER (i));
- (*ln) ++;
-+ nb_langs++;
- }
- }
-
+- }
+- }
+-
- return langs;
-}
-
@@ -187,15 +383,52 @@
- gnome_config_sync ();
- } else
- langs = get_languages_load (gc, ln);
-+ *ln = nb_langs;
-
+-
- gconf_client_suggest_sync (gc, NULL);
- g_object_unref (gc);
-+ enchant_broker_free (broker);
-
- return langs;
+-
+- return langs;
}
-@@ -504,59 +464,19 @@ impl_gnome_spell_dictionary_set_language
+
+ static GNOME_Spell_LanguageSeq *
+@@ -443,24 +166,28 @@ impl_gnome_spell_dictionary_get_language
+ {
+ GNOME_Spell_LanguageSeq *seq;
+ GSList *l, *langs;
+- gint i, ln, pos;
++ gint i, pos;
+
+- langs = get_languages (&ln);
++ langs = spell_checker_get_available_languages();
+
+ seq = GNOME_Spell_LanguageSeq__alloc ();
+- seq->_length = ln;
++ seq->_length = g_slist_length(langs);
+
+ if (seq->_length == 0)
+ return seq;
+
+ seq->_buffer = CORBA_sequence_GNOME_Spell_Language_allocbuf (seq->_length);
+
+- for (i = ln - 1, l = langs; l; l = l->next, i--) {
++ i = 0;
++ while (langs != NULL )
++ {
++ const LangInfo*l = (const LangInfo*)langs->data;
++ seq->_buffer [i].name = CORBA_string_dup (l->name);
++ seq->_buffer [i].abbreviation = CORBA_string_dup (l->abbreviation);
++ i++;
++ langs = g_slist_next(langs);
++ }
+
+- pos = GPOINTER_TO_INT (l->data);
+- seq->_buffer [i].name = CORBA_string_dup (_(known_languages [pos].name));
+- seq->_buffer [i].abbreviation = CORBA_string_dup (known_languages [pos].abbreviation);
+- }
+ CORBA_sequence_set_release (seq, CORBA_TRUE);
+ g_slist_free (langs);
+
+@@ -504,59 +231,19 @@ impl_gnome_spell_dictionary_set_language
SpellEngine *se;
one_language = g_strndup (begin, len);
@@ -258,7 +491,7 @@
#ifndef G_DISABLE_CHECKS
g_return_val_if_fail (se->speller, CORBA_TRUE);
-@@ -564,12 +484,12 @@ engine_check_word (SpellEngine *se, cons
+@@ -564,12 +251,12 @@ engine_check_word (SpellEngine *se, cons
if (!se->speller)
return CORBA_TRUE;
#endif
@@ -277,7 +510,7 @@
}
return result;
-@@ -592,7 +512,6 @@ impl_gnome_spell_dictionary_check_word (
+@@ -592,7 +279,6 @@ impl_gnome_spell_dictionary_check_word (
if (!strcmp (word, "Ximian"))
return CORBA_TRUE;
@@ -285,7 +518,7 @@
for (l = dict->engines; l; l = l->next) {
if (((SpellEngine *) l->data)->speller) {
valid_speller = TRUE;
-@@ -621,11 +540,10 @@ impl_gnome_spell_dictionary_add_word_to_
+@@ -621,11 +307,10 @@ impl_gnome_spell_dictionary_add_word_to_
if (!word)
return;
#endif
@@ -298,7 +531,7 @@
}
}
-@@ -642,13 +560,11 @@ impl_gnome_spell_dictionary_add_word_to_
+@@ -642,13 +327,11 @@ impl_gnome_spell_dictionary_add_word_to_
if (!word || !language)
return;
#endif
@@ -313,7 +546,7 @@
DICT_DEBUG (printf ("Added and saved.\n"));
}
}
-@@ -666,14 +582,12 @@ impl_gnome_spell_dictionary_set_correcti
+@@ -666,14 +349,12 @@ impl_gnome_spell_dictionary_set_correcti
if (!word || !replacement)
return;
#endif
@@ -330,7 +563,7 @@
DICT_DEBUG (printf ("Set and saved.\n"));
}
}
-@@ -683,8 +597,8 @@ impl_gnome_spell_dictionary_get_suggesti
+@@ -683,8 +364,8 @@ impl_gnome_spell_dictionary_get_suggesti
const CORBA_char *word, CORBA_Environment *ev)
{
GNOMESpellDictionary *dict = GNOME_SPELL_DICTIONARY (bonobo_object_from_servant (servant));
@@ -341,7 +574,7 @@
GNOME_Spell_StringSeq *seq = NULL;
GSList *l, *suggestion_list = NULL;
gint i, len, pos;
-@@ -696,17 +610,19 @@ impl_gnome_spell_dictionary_get_suggesti
+@@ -696,17 +377,19 @@ impl_gnome_spell_dictionary_get_suggesti
return NULL;
#endif
DICT_DEBUG (printf ("Dictionary correction: %s\n", word));
@@ -365,7 +598,7 @@
}
}
-@@ -723,17 +639,18 @@ impl_gnome_spell_dictionary_get_suggesti
+@@ -723,17 +406,18 @@ impl_gnome_spell_dictionary_get_suggesti
gint list_len;
gchar *language;
@@ -389,52 +622,439 @@
}
CORBA_sequence_set_release (seq, CORBA_TRUE);
g_slist_free (suggestion_list);
-diff -up gnome-spell-1.0.8/gnome-spell/Makefile.in.enchant gnome-spell-1.0.8/gnome-spell/Makefile.in
---- gnome-spell-1.0.8/gnome-spell/Makefile.in.enchant 2008-02-17 12:11:25.000000000 -0500
-+++ gnome-spell-1.0.8/gnome-spell/Makefile.in 2008-02-17 12:11:39.000000000 -0500
-@@ -110,9 +110,6 @@ API_VERSION = @API_VERSION@
- API_VERSION_IN_SHLIB_NAME = @API_VERSION_IN_SHLIB_NAME@
- AR = @AR@
- AS = @AS@
--ASPELL_DICT = @ASPELL_DICT@
--ASPELL_INC = @ASPELL_INC@
--ASPELL_LIBS = @ASPELL_LIBS@
- AUTOCONF = @AUTOCONF@
- AUTOHEADER = @AUTOHEADER@
- AUTOMAKE = @AUTOMAKE@
-@@ -275,13 +272,11 @@ glade_DATA = spell-checker.glade
- END =
- INCLUDES = \
- -I$(srcdir) \
-- $(ASPELL_INC) \
- -DPREFIX=\""$(prefix)"\" \
- -DGNOMEDATADIR=\""$(datadir)"\" \
- -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
- -DGLADE_DATADIR=\"$(gladedir)\" \
- -DPLUGIN_DIR=\""$(PLUGIN_DIR)"\" \
-- -DASPELL_DICT=\""$(ASPELL_DICT)"\" \
- $(GNOME_SPELL_CFLAGS) \
- $(END)
-
-@@ -309,7 +304,6 @@ libgnome_spell_idl_la_SOURCES = \
- libgnome_spell_component_la_LDFLAGS = -release $(API_VERSION) $(NO_UNDEFINED)
- libgnome_spell_component_la_LIBADD = \
- libgnome-spell-idl.la \
-- $(ASPELL_LIBS) \
- $(GNOME_SPELL_LIBS) \
- $(END)
-
-@@ -323,7 +317,6 @@ libgnome_spell_component_la_SOURCES = \
-
- test_gnome_spell_component_LDADD = \
- libgnome-spell-idl.la \
-- $(ASPELL_LIBS) \
- $(GNOME_SPELL_LIBS) \
- $(END)
-
+diff -up /dev/null gnome-spell-1.0.8/gnome-spell/spell-checker-language.c
+--- /dev/null 2008-04-28 14:31:44.854093525 -0400
++++ gnome-spell-1.0.8/gnome-spell/spell-checker-language.c 2008-04-30 13:51:52.000000000 -0400
+@@ -0,0 +1,426 @@
++/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
++/*
++ * spell-checker-language.c
++ * This file is a modification of gedit-spell-checker-language.c of gedit.
++ *
++ * Copyright (C) 2006 Paolo Maggi
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include <string.h>
++
++#include <enchant.h>
++
++#include <glib/gi18n.h>
++#include <libxml/xmlreader.h>
++
++#include "spell-checker-language.h"
++
++#define ISO_639_DOMAIN "iso_639"
++#define ISO_3166_DOMAIN "iso_3166"
++
++#define ISOCODESLOCALEDIR ISO_CODES_PREFIX "/share/locale"
++
++static gboolean available_languages_initialized = FALSE;
++static GSList *available_languages = NULL;
++
++static GHashTable *iso_639_table = NULL;
++static GHashTable *iso_3166_table = NULL;
++
++static void
++bind_iso_domains (void)
++{
++ static gboolean bound = FALSE;
++
++ if (bound == FALSE)
++ {
++ bindtextdomain (ISO_639_DOMAIN, ISOCODESLOCALEDIR);
++ bind_textdomain_codeset (ISO_639_DOMAIN, "UTF-8");
++
++ bindtextdomain(ISO_3166_DOMAIN, ISOCODESLOCALEDIR);
++ bind_textdomain_codeset (ISO_3166_DOMAIN, "UTF-8");
++
++ bound = TRUE;
++ }
++}
++
++static void
++read_iso_639_entry (xmlTextReaderPtr reader,
++ GHashTable *table)
++{
++ xmlChar *code, *name;
++
++ code = xmlTextReaderGetAttribute (reader, (const xmlChar *) "iso_639_1_code");
++ name = xmlTextReaderGetAttribute (reader, (const xmlChar *) "name");
++
++ /* Get iso-639-2 code */
++ if (code == NULL || code[0] == '\0')
++ {
++ xmlFree (code);
++ /* FIXME: use the 2T or 2B code? */
++ code = xmlTextReaderGetAttribute (reader, (const xmlChar *) "iso_639_2T_code");
++ }
++
++ if (code != NULL && code[0] != '\0' && name != NULL && name[0] != '\0')
++ {
++ g_hash_table_insert (table, code, name);
++ }
++ else
++ {
++ xmlFree (code);
++ xmlFree (name);
++ }
++}
++
++static void
++read_iso_3166_entry (xmlTextReaderPtr reader,
++ GHashTable *table)
++{
++ xmlChar *code, *name;
++
++ code = xmlTextReaderGetAttribute (reader, (const xmlChar *) "alpha_2_code");
++ name = xmlTextReaderGetAttribute (reader, (const xmlChar *) "name");
++
++ if (code != NULL && code[0] != '\0' && name != NULL && name[0] != '\0')
++ {
++ char *lcode;
++
++ lcode = g_ascii_strdown ((char *) code, -1);
++ xmlFree (code);
++
++ /* g_print ("%s -> %s\n", lcode, name); */
++
++ g_hash_table_insert (table, lcode, name);
++ }
++ else
++ {
++ xmlFree (code);
++ xmlFree (name);
++ }
++}
++
++typedef enum
++{
++ STATE_START,
++ STATE_STOP,
++ STATE_ENTRIES,
++} ParserState;
++
++static void
++load_iso_entries (int iso,
++ GFunc read_entry_func,
++ gpointer user_data)
++{
++ xmlTextReaderPtr reader;
++ ParserState state = STATE_START;
++ xmlChar iso_entries[32], iso_entry[32];
++ char *filename;
++ int ret = -1;
++
++ filename = g_strdup_printf (ISO_CODES_PREFIX "/share/xml/iso-codes/iso_%d.xml", iso);
++ reader = xmlNewTextReaderFilename (filename);
++ if (reader == NULL) goto out;
++
++ xmlStrPrintf (iso_entries, sizeof (iso_entries), (const xmlChar *)"iso_%d_entries", iso);
++ xmlStrPrintf (iso_entry, sizeof (iso_entry), (const xmlChar *)"iso_%d_entry", iso);
++
++ ret = xmlTextReaderRead (reader);
++
++ while (ret == 1)
++ {
++ const xmlChar *tag;
++ xmlReaderTypes type;
++
++ tag = xmlTextReaderConstName (reader);
++ type = xmlTextReaderNodeType (reader);
++
++ if (state == STATE_ENTRIES &&
++ type == XML_READER_TYPE_ELEMENT &&
++ xmlStrEqual (tag, iso_entry))
++ {
++ read_entry_func (reader, user_data);
++ }
++ else if (state == STATE_START &&
++ type == XML_READER_TYPE_ELEMENT &&
++ xmlStrEqual (tag, iso_entries))
++ {
++ state = STATE_ENTRIES;
++ }
++ else if (state == STATE_ENTRIES &&
++ type == XML_READER_TYPE_END_ELEMENT &&
++ xmlStrEqual (tag, iso_entries))
++ {
++ state = STATE_STOP;
++ }
++ else if (type == XML_READER_TYPE_SIGNIFICANT_WHITESPACE ||
++ type == XML_READER_TYPE_WHITESPACE ||
++ type == XML_READER_TYPE_TEXT ||
++ type == XML_READER_TYPE_COMMENT)
++ {
++ /* eat it */
++ }
++ else
++ {
++ /* ignore it */
++ }
++
++ ret = xmlTextReaderRead (reader);
++ }
++
++ xmlFreeTextReader (reader);
++
++out:
++ if (ret < 0 || state != STATE_STOP)
++ {
++ g_warning ("Failed to load ISO-%d codes from %s!\n",
++ iso, filename);
++ }
++
++ g_free (filename);
++}
++
++static GHashTable *
++create_iso_639_table (void)
++{
++ GHashTable *table;
++
++ bind_iso_domains ();
++ table = g_hash_table_new_full (g_str_hash, g_str_equal,
++ (GDestroyNotify) xmlFree,
++ (GDestroyNotify) xmlFree);
++
++ load_iso_entries (639, (GFunc) read_iso_639_entry, table);
++
++ return table;
++}
++
++static GHashTable *
++create_iso_3166_table (void)
++{
++ GHashTable *table;
++
++ bind_iso_domains ();
++ table = g_hash_table_new_full (g_str_hash, g_str_equal,
++ (GDestroyNotify) g_free,
++ (GDestroyNotify) xmlFree);
++
++ load_iso_entries (3166, (GFunc) read_iso_3166_entry, table);
++
++ return table;
++}
++
++static char *
++create_name_for_language (const char *code)
++{
++ char **str;
++ char *name = NULL;
++ const char *langname, *localename;
++ int len;
++
++ g_return_val_if_fail (iso_639_table != NULL, NULL);
++ g_return_val_if_fail (iso_3166_table != NULL, NULL);
++
++ str = g_strsplit (code, "_", -1);
++ len = g_strv_length (str);
++ g_return_val_if_fail (len != 0, NULL);
++
++ langname = (const char *) g_hash_table_lookup (iso_639_table, str[0]);
++
++ if (len == 1 && langname != NULL)
++ {
++ name = g_strdup (dgettext (ISO_639_DOMAIN, langname));
++ }
++ else if (len == 2 && langname != NULL)
++ {
++ gchar *locale_code = g_ascii_strdown (str[1], -1);
++
++ localename = (const char *) g_hash_table_lookup (iso_3166_table, locale_code);
++ g_free (locale_code);
++
++ if (localename != NULL)
++ {
++ /* Translators: The text before the "|" is context to help you decide on
++ * the correct translation. You MUST OMIT it in the translated string.
++ * Translators: the first %s is the language name, and the
++ * second %s is the locale name. Example:
++ * "French (France)"
++ */
++ name = g_strdup_printf (Q_("language|%s (%s)"),
++ dgettext (ISO_639_DOMAIN, langname),
++ dgettext (ISO_3166_DOMAIN, localename));
++ }
++ else
++ {
++ /* Translators: The text before the "|" is context to help you decide on
++ * the correct translation. You MUST OMIT it in the translated string. */
++ name = g_strdup_printf (Q_("language|%s (%s)"),
++ dgettext (ISO_639_DOMAIN, langname), str[1]);
++ }
++ }
++ else
++ {
++ /* Translators: The text before the "|" is context to help you decide on
++ * the correct translation. You MUST OMIT it in the translated string.
++ * Translators: this refers to an unknown language code
++ * (one which isn't in our built-in list).
++ */
++ name = g_strdup_printf (Q_("language|Unknown (%s)"), code);
++ }
++
++ g_strfreev (str);
++
++ return name;
++}
++
++static void
++enumerate_dicts (const char * const lang_tag,
++ const char * const provider_name,
++ const char * const provider_desc,
++ const char * const provider_file,
++ void * user_data)
++{
++ gchar *lang_name;
++
++ GTree *dicts = (GTree *)user_data;
++
++ lang_name = create_name_for_language (lang_tag);
++ g_return_if_fail (lang_name != NULL);
++
++ /* g_print ("%s - %s\n", lang_tag, lang_name); */
++
++ g_tree_replace (dicts, g_strdup (lang_tag), lang_name);
++}
++
++static gint
++key_cmp (gconstpointer a, gconstpointer b, gpointer user_data)
++{
++ return strcmp (a, b);
++}
++
++static gint
++lang_cmp (const LangInfo *a,
++ const LangInfo *b)
++{
++ return g_utf8_collate (a->name, b->name);
++}
++
++static gboolean
++build_langs_list (const gchar *key,
++ const gchar *value,
++ gpointer data)
++{
++ LangInfo *lang = g_new (LangInfo, 1);
++
++ lang->abbreviation = g_strdup (key);
++ lang->name = g_strdup (value);
++
++ available_languages = g_slist_insert_sorted (available_languages,
++ lang,
++ (GCompareFunc)lang_cmp);
++
++ return FALSE;
++}
++
++const GSList *
++spell_checker_get_available_languages (void)
++{
++ EnchantBroker *broker;
++ GTree *dicts;
++
++ if (available_languages_initialized)
++ return available_languages;
++
++ g_return_val_if_fail (available_languages == NULL, NULL);
++
++ available_languages_initialized = TRUE;
++
++ broker = enchant_broker_init ();
++ g_return_val_if_fail (broker != NULL, NULL);
++
++ /* Use a GTree to efficiently remove duplicates while building the list */
++ dicts = g_tree_new_full (key_cmp,
++ NULL,
++ (GDestroyNotify)g_free,
++ (GDestroyNotify)g_free);
++
++ iso_639_table = create_iso_639_table ();
++ iso_3166_table = create_iso_3166_table ();
++
++ enchant_broker_list_dicts (broker, enumerate_dicts, dicts);
++
++ enchant_broker_free (broker);
++
++ g_hash_table_destroy (iso_639_table);
++ g_hash_table_destroy (iso_3166_table);
++
++ iso_639_table = NULL;
++ iso_3166_table = NULL;
++
++ g_tree_foreach (dicts, (GTraverseFunc)build_langs_list, NULL);
++
++ g_tree_destroy (dicts);
++
++ return available_languages;
++}
++
++const gchar *
++spell_checker_language_to_string (const LangInfo *lang)
++{
++ if (lang == NULL)
++ /* Translators: The text before the "|" is context to help you decide on
++ * the correct translation. You MUST OMIT it in the translated string.
++ * Translators: this refers the Default language used by the
++ * spell checker
++ */
++ return Q_("language|Default");
++
++ return lang->name;
++}
++
++const gchar *
++spell_checker_language_to_key (const LangInfo*lang)
++{
++ g_return_val_if_fail (lang != NULL, NULL);
++
++ return lang->abbreviation;
++}
++
++const LangInfo*
++spell_checker_language_from_key (const gchar *key)
++{
++ const GSList *langs;
++
++ g_return_val_if_fail (key != NULL, NULL);
++
++ langs = spell_checker_get_available_languages ();
++
++ while (langs != NULL)
++ {
++ const LangInfo*l = (const LangInfo*)langs->data;
++
++ if (g_ascii_strncasecmp (key, l->abbreviation, strlen (l->abbreviation)) == 0)
++ return l;
++
++ langs = g_slist_next (langs);
++ }
++
++ return NULL;
++}
diff -up gnome-spell-1.0.8/gnome-spell/test-spell.c.enchant gnome-spell-1.0.8/gnome-spell/test-spell.c
--- gnome-spell-1.0.8/gnome-spell/test-spell.c.enchant 2007-01-01 17:18:09.000000000 -0500
-+++ gnome-spell-1.0.8/gnome-spell/test-spell.c 2008-02-17 12:07:33.000000000 -0500
++++ gnome-spell-1.0.8/gnome-spell/test-spell.c 2008-04-30 13:51:52.000000000 -0400
@@ -52,7 +52,6 @@ main (int argc, char *argv [])
* test dictionary
*/
@@ -445,16 +1065,17 @@
printf ("check: %s --> %d\n",
diff -up gnome-spell-1.0.8/gnome-spell/dictionary.h.enchant gnome-spell-1.0.8/gnome-spell/dictionary.h
--- gnome-spell-1.0.8/gnome-spell/dictionary.h.enchant 2007-01-01 17:18:09.000000000 -0500
-+++ gnome-spell-1.0.8/gnome-spell/dictionary.h 2008-02-17 12:07:33.000000000 -0500
-@@ -26,7 +26,6 @@
++++ gnome-spell-1.0.8/gnome-spell/dictionary.h 2008-04-30 13:51:52.000000000 -0400
+@@ -26,7 +26,7 @@
G_BEGIN_DECLS
#include <bonobo/bonobo-object.h>
-#include <aspell.h>
++#include <bonobo.h>
#define GNOME_SPELL_DICTIONARY_TYPE (gnome_spell_dictionary_get_type ())
#define GNOME_SPELL_DICTIONARY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
-@@ -37,12 +36,6 @@ G_BEGIN_DECLS
+@@ -37,12 +37,6 @@ G_BEGIN_DECLS
#define IS_GNOME_SPELL_DICTIONARY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_SPELL_DICTIONARY_TYPE))
typedef struct {
@@ -467,7 +1088,7 @@
gchar *abbreviation;
gchar *name;
} LangInfo;
-@@ -50,7 +43,6 @@ typedef struct {
+@@ -50,7 +44,6 @@ typedef struct {
typedef struct {
BonoboObject parent;
@@ -477,7 +1098,7 @@
GHashTable *engines_ht;
diff -up gnome-spell-1.0.8/gnome-spell/Makefile.am.enchant gnome-spell-1.0.8/gnome-spell/Makefile.am
--- gnome-spell-1.0.8/gnome-spell/Makefile.am.enchant 2007-01-01 17:18:09.000000000 -0500
-+++ gnome-spell-1.0.8/gnome-spell/Makefile.am 2008-02-17 12:07:33.000000000 -0500
++++ gnome-spell-1.0.8/gnome-spell/Makefile.am 2008-04-30 13:51:52.000000000 -0400
@@ -7,13 +7,11 @@ END =
INCLUDES = \
@@ -500,7 +1121,13 @@
$(GNOME_SPELL_LIBS) \
$(END)
-@@ -69,7 +66,6 @@ libgnome_spell_component_la_SOURCES = \
+@@ -65,11 +62,12 @@ libgnome_spell_component_la_SOURCES = \
+ dictionary.h \
+ dictionary.c \
+ spell-factory.c \
++ spell-checker-language.h \
++ spell-checker-language.c \
+ $(END)
test_gnome_spell_component_LDADD = \
libgnome-spell-idl.la \
@@ -508,149 +1135,58 @@
$(GNOME_SPELL_LIBS) \
$(END)
-diff -up gnome-spell-1.0.8/Makefile.in.enchant gnome-spell-1.0.8/Makefile.in
---- gnome-spell-1.0.8/Makefile.in.enchant 2008-02-17 12:10:26.000000000 -0500
-+++ gnome-spell-1.0.8/Makefile.in 2008-02-17 12:10:37.000000000 -0500
-@@ -79,9 +79,6 @@ API_VERSION = @API_VERSION@
- API_VERSION_IN_SHLIB_NAME = @API_VERSION_IN_SHLIB_NAME@
- AR = @AR@
- AS = @AS@
--ASPELL_DICT = @ASPELL_DICT@
--ASPELL_INC = @ASPELL_INC@
--ASPELL_LIBS = @ASPELL_LIBS@
- AUTOCONF = @AUTOCONF@
- AUTOHEADER = @AUTOHEADER@
- AUTOMAKE = @AUTOMAKE@
-diff -up gnome-spell-1.0.8/configure.enchant gnome-spell-1.0.8/configure
---- gnome-spell-1.0.8/configure.enchant 2008-02-17 12:07:58.000000000 -0500
-+++ gnome-spell-1.0.8/configure 2008-02-17 12:13:12.000000000 -0500
-@@ -1551,8 +1551,6 @@ Optional Packages:
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-tags[=TAGS] include additional configurations [automatic]
-- --with-aspell-prefix=DIR
-- specify under which prefix aspell is installed.
-
- Some influential environment variables:
- CC C compiler command
-@@ -22578,113 +22576,7 @@ _ACEOF
-
-
-
--# Check whether --with-aspell-prefix was given.
--if test "${with_aspell_prefix+set}" = set; then
-- withval=$with_aspell_prefix; with_aspell_prefix="$withval"
--fi
--
--
--if test "x$with_aspell_prefix" != "x"; then
-- saved_LDFLAGS=$LDFLAGS
-- LDFLAGS="-L$with_aspell_prefix/${_lib:-lib} "$LDFLAGS
-- ASPELL_INC="-I$with_aspell_prefix/include"
-- ASPELL_LIBS="-L$with_aspell_prefix/${_lib:-lib} -laspell"
--else
-- LDFLAGS="-L`aspell config prefix`/${_lib:-lib} "$LDFLAGS
-- ASPELL_INC="-I`aspell config prefix`/include"
-- ASPELL_LIBS="-L`aspell config prefix`/${_lib:-lib} -laspell"
--fi
--ASPELL_DICT="`aspell config dict-dir`"
--
--{ 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
--else
-- ac_check_lib_save_LIBS=$LIBS
--LIBS="-laspell $LIBS"
--cat >conftest.$ac_ext <<_ACEOF
--/* confdefs.h. */
--_ACEOF
--cat confdefs.h >>conftest.$ac_ext
--cat >>conftest.$ac_ext <<_ACEOF
--/* end confdefs.h. */
--
--/* Override any GCC internal prototype to avoid an error.
-- Use char because int might match the return type of a GCC
-- builtin and then its argument prototype would still apply. */
--#ifdef __cplusplus
--extern "C"
--#endif
--char new_aspell_config ();
--int
--main ()
--{
--return new_aspell_config ();
-- ;
-- return 0;
--}
--_ACEOF
--rm -f conftest.$ac_objext conftest$ac_exeext
--if { (ac_try="$ac_link"
--case "(($ac_try" in
-- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-- *) ac_try_echo=$ac_try;;
--esac
--eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-- (eval "$ac_link") 2>conftest.er1
-- ac_status=$?
-- grep -v '^ *+' conftest.er1 >conftest.err
-- rm -f conftest.er1
-- cat conftest.err >&5
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
-- (exit $ac_status); } && {
-- test -z "$ac_c_werror_flag" ||
-- test ! -s conftest.err
-- } && test -s conftest$ac_exeext &&
-- $as_test_x conftest$ac_exeext; then
-- ac_cv_lib_aspell_new_aspell_config=yes
--else
-- echo "$as_me: failed program was:" >&5
--sed 's/^/| /' conftest.$ac_ext >&5
--
-- ac_cv_lib_aspell_new_aspell_config=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
-- cat >>confdefs.h <<_ACEOF
--#define HAVE_LIBASPELL 1
--_ACEOF
--
-- LIBS="-laspell $LIBS"
--
--else
-- { { echo "$as_me:$LINENO: error: gnome-spell cannot be built without aspell library" >&5
--echo "$as_me: error: gnome-spell cannot be built without aspell library" >&2;}
-- { (exit 1); exit 1; }; }
--fi
--
--if test "x$with_aspell_prefix" != "x"; then
-- LDFLAGS=$saved_LDFLAGS
--fi
--
--
--
--
--
--
--
--
--
--
--
--GNOME_SPELL_MODULES="libgnomeui-2.0 >= 1.112.1 libbonoboui-2.0 >= 1.112.1 libglade-2.0 >= 1.99.9"
-+GNOME_SPELL_MODULES="libgnomeui-2.0 >= 1.112.1 libbonoboui-2.0 >= 1.112.1 libglade-2.0 >= 1.99.9 enchant >= 1.2.5"
-
-
- if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+diff -up /dev/null gnome-spell-1.0.8/gnome-spell/spell-checker-language.h
+--- /dev/null 2008-04-28 14:31:44.854093525 -0400
++++ gnome-spell-1.0.8/gnome-spell/spell-checker-language.h 2008-04-30 13:51:52.000000000 -0400
+@@ -0,0 +1,45 @@
++/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
++/*
++ * spell-checker-language.h
++ * This file is a modification of gedit-spell-checker-language.c of gedit
++ *
++ * Copyright (C) 2006 Paolo Maggi
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330,
++ * Boston, MA 02111-1307, USA.
++ */
++
++#ifndef __SPELL_CHECKER_LANGUAGE_H__
++#define __SPELL_CHECKER_LANGUAGE_H__
++
++#include <glib.h>
++#include "Spell.h"
++#include "dictionary.h"
++
++G_BEGIN_DECLS
++
++const gchar *spell_checker_language_to_string (const LangInfo *lang);
++
++const gchar *spell_checker_language_to_key (const LangInfo *lang);
++
++const LangInfo *spell_checker_language_from_key (const gchar *key);
++
++/* GSList contains "GeditSpellCheckerLanguage*" items */
++const GSList *spell_checker_get_available_languages
++ (void);
++
++G_END_DECLS
++
++#endif /* __GEDIT_SPELL_CHECKER_LANGUAGE_H__ */
diff -up gnome-spell-1.0.8/configure.in.enchant gnome-spell-1.0.8/configure.in
---- gnome-spell-1.0.8/configure.in.enchant 2008-02-17 12:07:33.000000000 -0500
-+++ gnome-spell-1.0.8/configure.in 2008-02-17 12:07:33.000000000 -0500
+--- gnome-spell-1.0.8/configure.in.enchant 2008-04-30 13:51:52.000000000 -0400
++++ gnome-spell-1.0.8/configure.in 2008-04-30 13:51:19.000000000 -0400
@@ -68,33 +68,6 @@ AC_DEFINE_UNQUOTED(API_VERSION, "${API_V
AC_SUBST(API_VERSION)
@@ -685,7 +1221,7 @@
dnl flags
dnl
-@@ -103,7 +76,7 @@ AC_SUBST(CFLAGS)
+@@ -103,11 +76,35 @@ AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
@@ -694,16 +1230,31 @@
PKG_CHECK_MODULES(GNOME_SPELL, $GNOME_SPELL_MODULES)
AC_SUBST(GNOME_SPELL_CFLAGS)
AC_SUBST(GNOME_SPELL_LIBS)
-diff -up gnome-spell-1.0.8/art/Makefile.in.enchant gnome-spell-1.0.8/art/Makefile.in
---- gnome-spell-1.0.8/art/Makefile.in.enchant 2008-02-17 12:11:11.000000000 -0500
-+++ gnome-spell-1.0.8/art/Makefile.in 2008-02-17 12:11:15.000000000 -0500
-@@ -60,9 +60,6 @@ API_VERSION = @API_VERSION@
- API_VERSION_IN_SHLIB_NAME = @API_VERSION_IN_SHLIB_NAME@
- AR = @AR@
- AS = @AS@
--ASPELL_DICT = @ASPELL_DICT@
--ASPELL_INC = @ASPELL_INC@
--ASPELL_LIBS = @ASPELL_LIBS@
- AUTOCONF = @AUTOCONF@
- AUTOHEADER = @AUTOHEADER@
- AUTOMAKE = @AUTOMAKE@
+
++ISO_CODES_REQUIRED=0.35
++
++PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED],
++ [have_iso_codes=yes],[have_iso_codes=no])
++
++if test "x$have_iso_codes" = "xyes"; then
++ AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
++ if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
++ $PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
++ result=yes
++ else
++ result=no
++ have_iso_codes=no
++ fi
++ AC_MSG_RESULT([$result])
++fi
++
++if test "x$have_iso_codes" = "xyes"; then
++ AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
++ AC_DEFINE([HAVE_ISO_CODES],[1],[Define if you have the iso-codes package])
++else
++ AC_MSG_ERROR([iso-codes is required to build the spell plugin. Use --disable-spell to build without spell plugin.])
++fi
++
+ ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
+ AC_SUBST(ORBIT_IDL)
+
Index: gnome-spell.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-spell/F-9/gnome-spell.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- gnome-spell.spec 17 Feb 2008 17:19:05 -0000 1.32
+++ gnome-spell.spec 30 Apr 2008 17:59:07 -0000 1.33
@@ -2,7 +2,7 @@
Name: gnome-spell
Version: 1.0.8
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2+
Group: Applications/Text
Summary: Bonobo component for spell checking
@@ -12,19 +12,18 @@
### Patches ###
Patch1: gnome-spell-1.0.7-multilib.patch
-Patch2: gnome-spell-enchant.patch
-
-### Dependencies ###
-Requires: libbonoboui
-Requires: libglade2
-Requires: libgnomeui
+# RH bug #426347
+Patch2: gnome-spell-enchant.patch
### Build Dependencies ###
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: enchant-devel
BuildRequires: gettext
BuildRequires: intltool
+BuildRequires: iso-codes-devel
BuildRequires: libbonoboui-devel
BuildRequires: libglade2-devel
BuildRequires: libgnomeui-devel
@@ -42,6 +41,7 @@
%build
export _lib=%{_lib}
+autoreconf --force
%configure
make %{?_smp_mflags}
@@ -72,6 +72,10 @@
%{_datadir}/idl/*
%changelog
+* Wed Apr 30 2008 Matthew Barnes <mbarnes at redhat.com> - 1.0.8-5.fc9
+- Revise patch for RH bug #426347 (rework language support).
+- Add build dependency on iso-codes-devel.
+
* Sat Feb 09 2008 Matthew Barnes <mbarnes at redhat.com> - 1.0.8-4.fc9
- Rebuild with GCC 4.3
- Previous message (by thread): rpms/brazil/devel brazil-build.xml, NONE, 1.1 brazil-remove-proprietary-sun-api.patch, NONE, 1.1 brazil.spec, NONE, 1.1 get-brazil.sh, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Next message (by thread): rpms/brazil/F-9 brazil-build.xml, NONE, 1.1 brazil-remove-proprietary-sun-api.patch, NONE, 1.1 brazil.spec, NONE, 1.1 get-brazil.sh, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list