1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
3 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages fcitx)
22 #:use-module ((guix licenses) #:select (gpl2+))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system cmake)
26 #:use-module (guix build-system glib-or-gtk)
27 #:use-module (gnu packages check)
28 #:use-module (gnu packages documentation)
29 #:use-module (gnu packages enchant)
30 #:use-module (gnu packages gettext)
31 #:use-module (gnu packages glib)
32 #:use-module (gnu packages graphviz)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages icu4c)
35 #:use-module (gnu packages iso-codes)
36 #:use-module (gnu packages man)
37 #:use-module (gnu packages ncurses)
38 #:use-module (gnu packages pkg-config)
39 #:use-module (gnu packages python)
40 #:use-module (gnu packages sqlite)
41 #:use-module (gnu packages web)
42 #:use-module (gnu packages xml)
43 #:use-module (gnu packages xorg))
45 (define-public presage
53 (string-append "mirror://sourceforge/presage/presage/"
54 version "/presage-" version ".tar.gz"))
56 (base32 "0rm3b3zaf6bd7hia0lr1wyvi1rrvxkn7hg05r5r1saj0a3ingmay"))))
57 (build-system glib-or-gtk-build-system)
58 (outputs '("out" "doc"))
62 "CFLAGS=-Wno-narrowing"
63 "CXXFLAGS=-Wno-narrowing")
65 (modify-phases %standard-phases
66 (add-after 'install 'move-doc
67 (lambda* (#:key outputs #:allow-other-keys)
68 (let* ((out (assoc-ref outputs "out"))
69 (doc (assoc-ref outputs "doc")))
70 (mkdir-p (string-append doc "/share/presage"))
72 (string-append out "/share/presage/html")
73 (string-append doc "/share/presage/html"))
78 ("gettext" ,gettext-minimal)
79 ("glib:bin" ,glib "bin")
80 ("gtk+:bin" ,gtk+ "bin")
81 ("help2man" ,help2man)
82 ("pkg-config" ,pkg-config)
83 ("python-wrapper" ,python-wrapper)))
89 ("tinyxml" ,tinyxml)))
90 (synopsis "Intelligent Predictive Text Entry System")
91 (description "Presage generates predictions by modelling natural language as
92 a combination of redundant information sources. It computes probabilities for
93 words which are most likely to be entered next by merging predictions generated
94 by the different predictive algorithms.")
95 (home-page "https://presage.sourceforge.io/")
104 (uri (string-append "http://download.fcitx-im.org/fcitx/"
105 "fcitx-" version "_dict.tar.xz"))
108 "1iik80l7g8yk9iwsls6nl9whwgm0sj8i7s6s0bz4c5anl35iaddw"))))
109 (build-system cmake-build-system)
110 (outputs '("out" "gtk2" "gtk3"))
113 (list "-DENABLE_TEST=ON"
114 (string-append "-DXKB_RULES_XML_FILE="
115 (assoc-ref %build-inputs "xkeyboard-config")
116 "/share/X11/xkb/rules/evdev.xml")
117 "-DENABLE_GTK2_IM_MODULE=ON"
118 "-DENABLE_GTK3_IM_MODULE=ON"
119 (string-append "-DGTK2_IM_MODULEDIR="
120 (assoc-ref %outputs "gtk2")
121 "/lib/gtk-2.0/2.10.0/immodules")
122 (string-append "-DGTK3_IM_MODULEDIR="
123 (assoc-ref %outputs "gtk3")
124 "/lib/gtk-3.0/3.0.0/immodules")
125 ;; XXX: Enable GObject Introspection and Qt4 support.
128 "-DENABLE_QT_IM_MODULE=OFF")))
130 `(("doxygen" ,doxygen)
131 ("extra-cmake-modules"
132 ;; XXX: We can't simply #:use-module due to a cycle somewhere.
134 (resolve-interface '(gnu packages kde-frameworks))
135 'extra-cmake-modules))
136 ("glib:bin" ,glib "bin") ; for glib-genmarshal
137 ("pkg-config" ,pkg-config)))
140 ("enchant" ,enchant-1.6)
141 ("gettext" ,gettext-minimal)
145 ("iso-codes" ,iso-codes)
147 ("libxkbfile" ,libxkbfile)
149 ("xkeyboard-config" ,xkeyboard-config)))
150 (home-page "https://fcitx-im.org")
151 (synopsis "Input method framework")
153 "Fcitx is an input method framework with extension support. It has
154 Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
158 (define-public fcitx-configtool
160 (name "fcitx-configtool")
164 (uri (string-append "https://download.fcitx-im.org/fcitx-configtool/"
165 "fcitx-configtool-" version ".tar.xz"))
168 "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w"))))
169 (build-system cmake-build-system)
172 (list "-DENABLE_GTK2=ON"
174 #:tests? #f)) ; No tests.
176 `(("glib:bin" ,glib "bin")
177 ("pkg-config" ,pkg-config)))
180 ("dbus-glib" ,dbus-glib)
181 ("gettext" ,gettext-minimal)
184 ("iso-codes" ,iso-codes)))
185 (home-page "https://fcitx-im.org/wiki/Configtool")
186 (synopsis "Graphic Fcitx configuration tool")
188 "Fcitx is an input method framework with extension support. It has
189 Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
190 built-in. This package provides GTK version of the graphic configuration