Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-02-26 Thread Bryan Linton
3-week ping.

Patch re-attached for convenience.

It updates anthy from a decade-old release to one released from
last year.

In brief:

o Update anthy to newer version.
o Update master site.
o Update licence markers.
o Remove unneeded patch.
o Fix typo in DESCR.
o Users may need to switch uim to use UTF-8 because of
internal changes in anthy.

Any users who type in Japanese are encouraged to test.

Please let me know if any issues or regressions are spotted.

Thank you.

-- 
Bryan

On 2020-02-03 18:06:16, Bryan Linton  wrote:
> Ping.
> 
> I know there are likely not many people on ports@ who use this
> port, and it would have an impact on all users who use Japanese
> input if anything went wrong with it.  Both of which would suggest
> it get wider testing before being committed,
> 
> But because of the somewhat niche nature of this port, I'm not
> sure how to get wider testing.
> 
> If there's any way I can help move forward with this, please let
> me know.
> 
> I have another diff to anthy which changes its config directory to
> help with unveil(2) and Firefox compatibility, but I'd rather not
> combine an update to a 10-year-newer version with one that also
> makes changes to its internals like this.
> 
> However, if it would be preferred to do both at once, I can send a
> diff containing both the update and the config directory changes
> as well.
> 
> Previous diff re-attached for convenience.
> 
> -- 
> Bryan
> 
> On 2020-01-23 21:05:58, Bryan Linton  wrote:
> > On 2020-01-20 16:20:00, Omar Polo  wrote:
> > > Bryan, sorry for the double email, as always I forgot to CC ports.
> > > 
> > > On Sun, Jan 19, 2020 at 10:48:18AM +0900, Bryan Linton wrote:
> > > > On 2020-01-18 13:16:58, Omar Polo  wrote:
> > > > > Hi,
> > > > > 
> > > > > 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:
> > > > >
> > > 
> > > Another thing that I've noticed, the description for anthy says
> > > 
> > >   With its complement package anthy-emacs, [...]
> > > 
> > > but here the package is emacs-anthy:
> > > 
> > >   $ pkg_info | grep emacs-anthy
> > >   emacs-anthy-0.4p4   emacs files for anthy
> > > 
> > > (patch below)
> > > 
> > 
> > Good catch!  Updated version of port attached.
> > 
> > -- 
> > Bryan
> > 
> 

Index: Makefile
===
RCS file: /cvs/ports/inputmethods/anthy/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile12 Jul 2019 20:47:12 -  1.25
+++ Makefile21 Jan 2020 11:23:17 -
@@ -3,12 +3,14 @@
 COMMENT-main = japanese input method
 COMMENT-emacs =emacs files for anthy
 
-V =9100h
-DISTNAME = anthy-$V
+V =0.4
+DISTNAME = anthy_$V.orig
+WRKDIST =  ${WRKDIR}/anthy-$V
 PKGNAME-main = anthy-$V
 PKGNAME-emacs =emacs-anthy-$V
-REVISION-main = 2
-REVISION-emacs = 4
+REVISION-main = 0
+REVISION-emacs = 0
+EPOCH =0
 
 SHARED_LIBS += anthydic 1.0  # .1.0
 SHARED_LIBS += anthy1.0  # .1.0
@@ -16,14 +18,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
--- distinfo18 Jan 2015 03:14:16 -  1.5
+++ distinfo21 Jan 2020 11:23:17 -
@@ -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 -   1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -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/DESCR-main
===
RCS file: 

Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-02-03 Thread Bryan Linton
Ping.

I know there are likely not many people on ports@ who use this
port, and it would have an impact on all users who use Japanese
input if anything went wrong with it.  Both of which would suggest
it get wider testing before being committed,

But because of the somewhat niche nature of this port, I'm not
sure how to get wider testing.

If there's any way I can help move forward with this, please let
me know.

I have another diff to anthy which changes its config directory to
help with unveil(2) and Firefox compatibility, but I'd rather not
combine an update to a 10-year-newer version with one that also
makes changes to its internals like this.

However, if it would be preferred to do both at once, I can send a
diff containing both the update and the config directory changes
as well.

Previous diff re-attached for convenience.

-- 
Bryan

On 2020-01-23 21:05:58, Bryan Linton  wrote:
> On 2020-01-20 16:20:00, Omar Polo  wrote:
> > Bryan, sorry for the double email, as always I forgot to CC ports.
> > 
> > On Sun, Jan 19, 2020 at 10:48:18AM +0900, Bryan Linton wrote:
> > > On 2020-01-18 13:16:58, Omar Polo  wrote:
> > > > Hi,
> > > > 
> > > > 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:
> > > >
> > 
> > Another thing that I've noticed, the description for anthy says
> > 
> > With its complement package anthy-emacs, [...]
> > 
> > but here the package is emacs-anthy:
> > 
> > $ pkg_info | grep emacs-anthy
> > emacs-anthy-0.4p4   emacs files for anthy
> > 
> > (patch below)
> > 
> 
> Good catch!  Updated version of port attached.
> 
> -- 
> Bryan
> 

Index: Makefile
===
RCS file: /cvs/ports/inputmethods/anthy/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile12 Jul 2019 20:47:12 -  1.25
+++ Makefile21 Jan 2020 11:23:17 -
@@ -3,12 +3,14 @@
 COMMENT-main = japanese input method
 COMMENT-emacs =emacs files for anthy
 
-V =9100h
-DISTNAME = anthy-$V
+V =0.4
+DISTNAME = anthy_$V.orig
+WRKDIST =  ${WRKDIR}/anthy-$V
 PKGNAME-main = anthy-$V
 PKGNAME-emacs =emacs-anthy-$V
-REVISION-main = 2
-REVISION-emacs = 4
+REVISION-main = 0
+REVISION-emacs = 0
+EPOCH =0
 
 SHARED_LIBS += anthydic 1.0  # .1.0
 SHARED_LIBS += anthy1.0  # .1.0
@@ -16,14 +18,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
--- distinfo18 Jan 2015 03:14:16 -  1.5
+++ distinfo21 Jan 2020 11:23:17 -
@@ -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 -   1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -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/DESCR-main
===
RCS file: /cvs/ports/inputmethods/anthy/pkg/DESCR-main,v
retrieving revision 1.1
diff -u -r1.1 DESCR-main
--- pkg/DESCR-main  21 Nov 2006 00:12:40 -  1.1
+++ pkg/DESCR-main  21 Jan 2020 11:23:17 -
@@ -1,7 +1,7 @@
 Anthy is a japanese input method library that can be used
 from many setups.
 
-With its complement package anthy-emacs, it can be used with
+With its complement package emacs-anthy, it can be used with
 emacs, using the simple anthy-agent wedge for communication.
 
 It can also be accessed from uim.
Index: pkg/PLIST-main
===
RCS file: /cvs/ports/inputmethods/anthy/pkg/PLIST-main,v
retrieving revision 1.5
diff -u 

Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-23 Thread Bryan Linton
On 2020-01-20 16:20:00, Omar Polo  wrote:
> Bryan, sorry for the double email, as always I forgot to CC ports.
> 
> On Sun, Jan 19, 2020 at 10:48:18AM +0900, Bryan Linton wrote:
> > On 2020-01-18 13:16:58, Omar Polo  wrote:
> > > Hi,
> > > 
> > > 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:
> > >
> 
> Another thing that I've noticed, the description for anthy says
> 
>   With its complement package anthy-emacs, [...]
> 
> but here the package is emacs-anthy:
> 
>   $ pkg_info | grep emacs-anthy
>   emacs-anthy-0.4p4   emacs files for anthy
> 
> (patch below)
> 

Good catch!  Updated version of port attached.

-- 
Bryan

Index: Makefile
===
RCS file: /cvs/ports/inputmethods/anthy/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile12 Jul 2019 20:47:12 -  1.25
+++ Makefile21 Jan 2020 11:23:17 -
@@ -3,12 +3,14 @@
 COMMENT-main = japanese input method
 COMMENT-emacs =emacs files for anthy
 
-V =9100h
-DISTNAME = anthy-$V
+V =0.4
+DISTNAME = anthy_$V.orig
+WRKDIST =  ${WRKDIR}/anthy-$V
 PKGNAME-main = anthy-$V
 PKGNAME-emacs =emacs-anthy-$V
-REVISION-main = 2
-REVISION-emacs = 4
+REVISION-main = 0
+REVISION-emacs = 0
+EPOCH =0
 
 SHARED_LIBS += anthydic 1.0  # .1.0
 SHARED_LIBS += anthy1.0  # .1.0
@@ -16,14 +18,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
--- distinfo18 Jan 2015 03:14:16 -  1.5
+++ distinfo21 Jan 2020 11:23:17 -
@@ -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 -   1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -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/DESCR-main
===
RCS file: /cvs/ports/inputmethods/anthy/pkg/DESCR-main,v
retrieving revision 1.1
diff -u -r1.1 DESCR-main
--- pkg/DESCR-main  21 Nov 2006 00:12:40 -  1.1
+++ pkg/DESCR-main  21 Jan 2020 11:23:17 -
@@ -1,7 +1,7 @@
 Anthy is a japanese input method library that can be used
 from many setups.
 
-With its complement package anthy-emacs, it can be used with
+With its complement package emacs-anthy, it can be used with
 emacs, using the simple anthy-agent wedge for communication.
 
 It can also be accessed from uim.
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 -  1.5
+++ pkg/PLIST-main  21 Jan 2020 11:23:17 -
@@ -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


Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-20 Thread Omar Polo
Bryan, sorry for the double email, as always I forgot to CC ports.

On Sun, Jan 19, 2020 at 10:48:18AM +0900, Bryan Linton wrote:
> On 2020-01-18 13:16:58, Omar Polo  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 :)

I've realized that, but I've left the comment primarly for other
interested in testing this.

> 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.

Oh, this is great!  I'm looking forward to it.

> >  - 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?

It's not a regression, it's a problem I have with uim plus any
programs that use the native X11 input method (and I don't have
knowledge on that matter.)  I have XMODIFIERS set up as per uim
description.

Also, I'm sorry, but I've written a confusing comment.  (at the
time of the last mail) I had tested only emacs with the standard x
input method (uim in that case), because I don't have much knowledge
of "native emacs input methods" and I confused myself with anthy.el
and uim.el...

However, I've now tested anthy.el properly and I can confirm that
it's *awesome*.  The only drawbacks is that it needs LANG=ja_JP.UTF-8,
otherwise you get glibberish for some characters (i.e. "\343\200\202"
instead of "。")

Another thing that I've noticed, the description for anthy says

With its complement package anthy-emacs, [...]

but here the package is emacs-anthy:

$ pkg_info | grep emacs-anthy
emacs-anthy-0.4p4   emacs files for anthy

(patch below)

> 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?

Ups, I didn't mentioned in the mail, but I have only used "Anthy
(UTF-8)", since I got strange (for the lack of a better term) input
with "Anthy" (non utf8) too.  I have installed anthy to test your
patch (I was procastinating installing an input method for japanese.)

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

Unfortunately not.  I've also installed the font you are using,
without success.

> snip...

So, to recap, anthy.el works, firefox and iridium too, and I have
only an issue with uim that's not a regression.  

Cheers!

-- 
/Omar Polo

--- pkg/DESCR-main.orig Tue Nov 21 01:12:40 2006
+++ pkg/DESCR-main  Mon Jan 20 14:38:51 2020
@@ -1,7 +1,7 @@
 Anthy is a japanese input method library that can be used
 from many setups.
 
-With its complement package anthy-emacs, it can be used with
+With its complement package emacs-anthy, it can be used with
 emacs, using the simple anthy-agent wedge for communication.
 
 It can also be accessed from uim.



Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-20 Thread Bryan Linton
On 2020-01-19 14:16:34, Stuart Henderson  wrote:
> On 2020/01/09 23:34, 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.
> > 
> > [...]
> >
> > Questions:
> 
> I've not otherwise looked at it, but answering questions:
> 
> > * Is setting "DISTFILES = anthy_$V.orig.tar.gz" the best way to cope
> > with the naming of the tarball?
> 
> This is better:
> 
> V = 0.4
> DISTNAME =  anthy_$V.orig
> WRKDIST =   ${WRKDIR}/anthy-$V
> 
> > * Does the version changing from 9100h to 0.4 require setting EPOCH?
> > It seems to have updated fine on my system, but I don't know the
> > details of when EPOCH is needed.
> 
> Yes. EPOCH is needed whenever the version number goes "backwards"
> according to packages-specs(7) format.
> 

Thanks for the tips.  Updated patch attached.

Changes from previous patch
===
* Add EPOCH to cope with version change (9100h -> 0.4)

* Use DISTNAME and WRKDIST instead of DISTFILES.

-- 
Bryan

Index: Makefile
===
RCS file: /cvs/ports/inputmethods/anthy/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile12 Jul 2019 20:47:12 -  1.25
+++ Makefile20 Jan 2020 10:24:51 -
@@ -3,12 +3,14 @@
 COMMENT-main = japanese input method
 COMMENT-emacs =emacs files for anthy
 
-V =9100h
-DISTNAME = anthy-$V
+V =0.4
+DISTNAME = anthy_$V.orig
+WRKDIST =  ${WRKDIR}/anthy-$V
 PKGNAME-main = anthy-$V
 PKGNAME-emacs =emacs-anthy-$V
-REVISION-main = 2
-REVISION-emacs = 4
+REVISION-main = 0
+REVISION-emacs = 0
+EPOCH =0
 
 SHARED_LIBS += anthydic 1.0  # .1.0
 SHARED_LIBS += anthy1.0  # .1.0
@@ -16,14 +18,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
--- distinfo18 Jan 2015 03:14:16 -  1.5
+++ distinfo20 Jan 2020 10:24:51 -
@@ -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 -   1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -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 -  1.5
+++ pkg/PLIST-main  20 Jan 2020 10:24:51 -
@@ -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


Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-19 Thread Stuart Henderson
On 2020/01/09 23:34, 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).
> 
> 
> Notable changes to the port:
> 
> * Old upstream is dead (no updates to website since 2004).  Switch
> to the Debian Anthy team since they have become the new upstream.
> 
> * Update licence marker to show it's now a mix of GPLv3, LGPLv3,
> and LGPLv2.
> 
> * Remove unneeded patch.
> 
> * All internal functions and dictionaries have been switched to
> use UTF-8 by default (instead of EUC-JP).  Users must switch their
> IMs to use the UTF-8 version of Anthy or they will produce only
> gibberish on output.
> 
> 
> Questions:

I've not otherwise looked at it, but answering questions:

> * Is setting "DISTFILES = anthy_$V.orig.tar.gz" the best way to cope
> with the naming of the tarball?

This is better:

V = 0.4
DISTNAME =  anthy_$V.orig
WRKDIST =   ${WRKDIR}/anthy-$V

> * Does the version changing from 9100h to 0.4 require setting EPOCH?
> It seems to have updated fine on my system, but I don't know the
> details of when EPOCH is needed.

Yes. EPOCH is needed whenever the version number goes "backwards"
according to packages-specs(7) format.



Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-18 Thread Bryan Linton
On 2020-01-18 13:16:58, Omar Polo  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=157811336612326=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
> > --- Makefile12 Jul 2019 20:47:12 -  1.25
> > +++ Makefile9 Jan 2020 14:25:29 -
> > @@ -3,8 +3,9 @@
> >  COMMENT-main = japanese input method
> >  

Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-18 Thread Omar Polo
On Sat, Jan 18, 2020 at 01:16:58PM +0100, Omar Polo 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:
>  - firefox (and possibly other programs) need some directories to
>be unveiled [0]. 
>  - with gajim (gtk3) and emacs (gtk3) works as expected
>  - 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.)
> 
> (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.

Sorry for the follow up, but it seems that anthy works ibus too.
I just find out by accident that in inside inkscape I'm able to
fully use ibus+anthy.  The reason why on xterm, gajim and emacs
(gtk3) ibus doesn't seem to work must be something really specific
to my setup and not the anthy update.

cheers!

> P.S. I'm curious, what do you mean with "japanized xterm"?
> 
> [0] https://marc.info/?l=openbsd-ports=157811336612326=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
> > --- Makefile12 Jul 2019 20:47:12 -  1.25
> > +++ Makefile9 Jan 2020 14:25:29 -
> > @@ -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
> > --- distinfo18 Jan 2015 03:14:16 -  1.5
> > +++ distinfo9 Jan 2020 14:25:29 -
> > @@ -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 -   1.1
> > +++ /dev/null   1 Jan 1970 00:00:00 -
> > @@ -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 

Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-18 Thread Omar Polo
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:
 - firefox (and possibly other programs) need some directories to
   be unveiled [0]. 
 - with gajim (gtk3) and emacs (gtk3) works as expected
 - 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.)

(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.

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

[0] https://marc.info/?l=openbsd-ports=157811336612326=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 -  1.25
> +++ Makefile  9 Jan 2020 14:25:29 -
> @@ -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 -  1.5
> +++ distinfo  9 Jan 2020 14:25:29 -
> @@ -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 -   1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -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.elSat 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-main22 May 2015 11:31:16 -  1.5
> +++ pkg/PLIST-main9 Jan 2020 14:25:29 -
> @@ -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
> 

Re: [PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-17 Thread Bryan Linton
ping.

If you use OpenBSD to write any kind of Japanese text, odds are
you're using this port.

If so, please test and let me know if anything has broken.

Thanks.

-- 
Bryan

On 2020-01-09 23:34:34, 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).
> 
> 
> Notable changes to the port:
> 
> * Old upstream is dead (no updates to website since 2004).  Switch
> to the Debian Anthy team since they have become the new upstream.
> 
> * Update licence marker to show it's now a mix of GPLv3, LGPLv3,
> and LGPLv2.
> 
> * Remove unneeded patch.
> 
> * All internal functions and dictionaries have been switched to
> use UTF-8 by default (instead of EUC-JP).  Users must switch their
> IMs to use the UTF-8 version of Anthy or they will produce only
> gibberish on output.
> 
> 
> Questions:
> 
> * Is setting "DISTFILES = anthy_$V.orig.tar.gz" the best way to cope
> with the naming of the tarball?
> 
> * Does the version changing from 9100h to 0.4 require setting EPOCH?
> It seems to have updated fine on my system, but I don't know the
> details of when EPOCH is needed.
> 
> 
> 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.
> 
> * 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 -  1.25
> +++ Makefile  9 Jan 2020 14:25:29 -
> @@ -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 -  1.5
> +++ distinfo  9 Jan 2020 14:25:29 -
> @@ -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 -   1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -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.elSat 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-main22 May 2015 11:31:16 -  1.5
> +++ pkg/PLIST-main9 Jan 2020 14:25:29 -
> @@ -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}
> 

[PATCH] Update inputmethods/anthy from 9100 to 0.4

2020-01-09 Thread Bryan Linton
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).


Notable changes to the port:

* Old upstream is dead (no updates to website since 2004).  Switch
to the Debian Anthy team since they have become the new upstream.

* Update licence marker to show it's now a mix of GPLv3, LGPLv3,
and LGPLv2.

* Remove unneeded patch.

* All internal functions and dictionaries have been switched to
use UTF-8 by default (instead of EUC-JP).  Users must switch their
IMs to use the UTF-8 version of Anthy or they will produce only
gibberish on output.


Questions:

* Is setting "DISTFILES = anthy_$V.orig.tar.gz" the best way to cope
with the naming of the tarball?

* Does the version changing from 9100h to 0.4 require setting EPOCH?
It seems to have updated fine on my system, but I don't know the
details of when EPOCH is needed.


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.

* 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
--- Makefile12 Jul 2019 20:47:12 -  1.25
+++ Makefile9 Jan 2020 14:25:29 -
@@ -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
--- distinfo18 Jan 2015 03:14:16 -  1.5
+++ distinfo9 Jan 2020 14:25:29 -
@@ -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 -   1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -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 -  1.5
+++ pkg/PLIST-main  9 Jan 2020 14:25:29 -
@@ -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.html31 Dec 2019 02:18:01 -  1.1017