[arch-commits] Commit in fcitx/trunk (3 files)

Felix Yan fyan at archlinux.org
Mon Sep 29 14:49:38 UTC 2014


    Date: Monday, September 29, 2014 @ 16:49:37
  Author: fyan
Revision: 119785

upgpkg: fcitx 4.2.8.5-2

- add upstream patch to allow for specifying an path to install translations (from https://github.com/fcitx/fcitx/commit/7a75b84ea330af7f64bed1db34ce45ef10d0015c)

Added:
  fcitx/trunk/custom-translation-install-dir.patch
Modified:
  fcitx/trunk/PKGBUILD
Deleted:
  fcitx/trunk/add-a-context-variable-to-disable-punc.patch

----------------------------------------------+
 PKGBUILD                                     |   10 ++--
 add-a-context-variable-to-disable-punc.patch |   59 -------------------------
 custom-translation-install-dir.patch         |   33 +++++++++++++
 3 files changed, 40 insertions(+), 62 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-09-29 14:38:50 UTC (rev 119784)
+++ PKGBUILD	2014-09-29 14:49:37 UTC (rev 119785)
@@ -6,7 +6,7 @@
 pkgbase=fcitx
 pkgname=('fcitx' 'fcitx-gtk2' 'fcitx-gtk3' 'fcitx-qt4')
 pkgver=4.2.8.5
-pkgrel=1
+pkgrel=2
 groups=('fcitx-im')
 arch=('i686' 'x86_64')
 url="http://fcitx-im.org"
@@ -13,11 +13,15 @@
 license=('GPL' 'LGPL')
 makedepends=('cmake' 'doxygen' 'gtk2' 'gtk3' 'qt4' 'icu' 'mesa' 'opencc' \
              'iso-codes' 'gobject-introspection' 'libxkbfile' 'enchant')
-source=(http://download.fcitx-im.org/$pkgbase/$pkgbase-${pkgver}_dict.tar.xz)
-sha512sums=('ee6612a34087135065537fa14f09078bad9f029f69b636fb2221193f23d86c5431a9d8a848b264bdcb259680f6bda41d08d58dcf67d19e5a200cb11fa4a26ffe')
+source=(http://download.fcitx-im.org/$pkgbase/$pkgbase-${pkgver}_dict.tar.xz
+        custom-translation-install-dir.patch)
+sha512sums=('ee6612a34087135065537fa14f09078bad9f029f69b636fb2221193f23d86c5431a9d8a848b264bdcb259680f6bda41d08d58dcf67d19e5a200cb11fa4a26ffe'
+            'c57ef118b72accdfc42a0035a5318bf4b0ebe082af46efff7bfea4b063d382cc92bef0205555e42d140a6ffcbbdb87d43db833e1a221c5d3a97f12c8720e759a')
 
 prepare() {
   cd ${pkgbase}-${pkgver}
+
+  patch -p1 -i ../custom-translation-install-dir.patch
 }
 
 build() {

Deleted: add-a-context-variable-to-disable-punc.patch
===================================================================
--- add-a-context-variable-to-disable-punc.patch	2014-09-29 14:38:50 UTC (rev 119784)
+++ add-a-context-variable-to-disable-punc.patch	2014-09-29 14:49:37 UTC (rev 119785)
@@ -1,59 +0,0 @@
-From: Xuetian Weng <wengxt at gmail.com>
-Date: Tue, 11 Mar 2014 00:13:43 +0800
-Subject: add a context variable to disable punc
-
----
- src/lib/fcitx/context.h |    2 ++
- src/module/punc/punc.c  |   12 ++++++++++++
- 2 files changed, 14 insertions(+)
-
-diff --git a/src/lib/fcitx/context.h b/src/lib/fcitx/context.h
-index 32115af..05f0f91 100644
---- a/src/lib/fcitx/context.h
-+++ b/src/lib/fcitx/context.h
-@@ -70,6 +70,8 @@ extern "C" {
-     #define CONTEXT_DISABLE_AUTO_FIRST_CANDIDATE_HIGHTLIGHT "CONTEXT_DISABLE_AUTO_FIRST_CANDIDATE_HIGHTLIGHT"
-     /** disable auto first candidate highlight */
-     #define CONTEXT_DISABLE_FULLWIDTH "CONTEXT_DISABLE_FULLWIDTH"
-+    /** disable punc module */
-+    #define CONTEXT_DISABLE_PUNC "CONTEXT_DISABLE_PUNC"
- 
-     /**
-      * @brief register a new global context variable
-diff --git a/src/module/punc/punc.c b/src/module/punc/punc.c
-index be6dec3..3327f9c 100644
---- a/src/module/punc/punc.c
-+++ b/src/module/punc/punc.c
-@@ -154,6 +154,8 @@ void* PuncCreate(FcitxInstance* instance)
-                                                   PuncWhichCopy, PuncWhichFree,
-                                                   puncState);
- 
-+    FcitxInstanceRegisterWatchableContext(instance, CONTEXT_DISABLE_PUNC, FCT_Boolean, FCF_ResetOnInputMethodChange);
-+
-     FcitxPuncAddFunctions(instance);
-     return puncState;
- }
-@@ -250,6 +252,11 @@ boolean PuncPreFilter(void* arg, FcitxKeySym sym, unsigned int state,
- {
-     FCITX_UNUSED(retVal);
-     FcitxPuncState *puncState = (FcitxPuncState*)arg;
-+    boolean disablePunc = FcitxInstanceGetContextBoolean(
-+        puncState->owner, CONTEXT_DISABLE_PUNC);
-+    if (disablePunc)
-+        return false;
-+
-     if (FcitxHotkeyIsHotKeySimple(sym, state) &&
-         !FcitxHotkeyIsHotKeyDigit(sym, state) && !IsHotKeyPunc(sym, state))
-         puncState->bLastIsNumber = false;
-@@ -269,6 +276,11 @@ boolean ProcessPunc(void* arg, FcitxKeySym sym, unsigned int state, INPUT_RETURN
-     if (*retVal != IRV_TO_PROCESS)
-         return false;
- 
-+    boolean disablePunc = FcitxInstanceGetContextBoolean(
-+        puncState->owner, CONTEXT_DISABLE_PUNC);
-+    if (disablePunc)
-+        return false;
-+
-     FcitxCandidateWordList *candList = FcitxInputStateGetCandidateList(input);
-     if (FcitxCandidateWordGetListSize(candList) != 0) {
-         if (FcitxCandidateWordGetHasGoneToNextPage(candList) &&

Added: custom-translation-install-dir.patch
===================================================================
--- custom-translation-install-dir.patch	                        (rev 0)
+++ custom-translation-install-dir.patch	2014-09-29 14:49:37 UTC (rev 119785)
@@ -0,0 +1,33 @@
+From 7a75b84ea330af7f64bed1db34ce45ef10d0015c Mon Sep 17 00:00:00 2001
+From: Yichao Yu <yyc1992 at gmail.com>
+Date: Sun, 28 Sep 2014 10:00:53 -0400
+Subject: [PATCH] [cmake] add option for translation install dir
+
+---
+ cmake/FcitxMacro.cmake | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/FcitxMacro.cmake b/cmake/FcitxMacro.cmake
+index ca46497..05f3830 100644
+--- a/cmake/FcitxMacro.cmake
++++ b/cmake/FcitxMacro.cmake
+@@ -638,6 +638,10 @@ function(fcitx_translate_add_apply_source in_file out_file)
+     "Cannot find a rule to convert ${in_file} to ${out_file}")
+ endfunction()
+ 
++if(NOT DEFINED FCITX_PO_INSTALL_DIR)
++  set(FCITX_PO_INSTALL_DIR share/locale/)
++endif()
++
+ # Should be used in cmake modules, add a handler script to update a set of
+ # certain type of files from the translated mo files.
+ # The script must be executable.
+@@ -719,7 +723,7 @@ function(fcitx_translate_set_pot_target target domain pot_file)
+         -o "${po_dir}/${domain}.mo" "${po_file}"
+         DEPENDS "${po_file}")
+       install(FILES "${po_dir}/${domain}.mo"
+-        DESTINATION "share/locale/${po_lang}/LC_MESSAGES")
++        DESTINATION "${FCITX_PO_INSTALL_DIR}/${po_lang}/LC_MESSAGES")
+       list(APPEND all_mo_files "${po_dir}/${domain}.mo")
+       list(APPEND all_po_files "${po_file}")
+     endforeach()



More information about the arch-commits mailing list