gnu: slepc: Set origin file-name.
[jackhill/guix/guix.git] / gnu / packages / ibus.scm
CommitLineData
aad6f5bc
RW
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
2e6ecc5c 3;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
aad6f5bc
RW
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 ibus)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix build-system glib-or-gtk)
26 #:use-module (gnu packages)
12edffe4
RW
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages base)
5fbbd29f
RW
29 #:use-module (gnu packages databases)
30 #:use-module (gnu packages freedesktop)
aad6f5bc
RW
31 #:use-module (gnu packages glib)
32 #:use-module (gnu packages gnome)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages iso-codes)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages python))
37
38(define-public ibus
39 (package
40 (name "ibus")
5b86a584 41 (version "1.5.11")
aad6f5bc
RW
42 (source (origin
43 (method url-fetch)
5b86a584
RW
44 (uri (string-append "https://github.com/ibus/ibus/"
45 "releases/download/"
46 version "/ibus-" version ".tar.gz"))
aad6f5bc
RW
47 (sha256
48 (base32
5b86a584 49 "1g26llizd26h9sfz4xdq8krhz19hn08pirvfbkk3g89ri8lmm6a9"))))
aad6f5bc
RW
50 (build-system glib-or-gtk-build-system)
51 (arguments
52 `(#:tests? #f ; tests fail because there's no connection to dbus
53 #:make-flags
54 (list "CC=gcc"
55 (string-append "pyoverridesdir="
5b86a584
RW
56 (assoc-ref %outputs "out")
57 "/lib/python2.7/site-packages/gi/overrides/")
58 (string-append "py2overridesdir="
aad6f5bc
RW
59 (assoc-ref %outputs "out")
60 "/lib/python2.7/site-packages/gi/overrides/"))
61 #:phases
62 (alist-cons-before
63 'configure 'disable-dconf-update
64 (lambda _
65 (substitute* "data/dconf/Makefile.in"
66 (("dconf update") "echo dconf update"))
67 #t)
68 (alist-cons-after
69 'wrap-program 'wrap-with-additional-paths
70 (lambda* (#:key outputs #:allow-other-keys)
71 ;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and
72 ;; GI_TYPELIB_PATH.
73 (let ((out (assoc-ref outputs "out")))
74 (wrap-program (string-append out "/bin/ibus-setup")
75 `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
76 `("GI_TYPELIB_PATH" ":" prefix
77 (,(getenv "GI_TYPELIB_PATH")
78 ,(string-append out "/lib/girepository-1.0"))))))
79 %standard-phases))))
80 (inputs
81 `(("dbus" ,dbus)
82 ("dconf" ,dconf)
83 ("gconf" ,gconf)
aad6f5bc 84 ("gtk2" ,gtk+-2)
92f1cefb 85 ("gtk+" ,gtk+)
aad6f5bc
RW
86 ("intltool" ,intltool)
87 ("libnotify" ,libnotify)
88 ("iso-codes" ,iso-codes)
89 ("pygobject2" ,python2-pygobject)
90 ("python2" ,python-2)))
91 (native-inputs
92 `(("glib" ,glib "bin") ; for glib-genmarshal
93 ("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler
94 ("pkg-config" ,pkg-config)))
c940a145
RW
95 (native-search-paths
96 (list (search-path-specification
97 (variable "IBUS_COMPONENT_PATH")
98 (files '("share/ibus/component")))))
aad6f5bc
RW
99 (synopsis "Input method framework")
100 (description
101 "IBus is an input framework providing a full-featured and user-friendly
102input method user interface. It comes with multilingual input support. It
103may also simplify input method development.")
104 (home-page "http://ibus.googlecode.com/")
105 (license lgpl2.1+)))
12edffe4 106
5fbbd29f
RW
107(define-public ibus-libpinyin
108 (package
109 (name "ibus-libpinyin")
110 (version "1.7.2")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "https://github.com/libpinyin/"
114 "ibus-libpinyin/archive/" version ".tar.gz"))
115 (file-name (string-append name "-" version ".tar.gz"))
116 (sha256
117 (base32
118 "080ixx5lih9lr78b061y67dqmiyc7ij87jl1sa26hhs1dr28ihka"))))
119 (build-system glib-or-gtk-build-system)
120 (arguments
121 `(#:phases
122 (modify-phases %standard-phases
123 (add-before 'configure 'autogen
124 (lambda _ (and (zero? (system* "intltoolize"))
125 (zero? (system* "autoreconf" "-vif")))))
126 (add-after 'wrap-program 'wrap-with-additional-paths
127 (lambda* (#:key inputs outputs #:allow-other-keys)
128 ;; Make sure 'ibus-setup-libpinyin' runs with the correct
129 ;; PYTHONPATH and GI_TYPELIB_PATH.
130 (let ((out (assoc-ref outputs "out")))
131 (wrap-program (string-append out "/libexec/ibus-setup-libpinyin")
132 `("PYTHONPATH" ":" prefix
133 (,(getenv "PYTHONPATH")
134 ,(string-append (assoc-ref inputs "ibus")
135 "/lib/girepository-1.0")))
136 `("GI_TYPELIB_PATH" ":" prefix
137 (,(string-append (assoc-ref inputs "ibus")
138 "/lib/girepository-1.0"))))
139 #t))))))
140 (inputs
141 `(("ibus" ,ibus)
142 ("libpinyin" ,libpinyin)
143 ("bdb" ,bdb)
144 ("sqlite" ,sqlite)
145 ("python" ,python-2)
dedaf7ac
RW
146 ("pyxdg" ,python2-pyxdg)
147 ("gtk+" ,gtk+)))
5fbbd29f
RW
148 (native-inputs
149 `(("pkg-config" ,pkg-config)
150 ("intltool" ,intltool)
151 ("autoconf" ,autoconf)
152 ("automake" ,automake)
dedaf7ac 153 ("glib" ,glib "bin")
5fbbd29f
RW
154 ("libtool" ,libtool)))
155 (synopsis "Chinese Pinyin and ZhuYin input methods for IBus")
156 (description
157 "This package includes a Chinese Pinyin input method and a Chinese
158ZhuYin (Bopomofo) input method based on libpinyin for IBus.")
159 (home-page "https://github.com/libpinyin/ibus-libpinyin")
160 (license gpl2+)))
161
12edffe4
RW
162(define-public libpinyin
163 (package
164 (name "libpinyin")
165 (version "1.2.0")
166 (source (origin
167 (method url-fetch)
168 (uri (string-append
169 "https://github.com/libpinyin/libpinyin/archive/"
170 version ".tar.gz"))
171 (file-name (string-append name "-" version ".tar.gz"))
172 (sha256
173 (base32
174 "04didxd39vlry6nqy7xqynwc68ndajnhw334wahfmp7zjbbscs7p"))))
175 (build-system gnu-build-system)
176 (arguments
177 `(#:phases
178 (modify-phases %standard-phases
179 (add-before 'configure 'autogen
180 (lambda _ (zero? (system* "autoreconf" "-vif"))))
181 (add-after 'unpack 'unpack-model
182 (lambda* (#:key inputs #:allow-other-keys)
183 (zero? (system* "tar" "-xvf"
184 (assoc-ref inputs "model")
185 "-C" "data")))))))
186 (inputs
187 `(("glib" ,glib)
188 ("bdb" ,bdb)
189 ("model"
190 ,(origin
191 (method url-fetch)
192 (uri (string-append "mirror://sourceforge/libpinyin/"
193 "models/model10.text.tar.gz"))
194 (sha256
195 (base32
196 "0g489wqcfklxphhxpkh8i4qf9y8scmnmdbfrzdbrgf3rignbwyiw"))))))
197 (native-inputs
198 `(("pkg-config" ,pkg-config)
199 ("autoconf" ,autoconf)
200 ("automake" ,automake)
201 ("libtool" ,libtool)))
202 (synopsis "Library to handle Chinese Pinyin")
203 (description
204 "The libpinyin C++ library provides algorithms needed for sentence-based
205Chinese pinyin input methods.")
206 (home-page "https://github.com/libpinyin/libpinyin")
207 (license gpl2+)))