Accepting request 116621 from home:MargueriteSu:branches:M17N
OBS-URL: https://build.opensuse.org/request/show/116621 OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=25
This commit is contained in:
parent
a21ff7bfc6
commit
68e4925e05
58
fcitx-4.2.3-openSUSE-11.4-lua51.patch
Normal file
58
fcitx-4.2.3-openSUSE-11.4-lua51.patch
Normal 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);
|
||||||
|
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
Sun May 6 22:57:27 UTC 2012 - i@marguerite.su
|
||||||
|
|
||||||
|
12
fcitx.spec
12
fcitx.spec
@ -30,7 +30,10 @@ Source2: fcitx-README.suse
|
|||||||
Source3: xim.fcitx.suse.template
|
Source3: xim.fcitx.suse.template
|
||||||
Source5: pinyin.tar.gz
|
Source5: pinyin.tar.gz
|
||||||
Source6: table.tar.gz
|
Source6: table.tar.gz
|
||||||
|
#FIX-FOR-UPSTREAM i@marguerite.su - dont download online
|
||||||
Patch1: fix_fcitx_googlecode_resolv_error.patch
|
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: xz
|
||||||
BuildRequires: cairo-devel
|
BuildRequires: cairo-devel
|
||||||
BuildRequires: pango-devel
|
BuildRequires: pango-devel
|
||||||
@ -39,6 +42,11 @@ BuildRequires: dbus-1-glib-devel
|
|||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libqt4-devel
|
BuildRequires: libqt4-devel
|
||||||
|
%if 0%{?suse_version} <= 1210
|
||||||
|
BuildRequires: lua-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: lua51-devel
|
||||||
|
%endif
|
||||||
BuildRequires: opencc-devel
|
BuildRequires: opencc-devel
|
||||||
BuildRequires: intltool
|
BuildRequires: intltool
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
@ -103,6 +111,7 @@ This package contains fcitx im module for qt4
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir build
|
mkdir build
|
||||||
@ -114,7 +123,8 @@ cmake .. -DENABLE_GTK2_IM_MODULE=On \
|
|||||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||||
-DLIB_INSTALL_DIR=%{_libdir} \
|
-DLIB_INSTALL_DIR=%{_libdir} \
|
||||||
-DENABLE_DEBUG=On \
|
-DENABLE_DEBUG=On \
|
||||||
-DENABLE_OPENCC=On
|
-DENABLE_OPENCC=On \
|
||||||
|
-DENABLE_LUA=On
|
||||||
|
|
||||||
#copy external data
|
#copy external data
|
||||||
pushd ../data
|
pushd ../data
|
||||||
|
Loading…
Reference in New Issue
Block a user