On 2020-01-18 13:16:58, Omar Polo <o...@xglobe.in> wrote:
> Hi,
> 
> On Thu, Jan 09, 2020 at 11:34:34PM +0900, Bryan Linton wrote:
> > Hello ports@
> > 
> > I was attempting to make some changes to inputmethods/anthy for
> > another purpose when I noticed it was woefully out of date.
> > 
> > Version 9100h was released in 2009.  Version 0.4 was released six
> > months ago (in 2019).
> > 
> > [snip]
> > 
> > Concerns:
> > 
> > * I have not tested the emacs module because I do not use emacs.  I
> > have however tested it in Firefox, leafpad, a Japanized xterm, and
> > editors/nvi running in said Japanized xterm.  More testing would
> > be appreciated though.
> 
> Thanks for working on this!  It compiles here, but I cannot judge
> the quality of the patch. Some comments after a bit of testing with
> inputmethod/uim:
>

Hello, thank you for testing!  Some comments follow inline.

>  - firefox (and possibly other programs) need some directories to
>    be unveiled [0]. 
>

Yes, I was the one who sent that email too :)

It's not specific to this update though.  Even the old version of
anthy would need those directories unveiled.

I have another update to anthy that switches it to using a common
directory in line with what Theo suggested later in that thread.  But
I wanted to hopefully get this update in-tree before going forward
with that.

>  - with gajim (gtk3) and emacs (gtk3) works as expected
>

Great, thanks!  This was the one use-case I couldn't test myself
since I don't use emacs.

>  - xterm and emacs (compiled with the lucid toolkit) sort of.  While
>    typing, the characters are displayed as rectangles (similarly
>    to when a font is missing), but after pressing enter the whole
>    word is displayed properly.  Also, the selection box does not
>    appear in these programs (but these probably are issues with uim
>    rather than anthy.)
> 

Yes, this definitely sounds like a uim issue.  To be clear, is
this a regression?  I.e. Did this work OK before, but broke with
this update?

Also as a follow-up, can you check whether you're using the
"Anthy" or the "Anthy (UTF-8)" input method in UIM?  If it's the
former, does it fix this if you switch it to UTF-8?

As I mentioned in the initial email, the internals of anthy have
switched to be completely UTF-8.  If you're using the old input
method, does switching to "Anthy (UTF-8)" in uim fix this?

Failing that, does running xterm with the script I've pasted in
below fix this?

> (note that I used emacs with the x input method, just like with
> firefox and gajim, not with uim.el)
> 
> With ibus the situation is a bit different: it recognize anthy, but
> it does not seems to work.  You can switch the input method, but
> nothing more.  Again, this might be simply a problem with ibus
> and/or my setup.
> 

I saw your followup email that this works OK, which is good to
know!

> P.S. I'm curious, what do you mean with "japanized xterm"?
> 

I use the following script to launch xterm when I want to use
Japanese in it.  I'm not sure if the line running uim-xim is
needed anymore, since I now launch uim from my .xsession file, but
the second line sets the locale to Japanese and changes the font
to a Japanese one.

---------8<---------
% cat bin/jxterm.sh
#!/bin/sh

env LC_CTYPE=ja_JP.UTF-8 uim-xim &
env LC_ALL=ja_JP.UTF-8 xterm -fa "Sazanami Gothic" -fs 16 $1

# Keep messages in English
#env LANG=ja_JP.UTF-8 LC_MESSAGES=en_US.UTF-8 xterm -fa "Sazanami Gothic" -fs 16

---------8<---------

This not only lets me see Japanese text displayed in xterm, but
sets any programs I run in it to be "Japanese" for lack of a
better way of explaining it.

I.e. in a normal xterm, when I run mutt the top line is:
        q:Quit  d:Del  u:Undel  s:Save  m:Mail  r:Reply  g:Group ?:Help

However when I run it in a "Japanized" xterm (with LC_ALL set to
Japanese), the top line is instead:
        q:中止  d:削除 u:削除を取り消し s:保存 m:メール r:返信 g:全員に返信 ?:ヘルプ
and all other messages are displayed in Japanese instead of
English.

The third line would retain messages in English instead of
localizing them as above.

Anyway, thank you again for testing!

-- 
Bryan


> [0] https://marc.info/?l=openbsd-ports&m=157811336612326&w=2
> 
> > * The IM I use on top of anthy (inputmethods/uim) produced utter
> > gibberish until I realized that I needed to switch it from "Anthy"
> > to "Anthy (UTF-8).  A note in current.html like the attached
> > should probably be added so that users have a smoother upgrade
> > path.
> > 
> > 
> > Please let me know if I can make any other improvements to the port.
> > 
> > Thank you!
> > 
> > -- 
> > Bryan
> > 
> 
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/inputmethods/anthy/Makefile,v
> > retrieving revision 1.25
> > diff -u -r1.25 Makefile
> > --- Makefile        12 Jul 2019 20:47:12 -0000      1.25
> > +++ Makefile        9 Jan 2020 14:25:29 -0000
> > @@ -3,8 +3,9 @@
> >  COMMENT-main =     japanese input method
> >  COMMENT-emacs =    emacs files for anthy
> >  
> > -V =                9100h
> > +V =                0.4
> >  DISTNAME = anthy-$V
> > +DISTFILES =        anthy_$V.orig.tar.gz
> >  PKGNAME-main =     anthy-$V
> >  PKGNAME-emacs =    emacs-anthy-$V
> >  REVISION-main = 2
> > @@ -16,14 +17,14 @@
> >  
> >  CATEGORIES =       inputmethods japanese
> >  
> > -HOMEPAGE =         https://anthy.osdn.jp/
> > +HOMEPAGE =         https://wiki.debian.org/Teams/DebianAnthy
> >  
> > -# GPL, part LGPL
> > +# GPLv3, parts are LGPLv3 and/or LGPLv2+
> >  PERMIT_PACKAGE =   Yes
> >  
> >  WANTLIB-main =     c m
> >  
> > -MASTER_SITES =     ${MASTER_SITE_OSDN_JP:=anthy/37536/}
> > +MASTER_SITES =     http://deb.debian.org/debian/pool/main/a/anthy/
> >  
> >  FAKE_FLAGS =       sysconfdir=$(PREFIX)/share/examples/anthy
> >  
> > Index: distinfo
> > ===================================================================
> > RCS file: /cvs/ports/inputmethods/anthy/distinfo,v
> > retrieving revision 1.5
> > diff -u -r1.5 distinfo
> > --- distinfo        18 Jan 2015 03:14:16 -0000      1.5
> > +++ distinfo        9 Jan 2020 14:25:29 -0000
> > @@ -1,2 +1,2 @@
> > -SHA256 (anthy-9100h.tar.gz) = 0lbwdfAYtKPLDRZe1hUf2kun2xYhcn4OtUVptuInVUc=
> > -SIZE (anthy-9100h.tar.gz) = 4446148
> > +SHA256 (anthy_0.4.orig.tar.gz) = 
> > /fWQvupwk/Myex7udgE+STbkxmWefMAd0f3W5vLpyfc=
> > +SIZE (anthy_0.4.orig.tar.gz) = 5619024
> > Index: patches/patch-src-util_anthy_el
> > ===================================================================
> > RCS file: patches/patch-src-util_anthy_el
> > diff -N patches/patch-src-util_anthy_el
> > --- patches/patch-src-util_anthy_el 7 Dec 2013 23:42:04 -0000       1.1
> > +++ /dev/null       1 Jan 1970 00:00:00 -0000
> > @@ -1,12 +0,0 @@
> > -$OpenBSD: patch-src-util_anthy_el,v 1.1 2013/12/07 23:42:04 yasuoka Exp $
> > ---- src-util/anthy.el.orig Sat Nov 30 10:40:43 2013
> > -+++ src-util/anthy.el      Sat Nov 30 10:40:55 2013
> > -@@ -892,7 +892,7 @@
> > -    ((event-matches-key-specifier-p event 'backspace) 8)
> > -    (t
> > -     (char-to-int (event-to-character event)))))
> > --    last-command-char))
> > -+    last-command-event))
> > - 
> > - ;;
> > - ;;
> > Index: pkg/PLIST-main
> > ===================================================================
> > RCS file: /cvs/ports/inputmethods/anthy/pkg/PLIST-main,v
> > retrieving revision 1.5
> > diff -u -r1.5 PLIST-main
> > --- pkg/PLIST-main  22 May 2015 11:31:16 -0000      1.5
> > +++ pkg/PLIST-main  9 Jan 2020 14:25:29 -0000
> > @@ -2,18 +2,17 @@
> >  @pkgpath inputmethods/anthy
> >  @bin bin/anthy-agent
> >  @bin bin/anthy-dic-tool
> > -@bin bin/anthy-morphological-analyzer
> >  include/anthy/
> >  include/anthy/anthy.h
> >  include/anthy/dicutil.h
> >  include/anthy/input.h
> > -lib/libanthy.a
> > +@static-lib lib/libanthy.a
> >  lib/libanthy.la
> >  @lib lib/libanthy.so.${LIBanthy_VERSION}
> > -lib/libanthydic.a
> > +@static-lib lib/libanthydic.a
> >  lib/libanthydic.la
> >  @lib lib/libanthydic.so.${LIBanthydic_VERSION}
> > -lib/libanthyinput.a
> > +@static-lib lib/libanthyinput.a
> >  lib/libanthyinput.la
> >  @lib lib/libanthyinput.so.${LIBanthyinput_VERSION}
> >  lib/pkgconfig/anthy.pc
> 
> > Index: current.html
> > ===================================================================
> > RCS file: /cvs/www/faq/current.html,v
> > retrieving revision 1.1017
> > diff -u -r1.1017 current.html
> > --- current.html    31 Dec 2019 02:18:01 -0000      1.1017
> > +++ current.html    9 Jan 2020 14:10:22 -0000
> > @@ -136,6 +136,18 @@
> >  --></pre>
> >  
> >  
> > +<h3 id="r20200110">2020/01/10 - [ports] anthy updated to 0.4</h3>
> > +
> > +inputmethods/anthy was updated from version 9100h to 0.4.
> > +All internal functions and dictionaries have been switched to use UTF-8 by 
> > +default.
> > +As such, you may need to switch your IM from using "Anthy" to "Anthy 
> > (UTF-8)".
> > +Users of UIM can run "uim-pref-gtk" and adjust the "Default input
> > +method" to use Anthy (UTF-8).
> > +Users of other input methods should consult the documentation of
> > +their chosen IM on how to accomplish the above.
> > +
> > +
> >  <!--
> >       Two blank lines before new sections.
> >       New sentences start on new lines.
> 
> 

Reply via email to