diff --git a/gtranslator-gtkspell3.patch b/gtranslator-gtkspell3.patch new file mode 100644 index 0000000..723a93f --- /dev/null +++ b/gtranslator-gtkspell3.patch @@ -0,0 +1,98 @@ +From cf33d8761dbfc7f6c8b27c3146efcad81f8fbde9 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Sun, 13 Jan 2013 13:19:40 +0000 +Subject: Port to gtkspell3 + +https://bugzilla.gnome.org/show_bug.cgi?id=691655 +--- +diff --git a/configure.ac b/configure.ac +index c1ba5b6..3fe9c46 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -84,7 +84,7 @@ GDL_REQUIRED=3.6.0 + GDA_REQUIRED=4.2.3 + PEAS_REQUIRED=1.2.0 + GDICT_OPTIONAL=0.11.0 +-GTKSPELL_OPTIONAL=2.99.99 ++GTKSPELL_OPTIONAL=3.0.0 + JSON_GLIB_OPTIONAL=0.12.0 + + AC_ARG_WITH(gda, +@@ -174,14 +174,14 @@ dnl ------------------------------------------------------------------- + dnl Check for gtkspell >= 3.0 and use it if found + dnl ------------------------------------------------------------------- + have_gtkspell=no +-AC_ARG_WITH(gtkspell3, ++AC_ARG_WITH(gtkspell, + AS_HELP_STRING([--with-gtkspell],[Build with spell support]),, + with_gtkspell=auto) + + if test x"$with_gtkspell" != "xno" + then + PKG_CHECK_MODULES([GTKSPELL], [ +- gtkspell-3.0 >= $GTKSPELL_OPTIONAL ++ gtkspell3-3.0 >= $GTKSPELL_OPTIONAL + ], have_gtkspell=yes, have_gtkspell=no) + + if test x"$have_gtkspell" = "xyes" +@@ -339,7 +339,7 @@ if [ test x"$have_gtkspell" = "xyes" ]; then + echo "Building spell support: ................................YES" + else + echo "Building spell support: ................................NO" +- echo " Requires gtkspell >= $GTKSPELL_OPTIONAL" ++ echo " Requires gtkspell3 >= $GTKSPELL_OPTIONAL" + fi + + echo " +diff --git a/src/gtr-view.c b/src/gtr-view.c +index 59f18e8..b9c4f6a 100644 +--- a/src/gtr-view.c ++++ b/src/gtr-view.c +@@ -65,7 +65,7 @@ struct _GtrViewPrivate + gchar *search_text; + + #ifdef HAVE_GTKSPELL +- GtkSpell *spell; ++ GtkSpellChecker *spell; + #endif + }; + +@@ -75,11 +75,10 @@ gtr_attach_gtkspell (GtrView * view) + { + GError *error = NULL; + gchar *errortext = NULL; +- view->priv->spell = NULL; + +- view->priv->spell = +- gtkspell_new_attach (GTK_TEXT_VIEW (view), NULL, &error); +- if (view->priv->spell == NULL) ++ view->priv->spell = gtk_spell_checker_new (); ++ gtk_spell_checker_set_language (view->priv->spell, NULL, &error); ++ if (error) + { + g_warning (_("gtkspell error: %s\n"), error->message); + errortext = +@@ -90,6 +89,11 @@ gtr_attach_gtkspell (GtrView * view) + g_error_free (error); + g_free (errortext); + } ++ else ++ { ++ gtk_spell_checker_attach (view->priv->spell, ++ GTK_TEXT_VIEW (view)); ++ } + } + #endif + +@@ -263,7 +267,7 @@ gtr_view_enable_spellcheck (GtrView * view, gboolean enable) + #ifdef HAVE_GTKSPELL + if (!view->priv->spell) + return; +- gtkspell_detach (view->priv->spell); ++ gtk_spell_checker_detach (view->priv->spell); + #endif + } + } +-- +cgit v0.9.1 + diff --git a/gtranslator.changes b/gtranslator.changes index abb549b..9bc2908 100644 --- a/gtranslator.changes +++ b/gtranslator.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Mar 21 19:00:46 UTC 2013 - dimstar@opensuse.org + +- Port to granslator3: + + Add gtranslator-gtkspell3.patch + + Replace pkgconfig(gtkspell-3.0) BuildRequires with + pkgconfig(gtkspell3-3.0). + + Add gnome-common BuildRequires and call to autoreconf, as above + patch touches the build system. + ------------------------------------------------------------------- Fri Jan 4 13:32:30 UTC 2013 - dimstar@opensuse.org diff --git a/gtranslator.spec b/gtranslator.spec index 595dc3b..ca895cc 100644 --- a/gtranslator.spec +++ b/gtranslator.spec @@ -24,7 +24,11 @@ License: GPL-3.0+ Group: Development/Tools/Other Url: http://gtranslator.sourceforge.net Source: http://download.gnome.org/sources/gtranslator/2.91/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM gtranslator-gtkspell3.patch dimstar@opensuse.org -- Port to gtkspell3, taken from git +Patch0: gtranslator-gtkspell3.patch BuildRequires: fdupes +# Needed for patch0 +BuildRequires: gnome-common BuildRequires: intltool BuildRequires: yelp-tools # Not using a pkgconfig() BuildRequires, to allow building against libgda 4.0 and 5.0 @@ -37,7 +41,7 @@ BuildRequires: pkgconfig(glib-2.0) >= 2.32.0 BuildRequires: pkgconfig(gsettings-desktop-schemas) BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.2 BuildRequires: pkgconfig(gtksourceview-3.0) >= 3.0.0 -BuildRequires: pkgconfig(gtkspell-3.0) +BuildRequires: pkgconfig(gtkspell3-3.0) BuildRequires: pkgconfig(iso-codes) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(libpeas-1.0) >= 1.2.0 @@ -66,9 +70,12 @@ files imminently. %lang_package %prep %setup -q +%patch0 -p1 translation-update-upstream %build +# Needed for patch0 +autoreconf -fiv %configure \ --disable-static \ --disable-scrollkeeper \