gnu: Move Linux-Libre modules to their own section.
[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 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 (gnu packages documentation)
26 #:use-module (gnu packages enchant)
27 #:use-module (gnu packages gettext)
28 #:use-module (gnu packages glib)
29 #:use-module (gnu packages gtk)
30 #:use-module (gnu packages icu4c)
31 #:use-module (gnu packages iso-codes)
32 #:use-module (gnu packages pkg-config)
33 #:use-module (gnu packages xml)
34 #:use-module (gnu packages xorg))
35
36 (define-public fcitx
37 (package
38 (name "fcitx")
39 (version "4.2.9.6")
40 (source (origin
41 (method url-fetch)
42 (uri (string-append "http://download.fcitx-im.org/fcitx/"
43 name "-" version "_dict.tar.xz"))
44 (sha256
45 (base32
46 "0hyrh3v82a32ylnlvzrp6cmq56x4p1a42q5xc6njmmj2msxm34x5"))))
47 (build-system cmake-build-system)
48 (outputs '("out" "gtk2" "gtk3"))
49 (arguments
50 `(#:configure-flags
51 (list "-DENABLE_TEST=ON"
52 (string-append "-DXKB_RULES_XML_FILE="
53 (assoc-ref %build-inputs "xkeyboard-config")
54 "/share/X11/xkb/rules/evdev.xml")
55 "-DENABLE_GTK2_IM_MODULE=ON"
56 "-DENABLE_GTK3_IM_MODULE=ON"
57 (string-append "-DGTK2_IM_MODULEDIR="
58 (assoc-ref %outputs "gtk2")
59 "/lib/gtk-2.0/2.10.0/immodules")
60 (string-append "-DGTK3_IM_MODULEDIR="
61 (assoc-ref %outputs "gtk3")
62 "/lib/gtk-3.0/3.0.0/immodules")
63 ;; XXX: Enable GObject Introspection and Qt4 support.
64 "-DENABLE_GIR=OFF"
65 "-DENABLE_QT=OFF"
66 "-DENABLE_QT_IM_MODULE=OFF")))
67 (native-inputs
68 `(("doxygen" ,doxygen)
69 ("extra-cmake-modules"
70 ;; XXX: We can't simply #:use-module due to a cycle somewhere.
71 ,(module-ref
72 (resolve-interface '(gnu packages kde-frameworks))
73 'extra-cmake-modules))
74 ("glib:bin" ,glib "bin") ; for glib-genmarshal
75 ("pkg-config" ,pkg-config)))
76 (inputs
77 `(("dbus" ,dbus)
78 ("enchant" ,enchant-1.6)
79 ("gettext" ,gettext-minimal)
80 ("gtk2" ,gtk+-2)
81 ("gtk3" ,gtk+)
82 ("icu4c" ,icu4c)
83 ("iso-codes" ,iso-codes)
84 ("libxkbfile" ,libxkbfile)
85 ("libxml2" ,libxml2)
86 ("xkeyboard-config" ,xkeyboard-config)))
87 (home-page "https://fcitx-im.org")
88 (synopsis "Input method framework")
89 (description
90 "Fcitx is an input method framework with extension support. It has
91 Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
92 built-in.")
93 (license gpl2+)))
94
95 (define-public fcitx-configtool
96 (package
97 (name "fcitx-configtool")
98 (version "0.4.10")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append "https://download.fcitx-im.org/fcitx-configtool/"
102 name "-" version ".tar.xz"))
103 (sha256
104 (base32
105 "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w"))))
106 (build-system cmake-build-system)
107 (arguments
108 `(#:configure-flags
109 (list "-DENABLE_GTK2=ON"
110 "-DENABLE_GTK3=ON")
111 #:tests? #f)) ; No tests.
112 (native-inputs
113 `(("glib:bin" ,glib "bin")
114 ("pkg-config" ,pkg-config)))
115 (inputs
116 `(("fcitx" ,fcitx)
117 ("dbus-glib" ,dbus-glib)
118 ("gettext" ,gettext-minimal)
119 ("gtk2" ,gtk+-2)
120 ("gtk3" ,gtk+)
121 ("iso-codes" ,iso-codes)))
122 (home-page "https://fcitx-im.org/wiki/Configtool")
123 (synopsis "Graphic Fcitx configuration tool")
124 (description
125 "Fcitx is an input method framework with extension support. It has
126 Pinyin, Quwei and some table-based (Wubi, Cangjie, Erbi, etc.) input methods
127 built-in. This package provides GTK version of the graphic configuration
128 tool of Fcitx.")
129 (license gpl2+)))