diff options
author | Marinus Schraal <foser@gentoo.org> | 2006-04-05 14:07:42 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2006-04-05 14:07:42 +0000 |
commit | 2b4c24e806bafd27362bd30248dd8384b08d8bbc (patch) | |
tree | c81c3b1ff230d40befe1f6fac6e9c65e1f56d49b /app-text/gtkspell | |
parent | Add ~amd64 (diff) | |
download | historical-2b4c24e806bafd27362bd30248dd8384b08d8bbc.tar.gz historical-2b4c24e806bafd27362bd30248dd8384b08d8bbc.tar.bz2 historical-2b4c24e806bafd27362bd30248dd8384b08d8bbc.zip |
bump to propagate patch fix
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'app-text/gtkspell')
-rw-r--r-- | app-text/gtkspell/ChangeLog | 8 | ||||
-rw-r--r-- | app-text/gtkspell/Manifest | 39 | ||||
-rw-r--r-- | app-text/gtkspell/files/digest-gtkspell-2.0.11-r1 | 3 | ||||
-rw-r--r-- | app-text/gtkspell/files/gtkspell-2.0.11-enchant.patch | 262 | ||||
-rw-r--r-- | app-text/gtkspell/gtkspell-2.0.11-r1.ebuild | 51 |
5 files changed, 356 insertions, 7 deletions
diff --git a/app-text/gtkspell/ChangeLog b/app-text/gtkspell/ChangeLog index 6eaa68bc1696..7a8edd20dfd5 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.44 2005/11/24 18:41:57 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/gtkspell/ChangeLog,v 1.45 2006/04/05 14:07:42 foser Exp $ + +*gtkspell-2.0.11-r1 (05 Apr 2006) + + 05 Apr 2006; Marinus Schraal <foser@gentoo.org> gtkspell-2.0.11-r1.ebuild, + files/gtkspell-2.0.11-enchant.patch : + Fix enchant patch to allow translations to work (#125028) 24 Nov 2005; Markus Rothe <corsair@gentoo.org> gtkspell-2.0.11.ebuild: Stable on ppc64 diff --git a/app-text/gtkspell/Manifest b/app-text/gtkspell/Manifest index 4b3a2180a861..71f981acfa06 100644 --- a/app-text/gtkspell/Manifest +++ b/app-text/gtkspell/Manifest @@ -1,9 +1,36 @@ -MD5 7c06ccd7332786b7411b7e994f258417 ChangeLog 4795 -MD5 837c8b2c0504f33feacb22c9eebacabe gtkspell-2.0.4-r1.ebuild 1169 -MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158 -MD5 67a0f89aa2216f0022b20b7cbf976e45 gtkspell-2.0.11.ebuild 1006 +MD5 07673352b29b64709ab7be201bcfbb1b ChangeLog 5006 +RMD160 4797c076a32f6f5c9ebcdd87729bba508ac64b11 ChangeLog 5006 +SHA256 3f2ec52ca11ee6b86f18ba5f437a450a8ac82c6df2d2148d76ffd3718225686e ChangeLog 5006 +MD5 f9abff1da530fea89cf3043f082cc2d3 files/digest-gtkspell-2.0.11 67 +RMD160 bcc915634024da34e78d6d1b527795d9594c8607 files/digest-gtkspell-2.0.11 67 +SHA256 e2397d3c56a59f6228c53dfbb5e078c897631c861f9ddb12b8129f38c9a8f559 files/digest-gtkspell-2.0.11 67 +MD5 45980e49cfff969d1e77692cd314dde2 files/digest-gtkspell-2.0.11-r1 247 +RMD160 0fc169fdb8ce61fe22d0bdcdb8a34f5448a49206 files/digest-gtkspell-2.0.11-r1 247 +SHA256 07fdd14f6bf04567c1b057207bcbb6d4a0a38746d2e835a5724d567b2847ce73 files/digest-gtkspell-2.0.11-r1 247 MD5 ae68a374d757954ed1b57e829bb90ea3 files/digest-gtkspell-2.0.4-r1 66 +RMD160 f19910b4bcad7ace56218f5b431516d6e28a94fc files/digest-gtkspell-2.0.4-r1 66 +SHA256 9044669972eef068a34b1a51cbcd7a718a4f8ac2e6b95feffd4da868c3755000 files/digest-gtkspell-2.0.4-r1 66 +MD5 b91273fd65f12fdab689ed2beb37c352 files/gtkspell-2.0.10-enchant.patch 8894 +RMD160 29b116631863706083357c0b965d9906b6475ccf files/gtkspell-2.0.10-enchant.patch 8894 +SHA256 6d1f282b69d10b60e7e8df48497f6e19f0c2186fc7383fd6685f0a6ea539b185 files/gtkspell-2.0.10-enchant.patch 8894 +MD5 56272bca2bff7fda0bfe8be7ff9808b5 files/gtkspell-2.0.11-enchant.patch 8904 +RMD160 5109a1b1fda7d8af38a0d1fbac7ebeb3a51a5697 files/gtkspell-2.0.11-enchant.patch 8904 +SHA256 9df42ce7c21e548d083e7970a98944225ac54d5db4fef091ecca0e7d1108ae4f files/gtkspell-2.0.11-enchant.patch 8904 MD5 7b72f96acd5c9a16b6a6284de819f4aa files/gtkspell-2.0.4-docbookx.patch 582 +RMD160 8e4ffb7ea0ae52bc894d6f104f7810d37677612c files/gtkspell-2.0.4-docbookx.patch 582 +SHA256 da00bf5eed3ed12d022f155c8fd5fe71f0eeee1491f9aef79c35f71114049c42 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 -MD5 b91273fd65f12fdab689ed2beb37c352 files/gtkspell-2.0.10-enchant.patch 8894 +RMD160 f6716ab044fb9ecda7e57193a3d658a82ddd10f7 files/gtkspell-2.0.4-enchant.patch 11806 +SHA256 5ebcef66a303147e81e30e65cc396e25f91cb29c410bd670859ff847661e3f6d files/gtkspell-2.0.4-enchant.patch 11806 +MD5 5ab28dfe426f4fd20842ee4a7197ff85 gtkspell-2.0.11-r1.ebuild 1006 +RMD160 c05f71504e5cf56c8240b413b44bc806ee4450de gtkspell-2.0.11-r1.ebuild 1006 +SHA256 339d33a890bd6cd47af5c9a516949ff6e45dd2ca1a3807f99e17862c2005284b gtkspell-2.0.11-r1.ebuild 1006 +MD5 67a0f89aa2216f0022b20b7cbf976e45 gtkspell-2.0.11.ebuild 1006 +RMD160 b8f6c29d817e403796632ec2b7acabb6de09883e gtkspell-2.0.11.ebuild 1006 +SHA256 15b817ce63df26832c67dd19cdd77524c58d7ebc85e5607ae562cc4ebc32f131 gtkspell-2.0.11.ebuild 1006 +MD5 837c8b2c0504f33feacb22c9eebacabe gtkspell-2.0.4-r1.ebuild 1169 +RMD160 232c6fcc296a7fcaac1c3923f596c3d176d20a7d gtkspell-2.0.4-r1.ebuild 1169 +SHA256 4752435dfe92a92575d8bb2c5ed63fb76c88351cf526bc218bda163d4d859e2d gtkspell-2.0.4-r1.ebuild 1169 +MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158 +RMD160 c0e2bae8e91bb6be8922bac5e4f597302e06587e metadata.xml 158 +SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1 metadata.xml 158 diff --git a/app-text/gtkspell/files/digest-gtkspell-2.0.11-r1 b/app-text/gtkspell/files/digest-gtkspell-2.0.11-r1 new file mode 100644 index 000000000000..f4af17382c66 --- /dev/null +++ b/app-text/gtkspell/files/digest-gtkspell-2.0.11-r1 @@ -0,0 +1,3 @@ +MD5 494869f67146a12a3f17a958f51aeb05 gtkspell-2.0.11.tar.gz 347172 +RMD160 c5ca1804807f445e246de2b384448a7c7c76855f gtkspell-2.0.11.tar.gz 347172 +SHA256 521d6be1e1236706cd491305b10f01d989bf47787ca97242c56c0d2b038e6a12 gtkspell-2.0.11.tar.gz 347172 diff --git a/app-text/gtkspell/files/gtkspell-2.0.11-enchant.patch b/app-text/gtkspell/files/gtkspell-2.0.11-enchant.patch new file mode 100644 index 000000000000..00d9e0320fea --- /dev/null +++ b/app-text/gtkspell/files/gtkspell-2.0.11-enchant.patch @@ -0,0 +1,262 @@ +diff -x '*orig' -uNr gtkspell-2.0.11/configure.ac gtkspell-2.0.11.patched/configure.ac +--- gtkspell-2.0.11/configure.ac 2005-05-27 23:38:33.000000000 +0200 ++++ gtkspell-2.0.11.patched/configure.ac 2006-04-05 15:51:17.000000000 +0200 +@@ -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 -x '*orig' -uNr gtkspell-2.0.11/gtkspell/gtkspell.c gtkspell-2.0.11.patched/gtkspell/gtkspell.c +--- gtkspell-2.0.11/gtkspell/gtkspell.c 2005-05-27 23:09:10.000000000 +0200 ++++ gtkspell-2.0.11.patched/gtkspell/gtkspell.c 2006-04-05 15:52:08.000000000 +0200 +@@ -14,37 +14,7 @@ + + #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> + + const int debug = 0; + const int quiet = 0; +@@ -55,7 +25,8 @@ + GtkTextMark *mark_insert_start; + GtkTextMark *mark_insert_end; + gboolean deferred_check; +- AspellSpeller *speller; ++ EnchantBroker *broker; ++ EnchantDict *speller; + GtkTextMark *mark_click; + }; + +@@ -124,10 +95,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); + } +@@ -302,8 +275,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); + +@@ -321,7 +293,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); + +@@ -335,6 +307,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); +@@ -350,33 +325,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(""); +@@ -388,8 +363,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); +@@ -400,19 +375,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(); +@@ -517,9 +489,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"); +@@ -531,26 +500,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; + } +@@ -713,8 +681,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-r1.ebuild b/app-text/gtkspell/gtkspell-2.0.11-r1.ebuild new file mode 100644 index 000000000000..912c8d5045e7 --- /dev/null +++ b/app-text/gtkspell/gtkspell-2.0.11-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2006 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-r1.ebuild,v 1.1 2006/04/05 14:07:42 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 ppc64 sparc x86" +IUSE="doc" + +RDEPEND=">=x11-libs/gtk+-2 + >=app-text/enchant-1.1.6" + +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.11-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 + +} |