From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Typing on GuixSD in languages other than English Date: Sun, 03 Apr 2016 17:26:48 -0700 Message-ID: <87r3emrzg7.fsf@gmail.com> References: <87k2kf65n6.fsf@gmail.com> <87lh4vbj6h.fsf@member.fsf.org> <874mbjl41d.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amsM9-0000HO-NI for help-guix@gnu.org; Sun, 03 Apr 2016 20:27:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amsM6-0006cZ-DG for help-guix@gnu.org; Sun, 03 Apr 2016 20:27:01 -0400 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:34579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amsM5-0006cS-Vk for help-guix@gnu.org; Sun, 03 Apr 2016 20:26:58 -0400 Received: by mail-pa0-x22f.google.com with SMTP id fe3so131776187pab.1 for ; Sun, 03 Apr 2016 17:26:57 -0700 (PDT) In-Reply-To: <874mbjl41d.fsf@gmail.com> (Chris Marusich's message of "Sat, 02 Apr 2016 21:17:18 -0700") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org To: =?utf-8?B?5a6L5paH5q2m?= Cc: help-guix@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Chris Marusich writes: > iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) writes: > >> Chris Marusich writes: >> >>> Hi, >>> >>> I'm using GuixSD v0.10.0 with GNOME. I'd like to be able to type in >>> Japanese. I can already display Japanese text without issue because >>> I've installed fonts that contain Japanese characters; however, I cannot >>> figure out how to enable Japanese input. >>> >>> In the past, I've done this for other GNU/Linux distributions. I recall >>> that the process was a little complicated. Has anyone set up Japanese >>> language (or any other non-English) input for GuixSD? I'm going to look >>> into this regardless, but if someone has already jumped through the >>> hoops, I'd love to hear about how you did it. >> There're fcitx and ibus as input method frameworks, I think we just need >> to package anthy, ibus-anthy and fcitx-anthy. > > Thanks for confirming that the necessary work hasn't been done yet. > Those package names sound familiar. I'll see if I can get any of them > packaged and working! Thanks. The attached patches add anthy and ibus-anthy. They build OK. However, Japanese input is not yet working for me. In fact, ibus itself does not seem to be working at all. How can I verify that ibus is working on its own? I've tried installing ibus by itself into my profile. When I do this, I can run ibus-setup, and I see a "Japanese" language input option. This is true even when anthy and ibus-anthy are not installed, which surprised me. I had expected to find no Japanese language input options at all in ibus-setup when anthy and ibus-anthy are not installed. In GNOME, there is no ibus menu visible anywhere on my screen, so it is unclear whether ibus is actually working. When I open Gedit and press +Space, my input method does not seem to change. According to ibus-setup, this hotkey should change my input method. However, it seems like ibus is just not working at all. =2D-=20 Chris --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-anthy.patch Content-Transfer-Encoding: quoted-printable From=20ae9b267859d224930d06ec0fba70444aacd0ed87 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sun, 3 Apr 2016 16:29:56 -0700 Subject: [PATCH 1/2] gnu: Add anthy. * gnu/packages/anthy.scm: New file. * gnu-system.am: Add it. =2D-- gnu-system.am | 2 ++ gnu/packages/anthy.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 67 insertions(+) create mode 100644 gnu/packages/anthy.scm diff --git a/gnu-system.am b/gnu-system.am index d883cdc..91dce0f 100644 =2D-- a/gnu-system.am +++ b/gnu-system.am @@ -3,6 +3,7 @@ # Copyright =C2=A9 2013, 2014, 2015, 2016 Andreas Enge # Copyright =C2=A9 2016 Mathieu Lirzin # Copyright =C2=A9 2013, 2014, 2015, 2016 Mark H Weaver +# Copyright =C2=A9 2016 Chris Marusich # # This file is part of GNU Guix. # @@ -35,6 +36,7 @@ GNU_SYSTEM_MODULES =3D \ gnu/packages/algebra.scm \ gnu/packages/aidc.scm \ gnu/packages/animation.scm \ + gnu/packages/anthy.scm \ gnu/packages/apl.scm \ gnu/packages/apr.scm \ gnu/packages/asciidoc.scm \ diff --git a/gnu/packages/anthy.scm b/gnu/packages/anthy.scm new file mode 100644 index 0000000..f17cb45 =2D-- /dev/null +++ b/gnu/packages/anthy.scm @@ -0,0 +1,65 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2016 Chris Marusich +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages anthy) + #:use-module (guix licenses) + #:use-module (guix utils) + #:use-module (guix packages) + #:use-module (gnu packages emacs) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public anthy + (package + (name "anthy") + (version "9100h") + (source (origin + (method url-fetch) + ;; The URI does not appear to be easily guessable. For + ;; example, you cannot download version "9100g" simply + ;; by replacing "9100h" in the URI. + (uri "http://tcpdiag.dl.osdn.jp/anthy/37536/anthy-9100h.tar.= gz") + (sha256 + (base32 + "0ism4zibcsa5nl77wwi12vdsfjys3waxcphn1p5s7d0qy1sz0mnj")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check (lambda _ + (with-directory-excursion "test" + (zero? (system* "./anthy" "--all")))))))) + ;; Anthy also contains elisp modules for using anthy within Emacs. + ;; However, these modules are incompatible with the latest version + ;; of Emacs. This is because they rely on the presence of + ;; last-command-char, which was removed in Emacs 24.3. So, we + ;; don't try to install them here at this time. + (description "Anthy is a Japanese input method for converting +hiragana text to mixed kana and kanji. It is written in the C +programming language. Anthy stores personal customizations (words it +has learned from the user's input, words the user has explicitly +added, etc.) in the ~/.anthy/ directory. This package contains the +anthy C libraries, the cannadic and alt-cannadic kana dictionaries, as +well as command-line tools for using anthy and managing +dictionaries.") + (synopsis "Japanese input method") + (home-page "http://anthy.osdn.jp/") + ;; Most of anthy is lgpl2.1. However, some files (e.g., from + ;; alt-cannadic) use gpl2. See the file "COPYING" in the anthy + ;; source for details. + (license (list lgpl2.1 gpl2)))) =2D-=20 2.7.3 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0002-gnu-Add-ibus-anthy.patch Content-Transfer-Encoding: quoted-printable From=20bfbf7516fd4f7ae32fba8cbfeaf906c6a92fcfa1 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. =2D-- 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 =2D-- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 Ricardo Wurmus ;;; Copyright =C2=A9 2015 Andreas Enge +;;; Copyright =C2=A9 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=3D" + "-Wall " + "-Werror " + "-Wformat " + "-Werror=3Dformat-security") + (string-append "CXXFLAGS=3D" + "-Wall " + "-Werror " + "-Wformat " + "-Werror=3Dformat-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 graph= ical +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))) =2D-=20 2.7.3 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXAbTLAAoJEN1AmhXYIkadwnQP/RhZBYLYhwTKdD5IWJm0led6 jnqIftGqAfLKQQ30w8TaTZZ+jYT6EX+Yv2kbRbxJH6LF/XmQxzZH7IdkXm0Tgb/3 f6Bk8SZ72b5iHXwLumYw5mutKHYOlP4zSDiimNV8agTqst+ei8ETwG5da55iV39S VobtvQRxDtNHpCq0S9AFqR81Q0ZudCU97gcFU1n2xK7vmssBPsIAZ5WZn654JON6 qblQifzA1SYKNetdi41rw+7jBbBnwbqtSQYP0DiRYY+MvPqOyI5cb/AlMi0lC5Xl mX5Jw+1Fl5WLU5bwy++4mAX+QkaNPV+NplpvNp9T6AM+08Q49+CppseswzKULxbh JzDrFRTacFNbH5pb/tSy8h6mzPR/7EYdLjEC/3DrDtkoAlx14sGB1L6MTkLV++Q8 yXgb5bpNFXbLxndKunqoSTiysVLvvkMoZxyWw3H45pUCkyflVggKHJT7XsJ9a2IR GZVAunXgEwAi6DyP0TxLlNgIOkGlBptpfHYUSzU3mEd6g30RvIJvGjOjzT3m3h/0 PXBCWYraEI76PJ3iHNYa4IPhAdbcVTbAoXet8+zSUOabQEmDQAGYOgoDxZtGPdWC O5E4zNsCUmXGr5xVIp0ERIpVEB+XOVAI4JscOMZi5E0PJ3iha2iUiFhOtJZ85xcc G0emB8qBA/SYixCZvXA+ =tjeC -----END PGP SIGNATURE----- --==-=-=--