[packages/gtranslator] - added gtranslator-gtkspell3.patch from opensuse to build with gtkselll3 - added devel package -

blekot blekot at pld-linux.org
Sun Jun 30 13:59:37 CEST 2013


commit 25578ccea763ce3b8fe3b85d8e91f8a503834269
Author: Lukasz Glebicki <blekot at pld-linux.org>
Date:   Sun Jun 30 13:58:40 2013 +0200

    - added gtranslator-gtkspell3.patch from opensuse to build with
      gtkselll3
    - added devel package
    - rel 1
    - cleanup

 gtranslator-gtkspell3.patch | 84 +++++++++++++++++++++++++++++++++++++++++++++
 gtranslator.spec            | 50 +++++++++++++++++++++------
 2 files changed, 123 insertions(+), 11 deletions(-)
---
diff --git a/gtranslator.spec b/gtranslator.spec
index 32d3c6d..7d47eac 100644
--- a/gtranslator.spec
+++ b/gtranslator.spec
@@ -1,15 +1,14 @@
-# TODO: gtranslator-2.91.6-1.x86_64 zaznaczył gettext-devel-0.18.2.1-2.x86_64 (wł. libgettextpo.so.0()(64bit))
-
 Summary:	gtranslator - a comfortable po file editor with many bells and whistles
 Summary(pl.UTF-8):	gtranslator - wygodny edytor plików po z różnymi wodotryskami
 Name:		gtranslator
 Version:	2.91.6
-Release:	0.1
+Release:	1
 Epoch:		1
 License:	GPL
 Group:		Development/Tools
 Source0:	http://ftp.gnome.org/pub/GNOME/sources/gtranslator/2.91/%{name}-%{version}.tar.xz
 # Source0-md5:	4a86eacdbc4bb0bc09191b8a110f6d39
+Patch0:		%{name}-gtkspell3.patch
 URL:		http://gtranslator.sourceforge.net/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -39,6 +38,7 @@ BuildRequires:	scrollkeeper
 Requires(post,postun):	gtk-update-icon-cache
 Requires(post,postun):	hicolor-icon-theme
 Requires(post,postun):	scrollkeeper
+Provides:	%{name} = %{version}-%{release}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -51,8 +51,22 @@ gtranslator jest wygodnym edytorem plików po z wieloma wodotryskami.
 Dostarcza dużo użytecznych funkcji ułatwiających pracę przy
 tłumaczeniach plików po.
 
+%package devel
+Summary:	A GNOME po file editor with many bells and whistles
+Summary(pl.UTF-8):	Pliki programistyczne edytora gtranslator
+Group:		Development/Tools
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Development files for gtranslator libraries.
+
+%description devel -l pl.UTF-8
+Pliki programistyczne dla bibliotek granslatora.
+
+
 %prep
 %setup -q
+%patch -p1
 
 %build
 %{__glib_gettextize}
@@ -61,9 +75,14 @@ tłumaczeniach plików po.
 %{__autoheader}
 %{__automake}
 %{__autoconf}
-%configure
+%configure \
+	--disable-static \
+	--with-dictionary \
+	--with-gda=5.0 \
+	--disable-gtk-doc-html \
+	--with-gtkspell
+
 %{__make}
-%{__make} check
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -71,12 +90,8 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-rm $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/*.{a,la}
-# we don't need headers
-rm $RPM_BUILD_ROOT%{_includedir}/gtranslator-3.0/gtranslator/*.h
-# we don't need docs too
-rm -fr $RPM_BUILD_ROOT%{_datadir}/gtk-doc/
-
+rm $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/charmap/*.py[co]
+rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc
 
 %find_lang %{name} --with-gnome --with-omf
 
@@ -102,6 +117,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/%{name}/plugins/gtr*.plugin
 %dir %{_libdir}/gtranslator/plugins/charmap
 %{_libdir}/gtranslator/plugins/charmap/*.py
+%dir %{_libdir}/%{name}/girepository-1.0
+%{_libdir}/%{name}/girepository-1.0/Gtranslator-3.0.typelib
 %dir %{_datadir}/%{name}
 %{_datadir}/%{name}/dtd
 %{_datadir}/%{name}/pixmaps
@@ -111,3 +128,14 @@ rm -rf $RPM_BUILD_ROOT
 %{_iconsdir}/hicolor/*/*/*.svg
 %{_desktopdir}/*.desktop
 %{_mandir}/man1/*
+
+%files devel
+%defattr(644,root,root,755)
+%dir %{_includedir}/gtranslator-3.0
+%dir %{_includedir}/gtranslator-3.0/gtranslator
+%{_includedir}/gtranslator-3.0/gtranslator/*.h
+%{_pkgconfigdir}/gtranslator.pc
+%{_libdir}/gtranslator/libgtranslator-private.la
+%{_libdir}/gtranslator/plugins/*.la
+%dir %{_datadir}/%{name}/gir-1.0
+%{_datadir}/%{name}/gir-1.0/*
diff --git a/gtranslator-gtkspell3.patch b/gtranslator-gtkspell3.patch
new file mode 100644
index 0000000..c9a19dd
--- /dev/null
+++ b/gtranslator-gtkspell3.patch
@@ -0,0 +1,84 @@
+--- 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 "
+--- 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
+     }
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gtranslator.git/commitdiff/25578ccea763ce3b8fe3b85d8e91f8a503834269



More information about the pld-cvs-commit mailing list