Accepting request 116622 from M17N

(forwarded request 116621 from MargueriteSu)

OBS-URL: https://build.opensuse.org/request/show/116622
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fcitx?expand=0&rev=5
This commit is contained in:
Stephan Kulow 2012-05-07 20:45:19 +00:00 committed by Git OBS Bridge
commit a41041f90e
6 changed files with 94 additions and 7 deletions

View File

@ -1,4 +1,4 @@
libfcitx-4_2_2
libfcitx-4_2_3
fcitx-gtk2
fcitx-gtk3
fcitx-qt4

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1d18096232a700ddcf059e737b6acb2b292e5a4ae5d4bc2714e4f599e4e6daa6
size 585936

View File

@ -0,0 +1,58 @@
diff --git a/src/module/lua/luawrap.c b/src/module/lua/luawrap.c
index 67883a7..417a1c9 100644
--- a/src/module/lua/luawrap.c
+++ b/src/module/lua/luawrap.c
@@ -58,13 +58,13 @@ typedef struct _ConverterItem {
UT_hash_handle hh;
} ConverterItem;
-typedef struct _LuaExtension {
+struct _LuaExtension {
char *name;
lua_State *lua;
UT_hash_handle hh;
-} LuaExtension;
+};
-typedef struct _LuaModule {
+struct _LuaModule {
FcitxInstance *fcitx;
LuaExtension *extensions;
CommandItem *commands;
@@ -73,7 +73,7 @@ typedef struct _LuaModule {
ConverterItem *converters;
ConverterItem *current_converter;
size_t shortest_input_trigger_key_length;
-} LuaModule;
+};
typedef void (*LuaResultFn)(LuaModule *luamodule, const char *in, const char *out);
diff --git a/src/module/lua/luawrap.h b/src/module/lua/luawrap.h
index 152d835..592b275 100644
--- a/src/module/lua/luawrap.h
+++ b/src/module/lua/luawrap.h
@@ -21,18 +21,18 @@
#ifndef _LUA_WRAP_H_
#define _LUA_WRAP_H_
-typedef struct lua_State lua_State;
-typedef struct _LuaModule LuaModule;
-typedef struct _LuaExtension LuaExtension;
-typedef struct _FcitxInstance FcitxInstance;
+#include <lua.h>
typedef struct _LuaResultItem {
char *result;
char *help;
} LuaResultItem;
+typedef struct _LuaModule LuaModule;
+typedef struct _LuaExtension LuaExtension;
+
// alloc/free luamodule
-LuaModule * LuaModuleAlloc(FcitxInstance *fcitx);
+LuaModule * LuaModuleAlloc(struct _FcitxInstance *fcitx);
void LuaModuleFree(LuaModule *luamodule);
FcitxInstance *GetFcitx(LuaModule *luamodule);

3
fcitx-4.2.3.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b7d22ada50f7e375096094c2abcf09ad114ffb68521ccf0de37d71e1014183c
size 612028

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Mon May 7 02:55:27 UTC 2012 - i@marguerite.su
- enable lua by default
-------------------------------------------------------------------
Sun May 6 22:57:27 UTC 2012 - i@marguerite.su
- update to 4.2.3
* Lua extension support, same interface with Googlepinyin.
* super can be used in hotkey again
* fixes Trad-Simp native engine in chttrans.
* Update fcitx-pinyin algorithm
* txt2mb and mb2txt support new English format
* Fix a crash when enable share status.
* Add surrounding text support.
* Commit input when unfocus.
* Classic UI improvement, including trayicon, menu.
-------------------------------------------------------------------
Tue Apr 10 14:14:34 UTC 2012 - i@marguerite.su

View File

@ -15,10 +15,10 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define libver -4_2_2
%define libver -4_2_3
Name: fcitx
Version: 4.2.2
Version: 4.2.3
Release: 1
Summary: A Flexible Input Method Framework for CJK
Url: http://code.google.com/p/fcitx
@ -30,7 +30,10 @@ Source2: fcitx-README.suse
Source3: xim.fcitx.suse.template
Source5: pinyin.tar.gz
Source6: table.tar.gz
#FIX-FOR-UPSTREAM i@marguerite.su - dont download online
Patch1: fix_fcitx_googlecode_resolv_error.patch
#FIX-FOR-UPSTREAM i@marguerite.su - fix lua51 builds on 11.4
Patch2: fcitx-4.2.3-openSUSE-11.4-lua51.patch
BuildRequires: xz
BuildRequires: cairo-devel
BuildRequires: pango-devel
@ -39,6 +42,11 @@ BuildRequires: dbus-1-glib-devel
BuildRequires: update-desktop-files
BuildRequires: fdupes
BuildRequires: libqt4-devel
%if 0%{?suse_version} <= 1210
BuildRequires: lua-devel
%else
BuildRequires: lua51-devel
%endif
BuildRequires: opencc-devel
BuildRequires: intltool
BuildRequires: cmake
@ -103,6 +111,7 @@ This package contains fcitx im module for qt4
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%build
mkdir build
@ -114,7 +123,8 @@ cmake .. -DENABLE_GTK2_IM_MODULE=On \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_INSTALL_DIR=%{_libdir} \
-DENABLE_DEBUG=On \
-DENABLE_OPENCC=On
-DENABLE_OPENCC=On \
-DENABLE_LUA=On
#copy external data
pushd ../data