X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/92d7f5b45d1f19e075d84dab0ebbd299334d328b..2806d868efa7f867b764426b70b77d6f8e17d5a4:/gnu/packages/ibus.scm diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm index 42a8d5db32..12a8d6758f 100644 --- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017, 2018 Efraim Flashner ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019 Meiyo Peng +;;; Copyright © 2020 kanichos ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,12 +53,13 @@ #:use-module (gnu packages serialization) #:use-module (gnu packages sqlite) #:use-module (gnu packages textutils) + #:use-module (gnu packages unicode) #:use-module (gnu packages xorg)) (define-public ibus (package (name "ibus") - (version "1.5.20") + (version "1.5.22") (source (origin (method url-fetch) (uri (string-append "https://github.com/ibus/ibus/" @@ -65,23 +67,26 @@ version "/ibus-" version ".tar.gz")) (sha256 (base32 - "0d6hcbw6ai91jl87lqnyn8bxi5y5kba5i9nz7knknyh69g5fbwac")))) + "0jmy2w01phpmqnjnfnak7nvfna57mpgfnl87jwc4iai8ijjynw41")))) (build-system glib-or-gtk-build-system) (arguments `(#:tests? #f ; tests fail because there's no connection to dbus - #:configure-flags `("--disable-emoji-dict" ; cannot find emoji.json path - "--enable-python-library" - ,(string-append "--with-ucd-dir=" - (getcwd) "/ucd") - "--enable-wayland") + #:parallel-build? #f ; race condition discovered with emoji support + #:configure-flags (list "--enable-python-library" + (string-append + "--with-unicode-emoji-dir=" + (assoc-ref %build-inputs "unicode-emoji") + "/share/unicode/emoji") + (string-append + "--with-emoji-annotation-dir=" + (assoc-ref %build-inputs "unicode-cldr-common") + "/share/unicode/cldr/common/annotations") + (string-append "--with-ucd-dir=" + (assoc-ref %build-inputs "ucd") + "/share/ucd") + "--enable-wayland") #:phases (modify-phases %standard-phases - (add-after 'unpack 'prepare-ucd-dir - (lambda* (#:key inputs #:allow-other-keys) - (mkdir-p "../ucd") - (symlink (assoc-ref inputs "unicode-blocks") "../ucd/Blocks.txt") - (symlink (assoc-ref inputs "unicode-nameslist") "../ucd/NamesList.txt") - #t)) (add-after 'unpack 'patch-python-target-directories (lambda* (#:key outputs #:allow-other-keys) (let ((root (string-append (assoc-ref outputs "out") @@ -148,20 +153,9 @@ (native-inputs `(("glib" ,glib "bin") ; for glib-genmarshal ("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler - - ;; XXX TODO: Move Unicode data to its own (versioned) package. - ("unicode-nameslist" - ,(origin - (method url-fetch) - (uri "https://www.unicode.org/Public/12.0.0/ucd/NamesList.txt") - (sha256 - (base32 "0vsq8gx7hws8mvxy3nlglpwxw7ky57q0fs09d7w9xgb2ylk7fz61")))) - ("unicode-blocks" - ,(origin - (method url-fetch) - (uri "https://www.unicode.org/Public/12.0.0/ucd/Blocks.txt") - (sha256 - (base32 "041sk54v6rjzb23b9x7yjdwzdp2wc7gvfz7ybavgg4gbh51wm8x1")))) + ("ucd" ,ucd) + ("unicode-emoji" ,unicode-emoji) + ("unicode-cldr-common" ,unicode-cldr-common) ("vala" ,vala) ("pkg-config" ,pkg-config))) (native-search-paths @@ -668,6 +662,13 @@ Method Engine.") (assoc-ref inputs "rime-data") "/share/rime-data\"\n"))) #t)) + (add-after 'unpack 'fix-file-names + (lambda* (#:key outputs #:allow-other-keys) + ;; IBus uses the component file rime.xml to start the Rime + ;; engine. It must be patched with appropriate file names. + (substitute* "rime.xml" + (("/usr") (assoc-ref outputs "out"))) + #t)) (delete 'configure)))) (inputs `(("gdk-pixbuf" ,gdk-pixbuf) @@ -688,3 +689,67 @@ input methods as well as those for Chinese dialects. It has the ability to compose phrases and sentences intelligently and provide very accurate traditional Chinese output.") (license gpl3+))) + +(define-public libhangul + (package + (name "libhangul") + (version "0.1.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://kldp.net/hangul/release/" + "3442-libhangul-" version ".tar.gz")) + (sha256 + (base32 + "0ni9b0v70wkm0116na7ghv03pgxsfpfszhgyj3hld3bxamfal1ar")))) + (build-system gnu-build-system) + (home-page "https://github.com/libhangul/libhangul") + (synopsis "Library to support hangul input method logic") + (description + "This package provides a library to support hangul input method logic, +hanja dictionary and small hangul character classification.") + (license lgpl2.1+))) + +(define-public ibus-libhangul + (package + (name "ibus-libhangul") + (version "1.5.3") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/libhangul/ibus-hangul/" + "releases/download/" version + "/ibus-hangul-" version ".tar.gz")) + (sha256 + (base32 + "1400ba2p34vr9q285lqvjm73f6m677cgfdymmjpiwyrjgbbiqrjy")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (wrap-program (string-append (assoc-ref outputs "out") + "/libexec/ibus-setup-hangul") + `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))) + `("LD_LIBRARY_PATH" ":" prefix + (,(string-append (assoc-ref inputs "libhangul") "/lib"))) + `("GI_TYPELIB_PATH" ":" prefix + (,(getenv "GI_TYPELIB_PATH")))) + #t))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin"))) + (inputs + `(("ibus" ,ibus) + ("glib" ,glib) + ("python-pygobject" ,python-pygobject) + ("gtk+" ,gtk+) + ("libhangul" ,libhangul) + ("python" ,python))) + (home-page "https://github.com/libhangul/ibus-hangul") + (synopsis "Hangul engine for IBus") + (description + "ibus-hangul is a Korean input method engine for IBus.") + (license gpl2+)))