[packages/ibus] - feed ibus_gjs configure with proper gjs and gs versions - fix gnome-shell extensions (null pointer

baggins baggins at pld-linux.org
Tue Nov 6 00:08:38 CET 2012


commit cd6f418fac93f3cd079cd9b49314bc6af83fda90
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Nov 6 00:06:06 2012 +0100

    - feed ibus_gjs configure with proper gjs and gs versions
    - fix gnome-shell extensions (null pointers and gs 3.6 update)
    - build gjs last to build it with bundled ibus
    - rel 1

 ibus-gjs-fixes.patch | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 ibus.spec            | 35 ++++++++++++++++++++++---------
 2 files changed, 84 insertions(+), 10 deletions(-)
---
diff --git a/ibus.spec b/ibus.spec
index 26e1b7a..b21fde1 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -6,11 +6,15 @@
 %bcond_without	static_libs	# don't build static library
 #
 %define		ibus_gjs_version	3.4.1.20120815
+
+%define		gs_version	%(rpm -q --qf '%{VERSION}' gnome-shell)
+%define		gjs_version	%(rpm -q --qf '%{VERSION}' gjs-devel)
+
 Summary:	Intelligent Input Bus for Linux OS
 Summary(pl.UTF-8):	IBus - inteligentna szyna wejściowa dla Linuksa
 Name:		ibus
 Version:	1.4.99.20121006
-Release:	0.1
+Release:	1
 License:	LGPL v2+
 Group:		Libraries
 #Source0Download: http://code.google.com/p/ibus/downloads/list
@@ -25,6 +29,7 @@ Patch2:		%{name}-541492-xkb.patch
 Patch3:		%{name}-530711-preload-sys.patch
 Patch4:		%{name}-xx-setup-frequent-lang.patch
 Patch5:		%{name}-xx-no-use.diff
+Patch6:		%{name}-gjs-fixes.patch
 URL:		http://code.google.com/p/ibus/
 BuildRequires:	GConf2-devel >= 2.12
 BuildRequires:	autoconf >= 2.62
@@ -203,9 +208,6 @@ API języka Vala do biblioteki ibus.
 
 %prep
 %setup -q
-%if %{with gjsfile}
-zcat %{SOURCE100} | tar xf -
-%endif
 %patch0 -p1
 %patch1 -p1
 %{__rm} bindings/vala/ibus-1.0.vapi
@@ -214,14 +216,15 @@ zcat %{SOURCE100} | tar xf -
 %patch4 -p1
 %patch5 -p1
 
-%build
 %if %{with gjsfile}
+zcat %{SOURCE100} | tar xf -
 d=$(basename %{SOURCE100} .tar.gz)
 cd $d
-%configure
-%{__make}
-cd ..
+%{__rm} js/ui/status/ibus/xkbLayout.js
+%patch6 -p1
 %endif
+
+%build
 %{__libtoolize}
 %{__aclocal} -I m4
 %{__autoconf}
@@ -230,13 +233,11 @@ cd ..
 %configure \
 	--disable-gtk-doc \
 	--disable-silent-rules \
-	--enable-bridge-hotkey \
 	--enable-gconf \
 	--enable-dconf \
 	--enable-gtk2 \
 	--enable-gtk3 \
 	--enable-introspection \
-	--enable-python \
 	--enable-python-library \
 	%{?with_static_libs:--enable-static} \
 	--enable-surrounding-text \
@@ -251,6 +252,18 @@ cd ..
 
 %{__make}
 
+%if %{with gjsfile}
+d=$(basename %{SOURCE100} .tar.gz)
+cd $d
+export PKG_CONFIG_PATH=..:%{_pkgconfigdir}
+%configure \
+	--with-gnome-shell-version="%{gs_version},3.6,3.4,3.2" \
+	--with-gjs-version="%{gjs_version},1.33.3,1.32,1.31.22,1.31.20,1.31.10,1.31.6,1.31.11,1.30"
+
+%{__make}
+cd ..
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{X11/xinit/xinput.d,xdg/autostart}
@@ -289,9 +302,11 @@ rm -rf $RPM_BUILD_ROOT
 %post
 %update_icon_cache hicolor
 %gconf_schema_install ibus.schemas
+%glib_compile_schemas
 
 %preun
 %gconf_schema_uninstall ibus.schemas
+%glib_compile_schemas
 
 %postun
 %update_icon_cache hicolor
diff --git a/ibus-gjs-fixes.patch b/ibus-gjs-fixes.patch
new file mode 100644
index 0000000..0781543
--- /dev/null
+++ b/ibus-gjs-fixes.patch
@@ -0,0 +1,59 @@
+diff -ur ibus-gjs-3.4.1.20120815.orig/js/ui/status/ibus/ibusPanel.js ibus-gjs-3.4.1.20120815/js/ui/status/ibus/ibusPanel.js
+--- ibus-gjs-3.4.1.20120815.orig/js/ui/status/ibus/ibusPanel.js	2012-08-15 11:06:54.000000000 +0200
++++ ibus-gjs-3.4.1.20120815/js/ui/status/ibus/ibusPanel.js	2012-11-05 23:50:06.086089865 +0100
+@@ -954,8 +954,11 @@
+     },
+ 
+     _configLoadLookupTableOrientation: function() {
+-        let value = this._config.get_value('panel', 'lookup_table_orientation',
+-                                           GLib.Variant.new_int32(0)).get_int32();
++        let _value = this._config.get_value('panel', 'lookup_table_orientation',
++                                           GLib.Variant.new_int32(0));
++        let value = 0;
++        if (_value != null)
++                value = _value.get_int32();
+         let orientation = Common.ORIENTATION_VERTICAL;
+         if (value in [Common.ORIENTATION_HORIZONTAL,
+                       Common.ORIENTATION_VERTICAL])
+diff -ur ibus-gjs-3.4.1.20120815.orig/js/ui/status/ibus/panelMenu.js ibus-gjs-3.4.1.20120815/js/ui/status/ibus/panelMenu.js
+--- ibus-gjs-3.4.1.20120815.orig/js/ui/status/ibus/panelMenu.js	2012-08-15 11:06:54.000000000 +0200
++++ ibus-gjs-3.4.1.20120815/js/ui/status/ibus/panelMenu.js	2012-11-05 23:50:06.086089865 +0100
+@@ -66,7 +66,6 @@
+         this._clearActor();
+         this._iconName = iconName;
+         this._iconActor = new St.Icon({ icon_name: iconName,
+-                                        icon_type: St.IconType.SYMBOLIC,
+                                         style_class: 'system-status-icon' });
+         this.actor.add_child(this._iconActor);
+         this.actor.queue_redraw();
+diff -ur ibus-gjs-3.4.1.20120815.orig/js/ui/status/ibus/switcher.js ibus-gjs-3.4.1.20120815/js/ui/status/ibus/switcher.js
+--- ibus-gjs-3.4.1.20120815.orig/js/ui/status/ibus/switcher.js	2012-08-15 11:06:54.000000000 +0200
++++ ibus-gjs-3.4.1.20120815/js/ui/status/ibus/switcher.js	2012-11-05 23:50:06.086089865 +0100
+@@ -713,8 +713,7 @@
+                 icon.clutter_text.set_font_description(desc);
+             }));
+         } else {
+-            icon = new St.Icon({ icon_name: engine.icon,
+-                                 icon_type: St.IconType.SYMBOLIC });
++            icon = new St.Icon({ icon_name: engine.icon });
+         }
+         if (icon != null) {
+             this._iconBin.child = icon
+diff -ur ibus-gjs-3.4.1.20120815.orig/js/ui/status/ibus/xkbLayout.js.in ibus-gjs-3.4.1.20120815/js/ui/status/ibus/xkbLayout.js.in
+--- ibus-gjs-3.4.1.20120815.orig/js/ui/status/ibus/xkbLayout.js.in	2012-08-15 11:07:22.000000000 +0200
++++ ibus-gjs-3.4.1.20120815/js/ui/status/ibus/xkbLayout.js.in	2012-11-05 23:50:06.086089865 +0100
+@@ -68,10 +68,12 @@
+                     value.get_child_value(i).dup_string()[0]);
+             }
+             if (this._useXmodmap) {
+-                this._useXmodmap = this._config.get_value(
++                let _value = this._config.get_value(
+                     'general',
+                     'use_xmodmap',
+-                    GLib.Variant.new_boolean(true)).get_boolean();
++                    GLib.Variant.new_boolean(true));
++                if (_value != null)
++                    this._useXmodmap = _value.get_boolean();
+             }
+         }
+     },
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ibus.git/commitdiff/cd6f418fac93f3cd079cd9b49314bc6af83fda90



More information about the pld-cvs-commit mailing list