gnu: Add array-operations.
[jackhill/guix/guix.git] / gnu / packages / fcitx.scm
index 8225d25..d52edf1 100644 (file)
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
-;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages enchant)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages iso-codes)
+  #:use-module (gnu packages man)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages sqlite)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
+(define-public presage
+  (package
+    (name "presage")
+    (version "0.9.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "mirror://sourceforge/presage/presage/"
+                       version "/presage-" version ".tar.gz"))
+       (sha256
+        (base32 "0rm3b3zaf6bd7hia0lr1wyvi1rrvxkn7hg05r5r1saj0a3ingmay"))))
+    (build-system glib-or-gtk-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:configure-flags
+       (list
+        "CFLAGS=-Wno-narrowing"
+        "CXXFLAGS=-Wno-narrowing")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'move-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (assoc-ref outputs "doc")))
+               (mkdir-p (string-append doc "/share/presage"))
+               (rename-file
+                (string-append out "/share/presage/html")
+                (string-append doc "/share/presage/html"))
+               #t))))))
+    (native-inputs
+     `(("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("gettext" ,gettext-minimal)
+       ("glib:bin" ,glib "bin")
+       ("gtk+:bin" ,gtk+ "bin")
+       ("help2man" ,help2man)
+       ("pkg-config" ,pkg-config)
+       ("python-wrapper" ,python-wrapper)))
+    (inputs
+     `(("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("libx11" ,libx11)
+       ("sqlite" ,sqlite)
+       ("tinyxml" ,tinyxml)))
+    (synopsis "Intelligent Predictive Text Entry System")
+    (description "Presage generates predictions by modelling natural language as
+a combination of redundant information sources.  It computes probabilities for
+words which are most likely to be entered next by merging predictions generated
+by the different predictive algorithms.")
+    (home-page "https://presage.sourceforge.io/")
+    (license gpl2+)))
+
 (define-public fcitx
   (package
     (name "fcitx")
-    (version "4.2.9.6")
+    (version "4.2.9.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.fcitx-im.org/fcitx/"
-                                  name "-" version "_dict.tar.xz"))
+                                  "fcitx-" version "_dict.tar.xz"))
               (sha256
                (base32
-                "0hyrh3v82a32ylnlvzrp6cmq56x4p1a42q5xc6njmmj2msxm34x5"))))
+                "1iik80l7g8yk9iwsls6nl9whwgm0sj8i7s6s0bz4c5anl35iaddw"))))
     (build-system cmake-build-system)
     (outputs '("out" "gtk2" "gtk3"))
     (arguments
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("dbus"             ,dbus)
-       ("enchant"          ,enchant)
+       ("enchant"          ,enchant-1.6)
        ("gettext"          ,gettext-minimal)
        ("gtk2"             ,gtk+-2)
        ("gtk3"             ,gtk+)
        ("icu4c"            ,icu4c)
        ("iso-codes"        ,iso-codes)
+       ("json-c"           ,json-c)
        ("libxkbfile"       ,libxkbfile)
        ("libxml2"          ,libxml2)
        ("xkeyboard-config" ,xkeyboard-config)))
@@ -95,14 +158,14 @@ built-in.")
 (define-public fcitx-configtool
   (package
    (name "fcitx-configtool")
-   (version "0.4.8")
+   (version "0.4.10")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://download.fcitx-im.org/fcitx-configtool/"
-                  name "-" version ".tar.xz"))
+                                "fcitx-configtool-" version ".tar.xz"))
             (sha256
              (base32
-              "1vaim0namw58bfafbvws1vgd4010p19zwqfbx6bd1zi5sgchdg0f"))))
+              "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w"))))
    (build-system cmake-build-system)
    (arguments
     `(#:configure-flags