gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
[jackhill/guix/guix.git] / gnu / packages / fcitx.scm
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 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
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.
11 ;;;
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.
16 ;;;
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/>.
19
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))
43
44 (define-public presage
45 (package
46 (name "presage")
47 (version "0.9.1")
48 (source
49 (origin
50 (method url-fetch)
51 (uri
52 (string-append "mirror://sourceforge/presage/presage/"
53 version "/presage-" version ".tar.gz"))
54 (sha256
55 (base32 "0rm3b3zaf6bd7hia0lr1wyvi1rrvxkn7hg05r5r1saj0a3ingmay"))))
56 (build-system glib-or-gtk-build-system)
57 (outputs '("out" "doc"))
58 (arguments
59 `(#:configure-flags
60 (list
61 "CFLAGS=-Wno-narrowing"
62 "CXXFLAGS=-Wno-narrowing")
63 #:phases
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"))
70 (rename-file
71 (string-append out "/share/presage/html")
72 (string-append doc "/share/presage/html"))
73 #t))))))
74 (native-inputs
75 `(("dot" ,graphviz)
76 ("doxygen" ,doxygen)
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)))
83 (inputs
84 `(("glib" ,glib)
85 ("gtk+" ,gtk+)
86 ("libx11" ,libx11)
87 ("sqlite" ,sqlite)
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/")
95 (license gpl2+)))
96
97 (define-public fcitx
98 (package
99 (name "fcitx")
100 (version "4.2.9.7")
101 (source (origin
102 (method url-fetch)
103 (uri (string-append "http://download.fcitx-im.org/fcitx/"
104 "fcitx-" version "_dict.tar.xz"))
105 (sha256
106 (base32
107 "13vg7yzfq0vj2r8zdf9ly3n243nwwggkhd5qv3z6yqdyj0m3ncyg"))))
108 (build-system cmake-build-system)
109 (outputs '("out" "gtk2" "gtk3"))
110 (arguments
111 `(#:configure-flags
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.
125 "-DENABLE_GIR=OFF"
126 "-DENABLE_QT=OFF"
127 "-DENABLE_QT_IM_MODULE=OFF")))
128 (native-inputs
129 `(("doxygen" ,doxygen)
130 ("extra-cmake-modules"
131 ;; XXX: We can't simply #:use-module due to a cycle somewhere.
132 ,(module-ref
133 (resolve-interface '(gnu packages kde-frameworks))
134 'extra-cmake-modules))
135 ("glib:bin" ,glib "bin") ; for glib-genmarshal
136 ("pkg-config" ,pkg-config)))
137 (inputs
138 `(("dbus" ,dbus)
139 ("enchant" ,enchant-1.6)
140 ("gettext" ,gettext-minimal)
141 ("gtk2" ,gtk+-2)
142 ("gtk3" ,gtk+)
143 ("icu4c" ,icu4c)
144 ("iso-codes" ,iso-codes)
145 ("json-c" ,json-c)
146 ("libxkbfile" ,libxkbfile)
147 ("libxml2" ,libxml2)
148 ("xkeyboard-config" ,xkeyboard-config)))
149 (home-page "https://fcitx-im.org")
150 (synopsis "Input method framework")
151 (description
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
154 built-in.")
155 (license gpl2+)))
156
157 (define-public fcitx-configtool
158 (package
159 (name "fcitx-configtool")
160 (version "0.4.10")
161 (source (origin
162 (method url-fetch)
163 (uri (string-append "https://download.fcitx-im.org/fcitx-configtool/"
164 "fcitx-configtool-" version ".tar.xz"))
165 (sha256
166 (base32
167 "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w"))))
168 (build-system cmake-build-system)
169 (arguments
170 `(#:configure-flags
171 (list "-DENABLE_GTK2=ON"
172 "-DENABLE_GTK3=ON")
173 #:tests? #f)) ; No tests.
174 (native-inputs
175 `(("glib:bin" ,glib "bin")
176 ("pkg-config" ,pkg-config)))
177 (inputs
178 `(("fcitx" ,fcitx)
179 ("dbus-glib" ,dbus-glib)
180 ("gettext" ,gettext-minimal)
181 ("gtk2" ,gtk+-2)
182 ("gtk3" ,gtk+)
183 ("iso-codes" ,iso-codes)))
184 (home-page "https://fcitx-im.org/wiki/Configtool")
185 (synopsis "Graphic Fcitx configuration tool")
186 (description
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
190 tool of Fcitx.")
191 (license gpl2+)))