diff options
author | Marinus Schraal <foser@gentoo.org> | 2005-07-31 17:44:55 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2005-07-31 17:44:55 +0000 |
commit | d4720c2736d80e31993770d344de6629bcbf8e16 (patch) | |
tree | afcfe99e90dfc2c60246bb474c7300b21e4e0ab9 /app-text | |
parent | version bump (diff) | |
download | historical-d4720c2736d80e31993770d344de6629bcbf8e16.tar.gz historical-d4720c2736d80e31993770d344de6629bcbf8e16.tar.bz2 historical-d4720c2736d80e31993770d344de6629bcbf8e16.zip |
new release
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'app-text')
-rw-r--r-- | app-text/gtkspell/ChangeLog | 8 | ||||
-rw-r--r-- | app-text/gtkspell/Manifest | 9 | ||||
-rw-r--r-- | app-text/gtkspell/files/digest-gtkspell-2.0.11 | 1 | ||||
-rw-r--r-- | app-text/gtkspell/files/gtkspell-2.0.10-enchant.patch | 266 | ||||
-rw-r--r-- | app-text/gtkspell/gtkspell-2.0.11.ebuild | 51 |
5 files changed, 331 insertions, 4 deletions
diff --git a/app-text/gtkspell/ChangeLog b/app-text/gtkspell/ChangeLog index a0d86458496f..f7d1d6d3b40d 100644 --- a/app-text/gtkspell/ChangeLog +++ b/app-text/gtkspell/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/gtkspell # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/gtkspell/ChangeLog,v 1.33 2005/01/01 16:18:02 eradicator Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/gtkspell/ChangeLog,v 1.34 2005/07/31 17:44:55 foser Exp $ + +*gtkspell-2.0.11 (31 Jul 2005) + + 31 Jul 2005; Marinus Schraal <foser@gentoo.org> gtkspell-2.0.11.ebuild : + New release + Thanks to Drew Ogle in #46657 for the adaptation of the enchant patch 17 Dec 2004; Markus Rothe <corsair@gentoo.org> gtkspell-2.0.4-r1.ebuild: Stable on ppc64 diff --git a/app-text/gtkspell/Manifest b/app-text/gtkspell/Manifest index e023f4918b1e..864711cf252c 100644 --- a/app-text/gtkspell/Manifest +++ b/app-text/gtkspell/Manifest @@ -1,10 +1,13 @@ -MD5 7f19e083b3f8b9fd045a16a3aceaa127 ChangeLog 3772 MD5 1c714efb0f710a9ff6e71208df9b6793 gtkspell-2.0.2.ebuild 658 +MD5 19fdb3e7ac1b4fc64c52318d383c4b49 gtkspell-2.0.11.ebuild 1008 MD5 837c8b2c0504f33feacb22c9eebacabe gtkspell-2.0.4-r1.ebuild 1169 MD5 1363cf085dbe8bc07a5aac2000d529f3 gtkspell-2.0.4.ebuild 1087 +MD5 7848e9970d806b9d71c1433bdae0c699 ChangeLog 3961 MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158 +MD5 b91273fd65f12fdab689ed2beb37c352 files/gtkspell-2.0.10-enchant.patch 8894 +MD5 7b72f96acd5c9a16b6a6284de819f4aa files/gtkspell-2.0.4-docbookx.patch 582 +MD5 ae68a374d757954ed1b57e829bb90ea3 files/digest-gtkspell-2.0.4-r1 66 MD5 776dac4f06c10cd4d6030bb0227604ca files/digest-gtkspell-2.0.2 66 MD5 ae68a374d757954ed1b57e829bb90ea3 files/digest-gtkspell-2.0.4 66 -MD5 ae68a374d757954ed1b57e829bb90ea3 files/digest-gtkspell-2.0.4-r1 66 -MD5 7b72f96acd5c9a16b6a6284de819f4aa files/gtkspell-2.0.4-docbookx.patch 582 MD5 2c687dc22e69904275ba8afee73f55a9 files/gtkspell-2.0.4-enchant.patch 11806 +MD5 f9abff1da530fea89cf3043f082cc2d3 files/digest-gtkspell-2.0.11 67 diff --git a/app-text/gtkspell/files/digest-gtkspell-2.0.11 b/app-text/gtkspell/files/digest-gtkspell-2.0.11 new file mode 100644 index 000000000000..c4707647f597 --- /dev/null +++ b/app-text/gtkspell/files/digest-gtkspell-2.0.11 @@ -0,0 +1 @@ +MD5 494869f67146a12a3f17a958f51aeb05 gtkspell-2.0.11.tar.gz 347172 diff --git a/app-text/gtkspell/files/gtkspell-2.0.10-enchant.patch b/app-text/gtkspell/files/gtkspell-2.0.10-enchant.patch new file mode 100644 index 000000000000..ec02ba4e7ce9 --- /dev/null +++ b/app-text/gtkspell/files/gtkspell-2.0.10-enchant.patch @@ -0,0 +1,266 @@ +diff -ru gtkspell-2.0.10/configure.ac egspell/configure.ac +--- gtkspell-2.0.10/configure.ac 2005-02-27 10:48:18.000000000 -0500 ++++ egspell/configure.ac 2005-05-23 12:23:01.193537669 -0400 +@@ -4,18 +4,12 @@ + AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) + AC_CONFIG_HEADERS([config.h]) + +-AC_CHECK_HEADER(aspell.h, [AC_DEFINE(HAVE_ASPELL_H,1, +- [Define to 1 if you have the <aspell.h> header file.] )] ) +-AC_CHECK_HEADER(pspell/pspell.h, [AC_DEFINE(HAVE_PSPELL_H,1, +- [Define to 1 if you have the <pspell/pspell.h> header file.] )] ) +-AC_CHECK_LIB(aspell, new_aspell_speller, SPELLER_LIB="-laspell", +- [AC_CHECK_LIB(pspell, new_pspell_manager, SPELLER_LIB="-lpspell", +- [AC_MSG_ERROR([You must have the aspell or pspell dev libraries to build gtkspell.]) ] ) ] ) ++SPELLER_LIB=-lenchant + + AC_SUBST(SPELLER_LIB) + GTKSPELL_PACKAGES=gtk+-2.0 + AC_SUBST(GTKSPELL_PACKAGES) +-PKG_CHECK_MODULES(GTKSPELL, $GTKSPELL_PACKAGES) ++PKG_CHECK_MODULES(GTKSPELL, $GTKSPELL_PACKAGES enchant >= 0.4.0 ) + AC_SUBST(GTKSPELL_CFLAGS) + AC_SUBST(GTKSPELL_LIBS) + +diff -ru gtkspell-2.0.10/gtkspell/gtkspell.c egspell/gtkspell/gtkspell.c +--- gtkspell-2.0.10/gtkspell/gtkspell.c 2005-02-27 10:53:26.000000000 -0500 ++++ egspell/gtkspell/gtkspell.c 2005-05-23 12:53:31.615836490 -0400 +@@ -14,37 +14,11 @@ + + #define GTKSPELL_MISSPELLED_TAG "gtkspell-misspelled" + +-#ifdef HAVE_ASPELL_H +- #define USING_ASPELL +- #include <aspell.h> +-#elif defined HAVE_PSPELL_H +- #define USING_PSPELL +- #include <pspell/pspell.h> +- #define AspellSpeller PspellManager +- #define speller manager +- #define aspell_speller_check pspell_manager_check +- #define aspell_speller_add_to_session pspell_manager_add_to_session +- #define aspell_speller_add_to_personal pspell_manager_add_to_personal +- #define aspell_speller_save_all_word_lists pspell_manager_save_all_word_lists +- #define aspell_speller_store_replacement pspell_manager_store_replacement +- #define AspellWordList PspellWordList +- #define AspellStringEnumeration PspellStringEmulation +- #define aspell_speller_suggest pspell_manager_suggest +- #define aspell_word_list_elements pspell_word_list_elements +- #define aspell_string_enumeration_next pspell_string_emulation_next +- #define delete_aspell_string_enumeration delete_pspell_string_emulation +- #define AspellConfig PspellConfig +- #define AspellCanHaveError PspellCanHaveError +- #define new_aspell_config new_pspell_config +- #define aspell_config_replace pspell_config_replace +- #define new_aspell_speller new_pspell_manager +- #define delete_aspell_config delete_pspell_config +- #define aspell_error_message pspell_error_message +- #define delete_aspell_speller delete_pspell_manager +- #define to_aspell_speller to_pspell_manager +- #define aspell_error_number pspell_error_number +- #define aspell pspell +-#endif ++#include <enchant.h> ++ ++/* prepare for gettext internationalization */ ++#undef _ ++#define _(x) x + + const int debug = 0; + const int quiet = 0; +@@ -55,7 +29,8 @@ + GtkTextMark *mark_insert_start; + GtkTextMark *mark_insert_end; + gboolean deferred_check; +- AspellSpeller *speller; ++ EnchantBroker *broker; ++ EnchantDict *speller; + GtkTextMark *mark_click; + }; + +@@ -126,10 +101,12 @@ + check_word(GtkSpell *spell, GtkTextBuffer *buffer, + GtkTextIter *start, GtkTextIter *end) { + char *text; ++ if (!spell->speller) ++ return; + text = gtk_text_buffer_get_text(buffer, start, end, FALSE); + if (debug) g_print("checking: %s\n", text); + if (g_unichar_isdigit(*text) == FALSE) /* don't check numbers */ +- if (aspell_speller_check(spell->speller, text, -1) == FALSE) ++ if (enchant_dict_check(spell->speller, text, strlen(text)) != 0) + gtk_text_buffer_apply_tag(buffer, spell->tag_highlight, start, end); + g_free(text); + } +@@ -304,8 +281,7 @@ + get_word_extents_from_mark(buffer, &start, &end, spell->mark_click); + word = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); + +- aspell_speller_add_to_personal(spell->speller, word, strlen(word)); +- aspell_speller_save_all_word_lists(spell->speller); ++ enchant_dict_add_to_pwl( spell->speller, word, strlen(word)); + + gtkspell_recheck_all(spell); + +@@ -323,7 +299,7 @@ + get_word_extents_from_mark(buffer, &start, &end, spell->mark_click); + word = gtk_text_buffer_get_text(buffer, &start, &end, FALSE); + +- aspell_speller_add_to_session(spell->speller, word, strlen(word)); ++ enchant_dict_add_to_session(spell->speller, word, strlen(word)); + + gtkspell_recheck_all(spell); + +@@ -337,6 +313,9 @@ + GtkTextIter start, end; + GtkTextBuffer *buffer; + ++ if (!spell->speller) ++ return; ++ + buffer = gtk_text_view_get_buffer(spell->view); + + get_word_extents_from_mark(buffer, &start, &end, spell->mark_click); +@@ -352,33 +331,33 @@ + gtk_text_buffer_delete(buffer, &start, &end); + gtk_text_buffer_insert(buffer, &start, newword, -1); + +- aspell_speller_store_replacement(spell->speller, ++ enchant_dict_store_replacement(spell->speller, + oldword, strlen(oldword), + newword, strlen(newword)); + + g_free(oldword); + } + +-GtkWidget* ++static GtkWidget* + build_suggestion_menu(GtkSpell *spell, GtkTextBuffer *buffer, + const char *word) { + const char *suggestion; + GtkWidget *topmenu, *menu; + GtkWidget *mi; + GtkWidget *hbox; +- int count = 0; + void *spelldata; +- const AspellWordList *suggestions; +- AspellStringEnumeration *elements; ++ char **suggestions; ++ size_t n_suggs, i; + char *label; + + topmenu = menu = gtk_menu_new(); + +- suggestions = aspell_speller_suggest(spell->speller, word, -1); +- elements = aspell_word_list_elements(suggestions); ++ if (!spell->speller) ++ return topmenu; + +- suggestion = aspell_string_enumeration_next(elements); +- if (suggestion == NULL) { ++ suggestions = enchant_dict_suggest(spell->speller, word, strlen(word), &n_suggs); ++ ++ if (suggestions == NULL || !n_suggs) { + /* no suggestions. put something in the menu anyway... */ + GtkWidget *label; + label = gtk_label_new(""); +@@ -390,8 +369,8 @@ + gtk_menu_shell_prepend(GTK_MENU_SHELL(menu), mi); + } else { + /* build a set of menus with suggestions. */ +- while (suggestion != NULL) { +- if (count == 10) { ++ for (i = 0; i < n_suggs; i++ ) { ++ if (i > 0 && i % 10 == 0) { + mi = gtk_menu_item_new(); + gtk_widget_show(mi); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); +@@ -402,19 +381,16 @@ + + menu = gtk_menu_new(); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(mi), menu); +- count = 0; + } +- mi = gtk_menu_item_new_with_label(suggestion); ++ mi = gtk_menu_item_new_with_label(suggestions[i]); + g_signal_connect(G_OBJECT(mi), "activate", + G_CALLBACK(replace_word), spell); + gtk_widget_show(mi); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), mi); +- count++; +- suggestion = aspell_string_enumeration_next(elements); + } + } + +- delete_aspell_string_enumeration(elements); ++ enchant_dict_free_suggestions(spell->speller, suggestions); + + /* Separator */ + mi = gtk_menu_item_new(); +@@ -519,9 +495,6 @@ + + static gboolean + gtkspell_set_language_internal(GtkSpell *spell, const gchar *lang, GError **error) { +- AspellConfig *config; +- AspellCanHaveError *err; +- AspellSpeller *speller; + + if (lang == NULL) { + lang = g_getenv("LANG"); +@@ -533,26 +506,25 @@ + } + } + +- config = new_aspell_config(); +- if (lang) +- aspell_config_replace(config, "language-tag", lang); +- aspell_config_replace(config, "encoding", "utf-8"); +- err = new_aspell_speller(config); +- delete_aspell_config(config); ++ if (!spell->broker) ++ spell->broker = enchant_broker_init(); + +- if (aspell_error_number(err) != 0) { +-#ifdef USING_ASPELL +- g_set_error(error, GTKSPELL_ERROR, GTKSPELL_ERROR_BACKEND, +- "aspell: %s", aspell_error_message(err)); +-#elif defined USING_PSPELL ++ if (spell->speller) { ++ enchant_broker_free_dict(spell->broker, spell->speller); ++ spell->speller = NULL; ++ } ++ ++ if (!lang) { ++ lang = "en"; ++ } ++ ++ spell->speller = enchant_broker_request_dict(spell->broker, lang ); ++ ++ if (!spell->speller) { + g_set_error(error, GTKSPELL_ERROR, GTKSPELL_ERROR_BACKEND, +- "pspell: %s", aspell_error_message(err)); +-#endif ++ _("enchant error for language: %s"),lang); + return FALSE; + } +- if (spell->speller) +- delete_aspell_speller(spell->speller); +- spell->speller = to_aspell_speller(err); + + return TRUE; + } +@@ -715,8 +687,13 @@ + gtk_text_buffer_delete_mark(buffer, spell->mark_insert_end); + gtk_text_buffer_delete_mark(buffer, spell->mark_click); + +- delete_aspell_speller(spell->speller); + ++ if (spell->broker) { ++ if (spell->speller) { ++ enchant_broker_free_dict(spell->broker, spell->speller); ++ } ++ enchant_broker_free(spell->broker); ++ } + g_signal_handlers_disconnect_matched(spell->view, + G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, diff --git a/app-text/gtkspell/gtkspell-2.0.11.ebuild b/app-text/gtkspell/gtkspell-2.0.11.ebuild new file mode 100644 index 000000000000..04140206d1c3 --- /dev/null +++ b/app-text/gtkspell/gtkspell-2.0.11.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/gtkspell/gtkspell-2.0.11.ebuild,v 1.1 2005/07/31 17:44:55 foser Exp $ + +inherit libtool eutils + +DESCRIPTION="Spell checking widget for GTK2" +HOMEPAGE="http://gtkspell.sourceforge.net/" +SRC_URI="http://${PN}.sourceforge.net/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86 ~ppc64" +IUSE="doc" + +RDEPEND=">=x11-libs/gtk+-2 + >=app-text/enchant-1" + +DEPEND="${RDEPEND} + sys-devel/autoconf + doc? ( >=dev-util/gtk-doc-1 + =app-text/docbook-xml-dtd-4.2* )" + +src_unpack() { + + unpack ${A} + + cd ${S} + + # use enchant as backend + epatch ${FILESDIR}/${PN}-2.0.10-enchant.patch + + autoconf || die + libtoolize --copy --force + +} + +src_compile() { + + econf $(use_enable doc gtk-doc) || die + emake || die "compile failure" + +} + +src_install() { + + make DESTDIR=${D} install || die + + dodoc AUTHORS ChangeLog NEWS README + +} |