From: Chris Marusich <cmmarusich@gmail.com>
To: 宋文武 <iyzsong@member.fsf.org>
Cc: help-guix@gnu.org
Subject: Re: Typing on GuixSD in languages other than English
Date: Sun, 03 Apr 2016 17:26:48 -0700 [thread overview]
Message-ID: <87r3emrzg7.fsf@gmail.com> (raw)
In-Reply-To: <874mbjl41d.fsf@gmail.com> (Chris Marusich's message of "Sat, 02 Apr 2016 21:17:18 -0700")
[-- Attachment #1.1: Type: text/plain, Size: 2038 bytes --]
Chris Marusich <cmmarusich@gmail.com> writes:
> iyzsong@member.fsf.org (宋文武) writes:
>
>> Chris Marusich <cmmarusich@gmail.com> 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
<Super>+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.
--
Chris
[-- Attachment #1.2: 0001-gnu-Add-anthy.patch --]
[-- Type: text/x-patch, Size: 4374 bytes --]
From ae9b267859d224930d06ec0fba70444aacd0ed87 Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
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.
---
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
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -3,6 +3,7 @@
# Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2013, 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
+# Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
#
# This file is part of GNU Guix.
#
@@ -35,6 +36,7 @@ GNU_SYSTEM_MODULES = \
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
--- /dev/null
+++ b/gnu/packages/anthy.scm
@@ -0,0 +1,65 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
+;;;
+;;; 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 <http://www.gnu.org/licenses/>.
+
+(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))))
--
2.7.3
[-- Attachment #1.3: 0002-gnu-Add-ibus-anthy.patch --]
[-- Type: text/x-patch, Size: 5073 bytes --]
From bfbf7516fd4f7ae32fba8cbfeaf906c6a92fcfa1 Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
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 <rekado@elephly.net>
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2016-04-04 0:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-02 21:51 Typing on GuixSD in languages other than English Chris Marusich
2016-04-03 1:00 ` 宋文武
2016-04-03 4:17 ` Chris Marusich
2016-04-04 0:26 ` Chris Marusich [this message]
2016-04-04 2:26 ` Luis Felipe López Acevedo
2016-04-04 5:37 ` Chris Marusich
2016-04-04 14:36 ` Luis Felipe López Acevedo
2016-04-09 1:41 ` 宋文武
2016-04-09 19:38 ` Chris Marusich
2016-04-10 9:47 ` 宋文武
2016-04-13 1:48 ` Chris Marusich
2016-04-17 8:26 ` Chris Marusich
2016-04-18 7:27 ` Ricardo Wurmus
2016-04-04 20:10 ` Ricardo Wurmus
2016-04-05 6:48 ` Chris Marusich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r3emrzg7.fsf@gmail.com \
--to=cmmarusich@gmail.com \
--cc=help-guix@gnu.org \
--cc=iyzsong@member.fsf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).