[ibus] Added ibus-HEAD.patch to fix python library to load libibus.so.

Takao Fujiwara fujiwara at fedoraproject.org
Mon Mar 5 02:42:32 UTC 2012


commit 5deefb26ef7a934058f7b3ee313ce494df37cae2
Author: Takao Fujiwara <tfujiwar at redhat.com>
Date:   Mon Mar 5 11:34:49 2012 +0900

    Added ibus-HEAD.patch to fix python library to load libibus.so.

 ibus-HEAD.patch |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 ibus.spec       |    9 ++++++---
 2 files changed, 57 insertions(+), 3 deletions(-)
---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index 8b13789..587bfed 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -1 +1,52 @@
+From 35f6353b89726878fa99de2588fb6be5aef8686c Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1 at gmail.com>
+Date: Mon, 5 Mar 2012 11:16:23 +0900
+Subject: [PATCH] Fix python library to load libibus.so.Y
+
+---
+ ibus/_config.py.in |    2 ++
+ ibus/common.py     |    3 ++-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/ibus/_config.py.in b/ibus/_config.py.in
+index 098d805..c9d11bb 100644
+--- a/ibus/_config.py.in
++++ b/ibus/_config.py.in
+@@ -25,6 +25,7 @@ __all__ = (
+     "get_copyright",
+     "get_license",
+     "get_ICON_KEYBOARD",
++    "LIBIBUS_SONAME",
+     "ISOCODES_PREFIX",
+     "_"
+ )
+@@ -55,4 +56,5 @@ def get_ICON_KEYBOARD():
+         return fallback_icon
+     return icon
+ 
++LIBIBUS_SONAME='libibus- at IBUS_API_VERSION@.so. at LT_CURRENT_MINUS_AGE@'
+ ISOCODES_PREFIX='@ISOCODES_PREFIX@'
+diff --git a/ibus/common.py b/ibus/common.py
+index 6483aae..fb39d56 100644
+--- a/ibus/common.py
++++ b/ibus/common.py
+@@ -59,6 +59,7 @@ import os
+ import sys
+ from xdg import BaseDirectory
+ import ctypes
++import _config
+ 
+ # __display = os.environ["DISPLAY"]
+ # __hostname, __display_screen = __display.split(":", 1)
+@@ -104,7 +105,7 @@ import ctypes
+ #         return None
+ #     return address
+ 
+-libibus = ctypes.CDLL("libibus-1.0.so.0")
++libibus = ctypes.CDLL(_config.LIBIBUS_SONAME)
+ get_address = libibus.ibus_get_address
+ get_address.restype=ctypes.c_char_p
+ 
+-- 
+1.7.9.1
 
diff --git a/ibus.spec b/ibus.spec
index 2a51d13..5f8c04b 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -25,7 +25,7 @@
 
 Name:       ibus
 Version:    1.4.99.20120304
-Release:    1%{?dist}
+Release:    2%{?dist}
 Summary:    Intelligent Input Bus for Linux OS
 License:    LGPLv2+
 Group:      System Environment/Libraries
@@ -36,7 +36,7 @@ Source1:    xinput-ibus
 %if %have_gjsfile
 Source2:    http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-%{ibus_gjs_version}.tar.gz
 %endif
-# Patch0:     ibus-HEAD.patch
+Patch0:     ibus-HEAD.patch
 Patch1:     ibus-541492-xkb.patch
 Patch2:     ibus-xx-setup-frequent-lang.patch
 # Patch3:     ibus-530711-preload-sys.patch
@@ -207,7 +207,7 @@ cd $d
 cd ..
 %endif
 %endif
-# %patch0 -p1
+%patch0 -p1
 %patch92 -p1 -b .g-s-preedit
 cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c ||
 %if %have_libxkbfile
@@ -461,6 +461,9 @@ fi
 %{_datadir}/gtk-doc/html/*
 
 %changelog
+* Mon Mar 05 2012 Takao Fujiwara <tfujiwar at redhat.com> - 1.4.99.20120303-2
+- Added ibus-HEAD.patch to fix python library to load libibus.so.
+
 * Sun Mar 04 2012 Takao Fujiwara <tfujiwar at redhat.com> - 1.4.99.20120303-1
 - Bumped to 1.4.99.20120303
 


More information about the scm-commits mailing list