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>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages fcitx)
21 #:use-module ((guix licenses) #:select (gpl2+))
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system cmake)
25 #:use-module (guix build-system glib-or-gtk)
26 #:use-module (gnu packages check)
27 #:use-module (gnu packages documentation)
28 #:use-module (gnu packages enchant)
29 #:use-module (gnu packages gettext)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages graphviz)
32 #:use-module (gnu packages gtk)
33 #:use-module (gnu packages icu4c)
34 #:use-module (gnu packages iso-codes)
35 #:use-module (gnu packages man)
36 #:use-module (gnu packages ncurses)
37 #:use-module (gnu packages pkg-config)
38 #:use-module (gnu packages python)
39 #:use-module (gnu packages sqlite)
40 #:use-module (gnu packages web)
41 #:use-module (gnu packages xml)
42 #:use-module (gnu packages xorg))
44 (define-public presage
52 (string-append "mirror://sourceforge/presage/presage/"
53 version "/presage-" version ".tar.gz"))
55 (base32 "0rm3b3zaf6bd7hia0lr1wyvi1rrvxkn7hg05r5r1saj0a3ingmay"))))
56 (build-system glib-or-gtk-build-system)
57 (outputs '("out" "doc"))
61 "CFLAGS=-Wno-narrowing"
62 "CXXFLAGS=-Wno-narrowing")
64 (modify-phases %standard-phases
65 (add-after 'install 'move-doc
66 (lambda* (#:key outputs #:allow-other-keys)
67 (let* ((out (assoc-ref outputs "out"))
68 (doc (assoc-ref outputs "doc")))
69 (mkdir-p (string-append doc "/share/presage"))
71 (string-append out "/share/presage/html")
72 (string-append doc "/share/presage/html"))
77 ("gettext" ,gettext-minimal)
78 ("glib:bin" ,glib "bin")
79 ("gtk+:bin" ,gtk+ "bin")
80 ("help2man" ,help2man)
81 ("pkg-config" ,pkg-config)
82 ("python-wrapper" ,python-wrapper)))
88 ("tinyxml" ,tinyxml)))
89 (synopsis "Intelligent Predictive Text Entry System")
90 (description "Presage generates predictions by modelling natural language as
91 a combination of redundant information sources. It computes probabilities for
92 words which are most likely to be entered next by merging predictions generated
93 by the different predictive algorithms.")
94 (home-page "https://presage.sourceforge.io/")
103 (uri (string-append "http://download.fcitx-im.org/fcitx/"
104 "fcitx-" version "_dict.tar.xz"))
107 "13vg7yzfq0vj2r8zdf9ly3n243nwwggkhd5qv3z6yqdyj0m3ncyg"))))
108 (build-system cmake-build-system)
109 (outputs '("out" "gtk2" "gtk3"))
112 (list "-DENABLE_TEST=ON"
113 (string-append "-DXKB_RULES_XML_FILE="
114 (assoc-ref %build-inputs "xkeyboard-config")
115 "/share/X11/xkb/rules/evdev.xml")
116 "-DENABLE_GTK2_IM_MODULE=ON"
117 "-DENABLE_GTK3_IM_MODULE=ON"
118 (string-append "-DGTK2_IM_MODULEDIR="
119 (assoc-ref %outputs "gtk2")
120 "/lib/gtk-2.0/2.10.0/immodules")
121 (string-append "-DGTK3_IM_MODULEDIR="
122 (assoc-ref %outputs "gtk3")
123 "/lib/gtk-3.0/3.0.0/immodules")
124 ;; XXX: Enable GObject Introspection and Qt4 support.
127 "-DENABLE_QT_IM_MODULE=OFF")))
129 `(("doxygen" ,doxygen)
130 ("extra-cmake-modules"
131 ;; XXX: We can't simply #:use-module due to a cycle somewhere.
133 (resolve-interface '(gnu packages kde-frameworks))
134 'extra-cmake-modules))
135 ("glib:bin" ,glib "bin") ; for glib-genmarshal
136 ("pkg-config" ,pkg-config)))
139 ("enchant" ,enchant-1.6)
140 ("gettext" ,gettext-minimal)
144 ("iso-codes" ,iso-codes)
146 ("libxkbfile" ,libxkbfile)
148 ("xkeyboard-config" ,xkeyboard-config)))
149 (home-page "https://fcitx-im.org")
150 (synopsis "Input method framework")
152 "Fcitx is an input method framework with extension support. It has
153 Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
157 (define-public fcitx-configtool
159 (name "fcitx-configtool")
163 (uri (string-append "https://download.fcitx-im.org/fcitx-configtool/"
164 "fcitx-configtool-" version ".tar.xz"))
167 "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w"))))
168 (build-system cmake-build-system)
171 (list "-DENABLE_GTK2=ON"
173 #:tests? #f)) ; No tests.
175 `(("glib:bin" ,glib "bin")
176 ("pkg-config" ,pkg-config)))
179 ("dbus-glib" ,dbus-glib)
180 ("gettext" ,gettext-minimal)
183 ("iso-codes" ,iso-codes)))
184 (home-page "https://fcitx-im.org/wiki/Configtool")
185 (synopsis "Graphic Fcitx configuration tool")
187 "Fcitx is an input method framework with extension support. It has
188 Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
189 built-in. This package provides GTK version of the graphic configuration