Fix python library to load libibus.so.Y
authorfujiwarat <takao.fujiwara1@gmail.com>
Mon, 5 Mar 2012 04:25:53 +0000 (13:25 +0900)
committerfujiwarat <takao.fujiwara1@gmail.com>
Mon, 5 Mar 2012 04:25:53 +0000 (13:25 +0900)
TEST=Linux desktop

Review URL: https://codereview.appspot.com/5731060

ibus/_config.py.in
ibus/common.py
ui/gtk3/Makefile.am

index 098d805af4938b0716fb304b525384d5520537c8..c9d11bba2a972bc6e8a16e27930c4d311b04e3ed 100644 (file)
@@ -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-@IBUS_API_VERSION@.so.@LT_CURRENT_MINUS_AGE@'
 ISOCODES_PREFIX='@ISOCODES_PREFIX@'
index 6483aaed6504eb47f342301dc0bb9fad5a962445..fb39d5641df1cf8827a8bd6ddad616d69e702765 100644 (file)
@@ -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
 
index 5b75e73a0c4a8bca343d55e070e5802cf34442e0..0fb9d3c6d6e823fbb0dd2de3131da7efed5b284f 100644 (file)
@@ -82,7 +82,7 @@ AM_VALAFLAGS = \
 
 libexec_PROGRAMS = ibus-ui-gtk3
 
-ibus_ui_gtk3_valas = \
+ibus_ui_gtk3_SOURCES = \
        application.vala \
        candidatearea.vala \
        candidatepanel.vala \
@@ -94,11 +94,6 @@ ibus_ui_gtk3_valas = \
        property.vala \
        separator.vala \
        switcher.vala \
-       $(NULL)
-ibus_ui_gtk3_vala_cfiles = $(ibus_ui_gtk3_valas:.vala=.c)
-
-ibus_ui_gtk3_SOURCES = \
-       $(ibus_ui_gtk3_valas) \
        grabkeycode.c \
        $(NULL)
 
@@ -108,7 +103,6 @@ ibus_ui_gtk3_LDADD = \
 
 CLEANFILES = \
        gtkpanel.xml \
-       $(ibus_ui_gtk3_vala_cfiles) \
        $(NULL)
 
 EXTRA_DIST = \