SHA256
1
0
forked from pool/fcitx

Accepting request 181661 from home:MargueriteSu:branches:M17N

update version 4.2.8

OBS-URL: https://build.opensuse.org/request/show/181661
OBS-URL: https://build.opensuse.org/package/show/M17N/fcitx?expand=0&rev=70
This commit is contained in:
Marguerite Su 2013-07-01 17:32:04 +00:00 committed by Git OBS Bridge
parent b957395df6
commit 540b6b7acc
15 changed files with 143 additions and 251 deletions

View File

@ -1,11 +1,11 @@
libfcitx-4_2_7 libfcitx-4_2_8
requires "fcitx = <version>" requires "fcitx = <version>"
obsoletes "libfcitx-<targettype> < <version>" obsoletes "libfcitx-<targettype> < <version>"
provides "libfcitx-<targettype> = <version>" provides "libfcitx-<targettype> = <version>"
post "/sbin/ldconfig" post "/sbin/ldconfig"
postun "/sbin/ldconfig" postun "/sbin/ldconfig"
fcitx-gtk2 fcitx-gtk2
requires "libfcitx-4_2_7-<targettype> = <version>" requires "libfcitx-4_2_8-<targettype> = <version>"
post "%if "%_lib" == "lib64"" post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk-2.0/gtk64.immodules" post "<prefix>%{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk-2.0/gtk64.immodules"
post "%else" post "%else"
@ -17,7 +17,7 @@ fcitx-gtk2
postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules" postun "<prefix>%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules"
postun "%endif" postun "%endif"
fcitx-gtk3 fcitx-gtk3
requires "libfcitx-4_2_7-<targettype> = <version>" requires "libfcitx-4_2_8-<targettype> = <version>"
post "%if "%_lib" == "lib64"" post "%if "%_lib" == "lib64""
post "<prefix>%{_bindir}/gtk-query-immodules-3.0-64 --update-cache" post "<prefix>%{_bindir}/gtk-query-immodules-3.0-64 --update-cache"
post "%else" post "%else"
@ -29,4 +29,4 @@ fcitx-gtk3
postun "<prefix>%{_bindir}/gtk-query-immodules-3.0 --update-cache" postun "<prefix>%{_bindir}/gtk-query-immodules-3.0 --update-cache"
postun "%endif" postun "%endif"
fcitx-qt4 fcitx-qt4
requires "libfcitx-4_2_7-<targettype> = <version>" requires "libfcitx-4_2_8-<targettype> = <version>"

View File

@ -1,71 +0,0 @@
diff --git a/src/module/xkb/xkb.c b/src/module/xkb/xkb.c
index d5d928d..36025bb 100644
--- a/src/module/xkb/xkb.c
+++ b/src/module/xkb/xkb.c
@@ -176,37 +176,50 @@ static char* FcitxXkbFindXkbRulesFile(FcitxXkb* xkb)
} else {
int count = 0, i = 0;
const char* base = XLIBDIR;
+ char *parent_to_free = NULL;
while (base[i]) {
if (base[i] == '/')
count++;
i++;
}
+ /**
+ * guess X11 data base directory.
+ **/
if (count >= 3) {
// .../usr/lib/X11 -> /usr/share/X11/xkb vs
// .../usr/X11/lib -> /usr/X11/share/X11/xkb
const char* delta = StringEndsWith(base, "X11") ?
"/../../share/X11" : "/../share/X11";
- char *tmppath;
- fcitx_utils_alloc_cat_str(tmppath, base, delta,
- "/xkb/rules/", rulesName, ".xml");
- if(fcitx_utils_isreg(tmppath)) {
- rulesFile = realpath(tmppath, NULL);
- free(tmppath);
- } else {
- fcitx_utils_alloc_cat_str(tmppath, base, "/X11/xkb/rules/",
- rulesName, ".xml");
- if(fcitx_utils_isreg(tmppath)) {
- rulesFile = realpath(tmppath, NULL);
- free(tmppath);
+ fcitx_utils_alloc_cat_str(parent_to_free, base, delta);
+ if(!fcitx_utils_isdir(parent_to_free)) {
+ // fallback to ${base}/X11
+ fcitx_utils_set_cat_str(parent_to_free, base, "/X11");
+ if(!fcitx_utils_isdir(parent_to_free)) {
+ free(parent_to_free);
+ parent_to_free = NULL;
}
}
}
- if(!rulesFile) {
- fcitx_utils_alloc_cat_str(rulesFile,
- "/usr/share/X11/xkb/rules/",
- rulesName, ".xml");
+ const char *parent_path;
+ if (parent_to_free) {
+ /**
+ * Found a existing dir, simplify it.
+ * Using realpath() on rules files' name can change the base
+ * name of the file (due to symlink), so it is only safe
+ * to do it for directory's name. T-T..
+ **/
+ char *tmp = realpath(parent_to_free, NULL);
+ parent_path = tmp;
+ free(parent_to_free);
+ parent_to_free = tmp;
+ } else {
+ // last fallback for known rules name.
+ parent_path = "/usr/share/X11";
}
+ fcitx_utils_alloc_cat_str(rulesFile, parent_path,
+ "/xkb/rules/", rulesName, ".xml");
+ fcitx_utils_free(parent_to_free);
}
free(rulesName);
} else {

View File

@ -1,60 +0,0 @@
diff --git a/src/frontend/gtk2/client.c b/src/frontend/gtk2/client.c
index 8329071..52c5c9a 100644
--- a/src/frontend/gtk2/client.c
+++ b/src/frontend/gtk2/client.c
@@ -31,7 +31,6 @@
#include "client.h"
#include "marshall.h"
-#define LOG_LEVEL DEBUG
#define IC_NAME_MAX 64
#define PREEDIT_TYPE_STRING_INT \
@@ -129,7 +128,7 @@ FcitxIMClient* FcitxIMClientOpen(FcitxIMClientConnectCallback connectcb, FcitxIM
static void _changed_cb(DBusGProxy* proxy, char* service, char* old_owner, char* new_owner, gpointer user_data)
{
- FcitxLog(LOG_LEVEL, "_changed_cb");
+ FcitxLog(DEBUG, "_changed_cb");
FcitxIMClient* client = (FcitxIMClient*) user_data;
if (g_str_equal(service, client->servicename)) {
gboolean new_owner_good = new_owner && (new_owner[0] != '\0');
@@ -151,7 +150,7 @@ static void _changed_cb(DBusGProxy* proxy, char* service, char* old_owner, char*
static void _destroy_cb(DBusGProxy *proxy, gpointer user_data)
{
- FcitxLog(LOG_LEVEL, "_destroy_cb");
+ FcitxLog(DEBUG, "_destroy_cb");
FcitxIMClient* client = (FcitxIMClient*) user_data;
if (client->proxy == proxy) {
g_object_unref(client->proxy);
diff --git a/src/frontend/ipc/ipc.c b/src/frontend/ipc/ipc.c
index a29b1de..e126c4f 100644
--- a/src/frontend/ipc/ipc.c
+++ b/src/frontend/ipc/ipc.c
@@ -33,6 +33,10 @@
#define GetIPCIC(ic) ((FcitxIPCIC*) (ic)->privateic)
+#ifndef DBUS_ERROR_UNKNOWN_PROPERTY
+#define DBUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error.UnknownProperty"
+#endif
+
typedef struct _FcitxIPCCreateICPriv {
DBusMessage* message;
DBusConnection* conn;
diff --git a/src/lib/fcitx-qt/fcitxqtconnection.cpp b/src/lib/fcitx-qt/fcitxqtconnection.cpp
index 24fc6b6..08a17ea 100644
--- a/src/lib/fcitx-qt/fcitxqtconnection.cpp
+++ b/src/lib/fcitx-qt/fcitxqtconnection.cpp
@@ -28,8 +28,9 @@
#include "fcitx-utils/utils.h"
#include <QX11Info>
#include <QFile>
-#include <qtimer.h>
+#include <QTimer>
#include <QDir>
+#include <QCoreApplication>
#include <X11/Xlib.h>
FcitxQtConnection::FcitxQtConnection(QObject* parent): QObject(parent)

View File

@ -1,31 +0,0 @@
diff --git a/src/lib/fcitx/module.h b/src/lib/fcitx/module.h
index 28de64f..bae6601 100644
--- a/src/lib/fcitx/module.h
+++ b/src/lib/fcitx/module.h
@@ -109,7 +109,7 @@ extern "C" {
void* FcitxModuleInvokeFunction(FcitxAddon* addon, int functionId, FcitxModuleFunctionArg args);
#define FcitxModuleInvokeVaArgs(addon, functionId, ARGV...) \
(FcitxModuleInvokeFunction(addon, functionId, \
- (FcitxModuleFunctionArg){ .args = {ARGV} }))
+ (FcitxModuleFunctionArg){ {ARGV} }))
/**
* invoke inter module function with addon name, returns NULL when fails (the function itself can also return NULL)
@@ -133,7 +133,7 @@ extern "C" {
#define InvokeVaArgs(INST, MODULE, FUNC, ARGV...) \
((MODULE##_##FUNC##_RETURNTYPE)FcitxModuleInvokeFunctionByName( \
INST, MODULE##_NAME, MODULE##_##FUNC, \
- (FcitxModuleFunctionArg){ .args = {ARGV} }))
+ (FcitxModuleFunctionArg){ {ARGV} }))
/** add a function to a addon */
#define AddFunction(ADDON, Realname) \
@@ -215,7 +215,7 @@ extern "C" {
}
#define FCITX_DEF_MODULE_ARGS(var, ARGV...) \
- FcitxModuleFunctionArg var = { .args = {ARGV} }
+ FcitxModuleFunctionArg var = { {ARGV} }
/* void *__##var##_array[] = {ARGV}; \ */
/* size_t __##var##_length = sizeof(__##var##_array) / sizeof(void*); \ */
/* FcitxModuleFunctionArg var[] = { { .n = __##var##_length, \ */

View File

@ -1,41 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 370aa7a..26c86c2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,8 +17,9 @@ option(ENABLE_DEBUG "Enable Debug" OFF)
option(ENABLE_TABLE "Enable Table IM" ON)
option(ENABLE_GTK2_IM_MODULE "Enable GTK2 IM Module" ON)
option(ENABLE_GTK3_IM_MODULE "Enable GTK3 IM Module" OFF)
-option(ENABLE_QT "Enable Qt-based lib and configuration GUI" On)
+option(ENABLE_QT "Enable Qt-based lib" On)
option(ENABLE_QT_IM_MODULE "Enable Qt IM Module" ON)
+option(ENABLE_QT_GUI "Enable Qt-based configuration GUI" On)
option(ENABLE_OPENCC "Enable OpenCC for Chinese Transform" ON)
option(FORCE_OPENCC
"Enable opencc even if the library is not found at compile time" Off)
diff --git a/tools/gui/quickphrase-editor/CMakeLists.txt b/tools/gui/quickphrase-editor/CMakeLists.txt
index 9ef7e86..3fff180 100644
--- a/tools/gui/quickphrase-editor/CMakeLists.txt
+++ b/tools/gui/quickphrase-editor/CMakeLists.txt
@@ -16,7 +16,7 @@ fcitx_translate_add_sources(
${QUICKPHRASE_EDITOR_HDRS}
${QUICKPHRASE_EDITOR_SRCS})
-if(NOT ENABLE_QT)
+if(NOT (ENABLE_QT AND ENABLE_QT_GUI))
return()
endif()
diff --git a/tools/gui/wrapper/CMakeLists.txt b/tools/gui/wrapper/CMakeLists.txt
index ab1fbaa..b5bad62 100644
--- a/tools/gui/wrapper/CMakeLists.txt
+++ b/tools/gui/wrapper/CMakeLists.txt
@@ -11,7 +11,7 @@ fcitx_translate_add_sources(
${QT_WRAPPER_SRCS}
${QT_WRAPPER_HDRS})
-if(NOT ENABLE_QT)
+if(NOT (ENABLE_QT AND ENABLE_QT_GUI))
return()
endif()

View File

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

View File

@ -0,0 +1,47 @@
Index: fcitx-4.2.8/cmake/FcitxMacro.cmake
===================================================================
--- fcitx-4.2.8.orig/cmake/FcitxMacro.cmake
+++ fcitx-4.2.8/cmake/FcitxMacro.cmake
@@ -184,10 +184,10 @@ function(__fcitx_cmake_init)
CACHE INTERNAL "include dir" FORCE)
else()
set(FCITX_SCANNER_EXECUTABLE
- "${FCITX_MACRO_CMAKE_DIR}/fcitx-scanner"
+ "${FCITX4_ADDON_INSTALL_DIR}/libexec/fcitx-scanner"
CACHE INTERNAL "fcitx-scanner" FORCE)
set(FCITX_PO_PARSER_EXECUTABLE
- "${FCITX_MACRO_CMAKE_DIR}/fcitx-po-parser"
+ "${FCITX4_ADDON_INSTALL_DIR}/libexec/fcitx-po-parser"
CACHE INTERNAL "fcitx-po-parser" FORCE)
execute_process(COMMAND env ${FCITX_PO_PARSER_EXECUTABLE}
--gettext-support RESULT_VARIABLE result)
Index: fcitx-4.2.8/src/module/spell/dict/CMakeLists.txt
===================================================================
--- fcitx-4.2.8.orig/src/module/spell/dict/CMakeLists.txt
+++ fcitx-4.2.8/src/module/spell/dict/CMakeLists.txt
@@ -5,7 +5,7 @@ set(DICT_COMP_SRC
add_executable(comp-spell-dict ${DICT_COMP_SRC})
target_link_libraries(comp-spell-dict fcitx-utils)
install(TARGETS comp-spell-dict
- DESTINATION "${prefix}/share/cmake/fcitx/")
+ DESTINATION "${addondir}/libexec")
set(SPELL_EN_DICT_VER 20121020)
set(SPELL_EN_DICT "${CMAKE_CURRENT_BINARY_DIR}/en_dict.fscd")
@@ -27,4 +27,4 @@ add_custom_command(
COMMAND "${COMP_SPELL_DICT}" --comp-dict
"${SPELL_EN_DICT_SRC}" "${SPELL_EN_DICT}")
add_custom_target(spell_en_dict ALL DEPENDS "${SPELL_EN_DICT}")
-install(FILES "${SPELL_EN_DICT}" DESTINATION "${pkgdatadir}/spell")
\ No newline at end of file
+install(FILES "${SPELL_EN_DICT}" DESTINATION "${pkgdatadir}/spell")
Index: fcitx-4.2.8/tools/dev/CMakeLists.txt
===================================================================
--- fcitx-4.2.8.orig/tools/dev/CMakeLists.txt
+++ fcitx-4.2.8/tools/dev/CMakeLists.txt
@@ -20,4 +20,4 @@ if(NOT _FCITX_DISABLE_GETTEXT)
endif()
install(TARGETS fcitx-scanner fcitx-po-parser
- DESTINATION "${prefix}/share/cmake/fcitx/")
+ DESTINATION "${addondir}/libexec")

View File

@ -0,0 +1,15 @@
Index: fcitx-4.2.8/src/module/freedesktop-notify/freedesktop-notify.c
===================================================================
--- fcitx-4.2.8.orig/src/module/freedesktop-notify/freedesktop-notify.c
+++ fcitx-4.2.8/src/module/freedesktop-notify/freedesktop-notify.c
@@ -50,6 +50,10 @@
NOTIFICATIONS_MATCH_SIGNAL "," \
"member='NotificationClosed'"
+#ifndef DBUS_TIMEOUT_USE_DEFAULT
+# define DBUS_TIMEOUT_USE_DEFAULT (-1)
+#endif
+
static void *FcitxNotifyCreate(FcitxInstance *instance);
static void FcitxNotifyDestroy(void *arg);

3
fcitx-4.2.8_dict.tar.xz Normal file
View File

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

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Sun Jun 30 23:12:53 UTC 2013 - i@marguerite.su
- update version 4.2.8
* New Default Theme
* Add modifier only key support to trigger keys
* New DBus based Tray Icon support
* Desktop Notification Support
* First time start will only choose language in current locale
* Use first keyboard input method as default keyboard layout for most case
* fcitx-qt supports a key grab widget forked from KDE, and Qt <-> Fcitx Key
translation.
* Multi file quickphrase Support.
* Ship with some default quick phrase
* quickphrase editor support
- drop all old patches: upstream absorbed.
- add new patch: fcitx-4.2.8-freedesktop-notify.c-DBUS_TIMEOUT_USE_DEFAULT.patch
* DBUS_TIMEOUT_USE_DEFAULT is undefined in src/module/freedesktop-notify/freedesktop-notify.c
- add new patch: fcitx-4.2.8-arch-dependent-file-in-usr-share.patch
* don't install fcitx-po-parser,fcitx-scanner,comp-spell-dict into
/usr/share/cmake/fcitx
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 26 23:57:32 UTC 2013 - i@marguerite.su Fri Apr 26 23:57:32 UTC 2013 - i@marguerite.su

View File

@ -15,33 +15,28 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
%define libver -4_2_7
%define libver -4_2_8
Name: fcitx Name: fcitx
Version: 4.2.7 Version: 4.2.8
Release: 0 Release: 0
Summary: Flexible Context-aware Input Tool with eXtension Summary: Flexible Context-aware Input Tool with eXtension
License: GPL-2.0+ License: GPL-2.0+
Group: System/I18n/Chinese Group: System/I18n/Chinese
Url: http://code.google.com/p/fcitx Url: http://code.google.com/p/fcitx
#Source: http://fcitx.googlecode.com/files/%{name}-%{version}.tar.xz Source: http://download.fcitx-im.org/fcitx/%{name}-%{version}_dict.tar.xz
# use bzip to be compatible with sles.
Source: %{name}-%{version}.tar.bz2
Source1: xim.d-fcitx Source1: xim.d-fcitx
Source2: fcitx-README.suse Source2: fcitx-README.suse
Source3: xim.fcitx.suse.template Source3: xim.fcitx.suse.template
# for fedora auto-start # for fedora auto-start
Source7: xinput-fcitx Source7: xinput-fcitx
Source8: openSUSE-default.tar.gz Source8: openSUSE-default.tar.gz
# fix-for-openSUSE wengxt@gmail.com - fix opensuse builds <= 1220 Source9: macros.%{name}
Patch1: fcitx-4.2.7-compat-12.2.patch # PATCH-FIX-UPSTREAM marguerite@opensuse.org - fix missing DBUS_TIMEOUT_USE_DEFAULT in freedesktop-notify.c
# fix-for-openSUSE wengxt@gmail.com - fix qt 4.7 builds Patch: fcitx-4.2.8-freedesktop-notify.c-DBUS_TIMEOUT_USE_DEFAULT.patch
Patch2: fcitx-4.2.7-compat-qt474.patch # PATCH-FIX-UPSTREAM marguerite@opensuse.org - don't install binary into /usr/share/cmake/fcitx
# fix-for-openSUSE wengxt@gmail.com - fix gcc 4.6 builds Patch1: fcitx-4.2.8-arch-dependent-file-in-usr-share.patch
Patch3: fcitx-4.2.7-compat-gcc46.patch
# fix-for-openSUSE wengxt@gmail.com - xkeyboard-config in SUSE use symlink for xkb rule files,
# which caused fcitx unexpected behavior in keyboard layout handling.
Patch4: bnc801318-fcitx-4.2.7-xkb-rule-symlink-detection.patch
BuildRequires: cairo-devel BuildRequires: cairo-devel
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: dbus-1-devel BuildRequires: dbus-1-devel
@ -79,6 +74,7 @@ BuildRequires: gtk3-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libicu-devel BuildRequires: libicu-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
BuildRequires: xz
Requires: %{name}-gtk2 = %{version}-%{release} Requires: %{name}-gtk2 = %{version}-%{release}
Requires: lib%{name}%{libver} = %{version}-%{release} Requires: lib%{name}%{libver} = %{version}-%{release}
%if 0%{?suse_version} >= 1140 || 0%{?fedora_version} %if 0%{?suse_version} >= 1140 || 0%{?fedora_version}
@ -101,9 +97,9 @@ Requires: %{name}-branding = %{version}
%if 0%{?fedora_version} %if 0%{?fedora_version}
Requires: %{name}-pinyin = %{version}-%{release} Requires: %{name}-pinyin = %{version}-%{release}
Requires: %{name}-table = %{version}-%{release} Requires: %{name}-table = %{version}-%{release}
Requires: opencc
Requires: libpresage1
Requires: enchant Requires: enchant
Requires: libpresage1
Requires: opencc
Requires(post): %{_sbindir}/alternatives Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives Requires(postun): %{_sbindir}/alternatives
%endif %endif
@ -371,14 +367,8 @@ You can either use this package for download from kde-look.org using knewstaff i
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%if 0%{?suse_version} <= 1220 %patch -p1
%patch1 -p1 %patch1 -p1
%endif
%if 0%{?suse_version} <= 1210
%patch2 -p1
%patch3 -p1
%endif
%patch4 -p1
%build %build
mkdir build mkdir build
@ -398,6 +388,7 @@ cmake .. \
%endif %endif
%if 0%{?sles_version} %if 0%{?sles_version}
-DENABLE_QT=Off \ -DENABLE_QT=Off \
-DENABLE_QT_IM_MODULE=off \
%endif %endif
-DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DLIB_INSTALL_DIR=%{_libdir} \ -DLIB_INSTALL_DIR=%{_libdir} \
@ -486,6 +477,9 @@ mkdir -pv %{buildroot}%{_sysconfdir}/X11/xinit/xinput.d/
install -pm 644 -D %{SOURCE7} %{buildroot}%{_sysconfdir}/X11/xinit/xinput.d/fcitx.conf install -pm 644 -D %{SOURCE7} %{buildroot}%{_sysconfdir}/X11/xinit/xinput.d/fcitx.conf
%endif %endif
# install rpm macros
install -D -m644 %{SOURCE9} %{buildroot}%{_sysconfdir}/rpm/macros.%{name}
# remove *.la # remove *.la
%{__rm} -rf %{buildroot}%{_libdir}/lib%{name}-config.la %{__rm} -rf %{buildroot}%{_libdir}/lib%{name}-config.la
@ -583,9 +577,6 @@ update-desktop-database %{_datadir}/applications &>/dev/null ||
%{_bindir}/%{name}-skin-installer %{_bindir}/%{name}-skin-installer
%{_bindir}/%{name}-dbus-watcher %{_bindir}/%{name}-dbus-watcher
%{_bindir}/%{name}-diagnose %{_bindir}/%{name}-diagnose
%if 0%{?suse_version} >= 1220
%{_bindir}/%{name}-qt-gui-wrapper
%endif
%{_datadir}/%{name}/ %{_datadir}/%{name}/
%{_datadir}/applications/*.desktop %{_datadir}/applications/*.desktop
%{_datadir}/icons/* %{_datadir}/icons/*
@ -605,9 +596,9 @@ update-desktop-database %{_datadir}/applications &>/dev/null ||
# excludes # excludes
%exclude %{_datadir}/%{name}/pinyin %exclude %{_datadir}/%{name}/pinyin
%exclude %{_datadir}/%{name}/table %exclude %{_datadir}/%{name}/table/*
%exclude %{_datadir}/%{name}/imicon %exclude %{_datadir}/%{name}/imicon/*
%exclude %{_datadir}/%{name}/inputmethod %exclude %{_datadir}/%{name}/inputmethod/*
%exclude %{_datadir}/%{name}/addon/%{name}-pinyin.conf %exclude %{_datadir}/%{name}/addon/%{name}-pinyin.conf
%exclude %{_datadir}/%{name}/addon/%{name}-table.conf %exclude %{_datadir}/%{name}/addon/%{name}-table.conf
%exclude %{_datadir}/%{name}/addon/%{name}-qw.conf %exclude %{_datadir}/%{name}/addon/%{name}-qw.conf
@ -616,6 +607,9 @@ update-desktop-database %{_datadir}/applications &>/dev/null ||
%exclude %{_libdir}/%{name}/fcitx-pinyin.so %exclude %{_libdir}/%{name}/fcitx-pinyin.so
%exclude %{_libdir}/%{name}/fcitx-table.so %exclude %{_libdir}/%{name}/fcitx-table.so
%exclude %{_libdir}/%{name}/fcitx-qw.so %exclude %{_libdir}/%{name}/fcitx-qw.so
%exclude %{_libdir}/%{name}/libexec/comp-spell-dict
%exclude %{_libdir}/%{name}/libexec/fcitx-po-parser
%exclude %{_libdir}/%{name}/libexec/fcitx-scanner
%if 0%{?suse_version} %if 0%{?suse_version}
%exclude %{_datadir}/%{name}/skin/openSUSE-default %exclude %{_datadir}/%{name}/skin/openSUSE-default
%endif %endif
@ -645,15 +639,12 @@ update-desktop-database %{_datadir}/applications &>/dev/null ||
%files quwei %files quwei
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/%{name}/inputmethod
%{_libdir}/%{name}/%{name}-qw.so %{_libdir}/%{name}/%{name}-qw.so
%{_datadir}/%{name}/inputmethod/qw.conf %{_datadir}/%{name}/inputmethod/qw.conf
%{_datadir}/%{name}/addon/%{name}-qw.conf %{_datadir}/%{name}/addon/%{name}-qw.conf
%files pinyin %files pinyin
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/%{name}/imicon
%dir %{_datadir}/%{name}/inputmethod
%{_libdir}/%{name}/%{name}-pinyin.so %{_libdir}/%{name}/%{name}-pinyin.so
%{_datadir}/%{name}/pinyin/ %{_datadir}/%{name}/pinyin/
%{_datadir}/%{name}/inputmethod/pinyin.conf %{_datadir}/%{name}/inputmethod/pinyin.conf
@ -665,14 +656,12 @@ update-desktop-database %{_datadir}/applications &>/dev/null ||
%files table %files table
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/%{name}/table/
%{_libdir}/%{name}/%{name}-table.so %{_libdir}/%{name}/%{name}-table.so
%{_datadir}/%{name}/addon/%{name}-table.conf %{_datadir}/%{name}/addon/%{name}-table.conf
%{_datadir}/%{name}/configdesc/table.desc %{_datadir}/%{name}/configdesc/table.desc
%files table-cn-cangjie %files table-cn-cangjie
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/%{name}/imicon
%{_datadir}/%{name}/table/cangjie.* %{_datadir}/%{name}/table/cangjie.*
%{_datadir}/%{name}/imicon/cangjie.png %{_datadir}/%{name}/imicon/cangjie.png
@ -682,7 +671,6 @@ update-desktop-database %{_datadir}/applications &>/dev/null ||
%files table-cn-erbi %files table-cn-erbi
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/%{name}/imicon
%{_datadir}/%{name}/table/erbi.* %{_datadir}/%{name}/table/erbi.*
%{_datadir}/%{name}/imicon/erbi.png %{_datadir}/%{name}/imicon/erbi.png
@ -696,19 +684,16 @@ update-desktop-database %{_datadir}/applications &>/dev/null ||
%files table-cn-wubi-pinyin %files table-cn-wubi-pinyin
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/%{name}/imicon
%{_datadir}/%{name}/table/wbpy.* %{_datadir}/%{name}/table/wbpy.*
%{_datadir}/%{name}/imicon/wbpy.png %{_datadir}/%{name}/imicon/wbpy.png
%files table-cn-wubi %files table-cn-wubi
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/%{name}/imicon
%{_datadir}/%{name}/table/wbx.* %{_datadir}/%{name}/table/wbx.*
%{_datadir}/%{name}/imicon/wubi.png %{_datadir}/%{name}/imicon/wubi.png
%files table-cn-ziran %files table-cn-ziran
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_datadir}/%{name}/imicon
%{_datadir}/%{name}/table/zrm.* %{_datadir}/%{name}/table/zrm.*
%{_datadir}/%{name}/imicon/ziranma.png %{_datadir}/%{name}/imicon/ziranma.png
@ -750,10 +735,12 @@ update-desktop-database %{_datadir}/applications &>/dev/null ||
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%config %{_sysconfdir}/rpm/macros.%{name}
%{_includedir}/* %{_includedir}/*
%{_bindir}/%{name}4-config %{_bindir}/%{name}4-config
%{_bindir}/%{name}-po-parser %{_libdir}/%{name}/libexec/comp-spell-dict
%{_bindir}/%{name}-scanner %{_libdir}/%{name}/libexec/fcitx-po-parser
%{_libdir}/%{name}/libexec/fcitx-scanner
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%{_datadir}/cmake/ %{_datadir}/cmake/
%if 0%{?suse_version} >= 1140 || 0%{?fedora_version} %if 0%{?suse_version} >= 1140 || 0%{?fedora_version}

20
macros.fcitx Normal file
View File

@ -0,0 +1,20 @@
# RPM macros for fcitx
%_fcitx_includedir %{_includedir}/fcitx
%_fcitx_moduleincdir %{_fcitx_includedir}/module
%_fcitx_libdir %{_libdir}/fcitx
%_fcitx_libexecdir %{_fcitx_libdir}/libexec
%_fcitx_datadir %{_datadir}/fcitx
%_fcitx_addondir %{_fcitx_datadir}/addon
%_fcitx_descdir %{_fcitx_datadir}/configdesc
%_fcitx_imicondir %{_fcitx_datadir}/imicon
%_fcitx_inputmethoddir %{_fcitx_datadir}/inputmethod
%_fcitx_skindir %{_fcitx_datadir}/skin
%_fcitx_autostartdir %{_sysconfdir}/X11/xim.d
%_fcitx_tabledir %{_fcitx_datadir}/table
%fcitx_requires \
Requires: fcitx
%fcitx_table_requires \
Requires: fcitx-table

View File

@ -13,6 +13,7 @@ export LC_CTYPE=$LANG
# So you can use either zh_CN.UTF-8 or zh_CN.GB2312 # So you can use either zh_CN.UTF-8 or zh_CN.GB2312
export XMODIFIERS="@im=fcitx" export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE=fcitx export GTK_IM_MODULE=fcitx
export GTK3_IM_MODULE=fcitx
export QT_IM_SWITCHER=imsw-multi export QT_IM_SWITCHER=imsw-multi
export QT_IM_MODULE=fcitx export QT_IM_MODULE=fcitx
fcitx -d fcitx -d

View File

@ -19,5 +19,7 @@
export XMODIFIERS="@im=fcitx" export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE=fcitx export GTK_IM_MODULE=fcitx
export GTK3_IM_MODULE=fcitx
export QT_IM_SWITCHER=imsw-multi
export QT_IM_MODULE=fcitx export QT_IM_MODULE=fcitx
fcitx -d fcitx -d

View File

@ -5,6 +5,7 @@ XIM_ARGS="-D"
PREFERENCE_PROGRAM=/usr/bin/fcitx-configtool PREFERENCE_PROGRAM=/usr/bin/fcitx-configtool
SHORT_DESC="FCITX" SHORT_DESC="FCITX"
GTK_IM_MODULE=fcitx GTK_IM_MODULE=fcitx
GTK3_IM_MODULE=fcitx
if test -f /usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so || \ if test -f /usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so || \
test -f /usr/lib64/qt4/plugins/inputmethods/qtim-fcitx.so; test -f /usr/lib64/qt4/plugins/inputmethods/qtim-fcitx.so;
then then