Commit | Line | Data |
---|---|---|
488c34ec SB |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> | |
6b3017e1 | 3 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
7e463dd1 | 4 | ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com> |
488c34ec SB |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
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. | |
12 | ;;; | |
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. | |
17 | ;;; | |
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/>. | |
20 | ||
21 | (define-module (gnu packages fcitx) | |
7152d756 | 22 | #:use-module ((guix licenses) #:select (gpl2+ bsd-3)) |
488c34ec SB |
23 | #:use-module (guix packages) |
24 | #:use-module (guix download) | |
7152d756 | 25 | #:use-module (guix git-download) |
488c34ec | 26 | #:use-module (guix build-system cmake) |
d3ed745e | 27 | #:use-module (guix build-system glib-or-gtk) |
7152d756 | 28 | #:use-module (guix build-system qt) |
d3ed745e | 29 | #:use-module (gnu packages check) |
99828fa7 | 30 | #:use-module (gnu packages documentation) |
488c34ec SB |
31 | #:use-module (gnu packages enchant) |
32 | #:use-module (gnu packages gettext) | |
33 | #:use-module (gnu packages glib) | |
d3ed745e | 34 | #:use-module (gnu packages graphviz) |
488c34ec SB |
35 | #:use-module (gnu packages gtk) |
36 | #:use-module (gnu packages icu4c) | |
37 | #:use-module (gnu packages iso-codes) | |
7152d756 | 38 | #:use-module (gnu packages kde-frameworks) |
d3ed745e RG |
39 | #:use-module (gnu packages man) |
40 | #:use-module (gnu packages ncurses) | |
488c34ec | 41 | #:use-module (gnu packages pkg-config) |
d3ed745e | 42 | #:use-module (gnu packages python) |
7152d756 | 43 | #:use-module (gnu packages qt) |
d3ed745e | 44 | #:use-module (gnu packages sqlite) |
353b4f64 | 45 | #:use-module (gnu packages web) |
488c34ec | 46 | #:use-module (gnu packages xml) |
7152d756 RG |
47 | #:use-module (gnu packages xorg) |
48 | #:use-module (gnu packages xdisorg)) | |
49 | ||
50 | (define-public fcitx-qt5 | |
51 | (package | |
52 | (name "fcitx-qt5") | |
794bb59b | 53 | (version "1.2.6") |
7152d756 RG |
54 | (source |
55 | (origin | |
56 | (method git-fetch) | |
57 | (uri | |
58 | (git-reference | |
59 | (url "https://github.com/fcitx/fcitx-qt5.git") | |
60 | (commit version))) | |
61 | (file-name | |
62 | (git-file-name name version)) | |
63 | (sha256 | |
794bb59b | 64 | (base32 "13sanrir696fv7s44b7q453s5qi4r7ag0r3iyggyzk8xyf6rw8fk")))) |
7152d756 RG |
65 | (build-system qt-build-system) |
66 | (arguments | |
67 | `(#:tests? #f ; No target | |
68 | #:phases | |
69 | (modify-phases %standard-phases | |
70 | (add-after 'unpack 'patch-install-dir | |
71 | (lambda* (#:key outputs #:allow-other-keys) | |
72 | (substitute* "quickphrase-editor/CMakeLists.txt" | |
73 | (("\\$\\{FCITX4_ADDON_INSTALL_DIR\\}") | |
74 | (string-append | |
75 | (assoc-ref outputs "out") | |
76 | "/lib/fcitx"))) | |
77 | (substitute* "platforminputcontext/CMakeLists.txt" | |
78 | (("\\$\\{CMAKE_INSTALL_QTPLUGINDIR\\}") | |
79 | (string-append | |
80 | (assoc-ref outputs "out") | |
81 | "/lib/qt5/plugins"))) | |
82 | #t))))) | |
83 | (native-inputs | |
84 | `(("extra-cmake-modules" ,extra-cmake-modules) | |
85 | ("pkg-config" ,pkg-config))) | |
86 | (inputs | |
87 | `(("fcitx" ,fcitx) | |
88 | ("libintl" ,intltool) | |
89 | ("libxkbcommon" ,libxkbcommon))) | |
90 | (propagated-inputs | |
91 | `(("qtbase" ,qtbase))) | |
92 | (synopsis "Fcitx Qt5 Input Context") | |
93 | (description "This package provides a Qt5 frontend for fcitx.") | |
94 | (home-page "https://github.com/fcitx/fcitx-qt5/") | |
95 | (license | |
96 | (list | |
97 | ;; Plugin | |
98 | bsd-3 | |
99 | ;; Others | |
100 | gpl2+)))) | |
488c34ec | 101 | |
d3ed745e RG |
102 | (define-public presage |
103 | (package | |
104 | (name "presage") | |
105 | (version "0.9.1") | |
106 | (source | |
107 | (origin | |
108 | (method url-fetch) | |
109 | (uri | |
110 | (string-append "mirror://sourceforge/presage/presage/" | |
111 | version "/presage-" version ".tar.gz")) | |
112 | (sha256 | |
113 | (base32 "0rm3b3zaf6bd7hia0lr1wyvi1rrvxkn7hg05r5r1saj0a3ingmay")))) | |
114 | (build-system glib-or-gtk-build-system) | |
115 | (outputs '("out" "doc")) | |
116 | (arguments | |
117 | `(#:configure-flags | |
118 | (list | |
119 | "CFLAGS=-Wno-narrowing" | |
120 | "CXXFLAGS=-Wno-narrowing") | |
121 | #:phases | |
122 | (modify-phases %standard-phases | |
123 | (add-after 'install 'move-doc | |
124 | (lambda* (#:key outputs #:allow-other-keys) | |
125 | (let* ((out (assoc-ref outputs "out")) | |
126 | (doc (assoc-ref outputs "doc"))) | |
127 | (mkdir-p (string-append doc "/share/presage")) | |
128 | (rename-file | |
129 | (string-append out "/share/presage/html") | |
130 | (string-append doc "/share/presage/html")) | |
131 | #t)))))) | |
132 | (native-inputs | |
133 | `(("dot" ,graphviz) | |
134 | ("doxygen" ,doxygen) | |
135 | ("gettext" ,gettext-minimal) | |
136 | ("glib:bin" ,glib "bin") | |
137 | ("gtk+:bin" ,gtk+ "bin") | |
138 | ("help2man" ,help2man) | |
139 | ("pkg-config" ,pkg-config) | |
140 | ("python-wrapper" ,python-wrapper))) | |
141 | (inputs | |
142 | `(("glib" ,glib) | |
143 | ("gtk+" ,gtk+) | |
144 | ("libx11" ,libx11) | |
145 | ("sqlite" ,sqlite) | |
146 | ("tinyxml" ,tinyxml))) | |
147 | (synopsis "Intelligent Predictive Text Entry System") | |
148 | (description "Presage generates predictions by modelling natural language as | |
149 | a combination of redundant information sources. It computes probabilities for | |
150 | words which are most likely to be entered next by merging predictions generated | |
151 | by the different predictive algorithms.") | |
152 | (home-page "https://presage.sourceforge.io/") | |
153 | (license gpl2+))) | |
154 | ||
488c34ec SB |
155 | (define-public fcitx |
156 | (package | |
157 | (name "fcitx") | |
7e463dd1 | 158 | (version "4.2.9.8") |
488c34ec SB |
159 | (source (origin |
160 | (method url-fetch) | |
161 | (uri (string-append "http://download.fcitx-im.org/fcitx/" | |
6b3017e1 | 162 | "fcitx-" version "_dict.tar.xz")) |
488c34ec SB |
163 | (sha256 |
164 | (base32 | |
7e463dd1 | 165 | "1iik80l7g8yk9iwsls6nl9whwgm0sj8i7s6s0bz4c5anl35iaddw")))) |
488c34ec SB |
166 | (build-system cmake-build-system) |
167 | (outputs '("out" "gtk2" "gtk3")) | |
168 | (arguments | |
169 | `(#:configure-flags | |
170 | (list "-DENABLE_TEST=ON" | |
171 | (string-append "-DXKB_RULES_XML_FILE=" | |
172 | (assoc-ref %build-inputs "xkeyboard-config") | |
173 | "/share/X11/xkb/rules/evdev.xml") | |
174 | "-DENABLE_GTK2_IM_MODULE=ON" | |
175 | "-DENABLE_GTK3_IM_MODULE=ON" | |
176 | (string-append "-DGTK2_IM_MODULEDIR=" | |
177 | (assoc-ref %outputs "gtk2") | |
178 | "/lib/gtk-2.0/2.10.0/immodules") | |
179 | (string-append "-DGTK3_IM_MODULEDIR=" | |
180 | (assoc-ref %outputs "gtk3") | |
181 | "/lib/gtk-3.0/3.0.0/immodules") | |
182 | ;; XXX: Enable GObject Introspection and Qt4 support. | |
183 | "-DENABLE_GIR=OFF" | |
184 | "-DENABLE_QT=OFF" | |
185 | "-DENABLE_QT_IM_MODULE=OFF"))) | |
186 | (native-inputs | |
187 | `(("doxygen" ,doxygen) | |
50ca5fb3 TGR |
188 | ("extra-cmake-modules" |
189 | ;; XXX: We can't simply #:use-module due to a cycle somewhere. | |
190 | ,(module-ref | |
191 | (resolve-interface '(gnu packages kde-frameworks)) | |
192 | 'extra-cmake-modules)) | |
193 | ("glib:bin" ,glib "bin") ; for glib-genmarshal | |
488c34ec SB |
194 | ("pkg-config" ,pkg-config))) |
195 | (inputs | |
196 | `(("dbus" ,dbus) | |
c1d59b3c | 197 | ("enchant" ,enchant-1.6) |
b94a6ca0 | 198 | ("gettext" ,gettext-minimal) |
488c34ec SB |
199 | ("gtk2" ,gtk+-2) |
200 | ("gtk3" ,gtk+) | |
201 | ("icu4c" ,icu4c) | |
202 | ("iso-codes" ,iso-codes) | |
353b4f64 | 203 | ("json-c" ,json-c) |
488c34ec SB |
204 | ("libxkbfile" ,libxkbfile) |
205 | ("libxml2" ,libxml2) | |
206 | ("xkeyboard-config" ,xkeyboard-config))) | |
657bed34 | 207 | (home-page "https://fcitx-im.org") |
488c34ec SB |
208 | (synopsis "Input method framework") |
209 | (description | |
210 | "Fcitx is an input method framework with extension support. It has | |
211 | Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods | |
212 | built-in.") | |
213 | (license gpl2+))) | |
7386a048 FS |
214 | |
215 | (define-public fcitx-configtool | |
216 | (package | |
217 | (name "fcitx-configtool") | |
914c6f62 | 218 | (version "0.4.10") |
7386a048 FS |
219 | (source (origin |
220 | (method url-fetch) | |
221 | (uri (string-append "https://download.fcitx-im.org/fcitx-configtool/" | |
2a0e50f3 | 222 | "fcitx-configtool-" version ".tar.xz")) |
7386a048 FS |
223 | (sha256 |
224 | (base32 | |
914c6f62 | 225 | "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w")))) |
7386a048 FS |
226 | (build-system cmake-build-system) |
227 | (arguments | |
228 | `(#:configure-flags | |
229 | (list "-DENABLE_GTK2=ON" | |
230 | "-DENABLE_GTK3=ON") | |
231 | #:tests? #f)) ; No tests. | |
232 | (native-inputs | |
233 | `(("glib:bin" ,glib "bin") | |
234 | ("pkg-config" ,pkg-config))) | |
235 | (inputs | |
236 | `(("fcitx" ,fcitx) | |
237 | ("dbus-glib" ,dbus-glib) | |
238 | ("gettext" ,gettext-minimal) | |
239 | ("gtk2" ,gtk+-2) | |
240 | ("gtk3" ,gtk+) | |
241 | ("iso-codes" ,iso-codes))) | |
242 | (home-page "https://fcitx-im.org/wiki/Configtool") | |
243 | (synopsis "Graphic Fcitx configuration tool") | |
244 | (description | |
245 | "Fcitx is an input method framework with extension support. It has | |
246 | Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods | |
247 | built-in. This package provides GTK version of the graphic configuration | |
248 | tool of Fcitx.") | |
249 | (license gpl2+))) |