From bfbf7516fd4f7ae32fba8cbfeaf906c6a92fcfa1 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sun, 3 Apr 2016 16:31:08 -0700 Subject: [PATCH 2/2] gnu: Add ibus-anthy. * gnu/packages/ibus.scm (ibus-anthy): New variable. --- gnu/packages/ibus.scm | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm index 770d7ff..2b791d9 100644 --- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Ricardo Wurmus ;;; Copyright © 2015 Andreas Enge +;;; Copyright © 2016 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -205,3 +206,86 @@ ZhuYin (Bopomofo) input method based on libpinyin for IBus.") Chinese pinyin input methods.") (home-page "https://github.com/libpinyin/libpinyin") (license gpl2+))) + +(define-public ibus-anthy + (package + (name "ibus-anthy") + (version "1.5.8") + (source (origin + (method url-fetch) + (uri + (string-append + "https://github.com/ibus/ibus-anthy/releases/download/" + version "/ibus-anthy-" version ".tar.gz")) + (sha256 + (base32 + "1aj7vnfky7izl23xyjky78z3qas3q72l3kr8dnql2lnivsrb8q1y")))) + (build-system gnu-build-system) + (native-inputs + `(("gettext" ,gnu-gettext) + ("libtool" ,libtool) + ("automake" ,automake) + ("autoconf" ,autoconf) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config) + ("glib" ,glib) + ("gobject-introspection" ,gobject-introspection) + ("pygobject" ,python-pygobject) + ("python" ,python))) + (inputs + `(("ibus" ,ibus) + ("anthy" ,anthy))) + (arguments + ;; The ibus-anthy source contains a script called "autogen.sh" + ;; which invokes the autotools, and then runs the configure + ;; script with some specific CFLAGS/CXXFLAGS. We could invoke + ;; "autogen.sh" before running the gnu-build-system's 'configure + ;; phase; however, that would cause the configure script to be + ;; run twice. It would also remove the extra CFLAGS/CXXFLAGS + ;; that "autogen.sh" wants to add when invoking the configure + ;; script. The following code mimics the behavior of + ;; "autogen.sh" so that the configure script will be invoked only + ;; once, and with the right flags. + '(#:configure-flags (list (string-append "CFLAGS=" + "-Wall " + "-Werror " + "-Wformat " + "-Werror=format-security") + (string-append "CXXFLAGS=" + "-Wall " + "-Werror " + "-Wformat " + "-Werror=format-security")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'autogen + (lambda _ + (and (zero? (system* "autopoint" + "--force")) + (zero? (system* "libtoolize" + "--automake" + "--copy" + "--force")) + (zero? (system* "intltoolize" + "--copy" + "--force")) + (zero? (system* "aclocal" + "-I" + "m4" + "--force")) + (zero? (system* "autoheader" + "--force")) + (zero? (system* "automake" + "--add-missing" + "--copy" + "--force")) + (zero? (system* "autoconf" + "--force")) + )))))) + (synopsis "Anthy Japanese language input method for IBus") + (description "IBus-Anthy is an engine for the input bus \"IBus\"). It +adds the Anthy Japanese language input method to IBus. Because most graphical +applications allow text input via IBus, installing this package will enable +Japanese language input in most graphical applications.") + (home-page "https://github.com/fujiwarat/ibus-anthy") + (license gpl2))) -- 2.7.3