Bug 200325 - [patch] japanese/mecab-ipadic: separate charset options into individual slave ports
Summary: [patch] japanese/mecab-ipadic: separate charset options into individual slave...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: TAKATSU Tomonari
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-05-19 11:34 UTC by Koichiro Iwao
Modified: 2016-03-26 11:45 UTC (History)
3 users (show)

See Also:
yasu: maintainer-feedback+


Attachments
patch: separate options into individual ports (4.03 KB, patch)
2015-05-19 11:34 UTC, Koichiro Iwao
no flags Details | Diff
shell archive of slave ports (1.78 KB, text/plain)
2015-05-19 11:36 UTC, Koichiro Iwao
no flags Details
poudriere log: meta-port (12.86 KB, text/plain)
2015-05-19 11:37 UTC, Koichiro Iwao
no flags Details
poudriere log: japanese/mecab-ipadic-utf8 (50.25 KB, text/plain)
2015-05-19 11:38 UTC, Koichiro Iwao
no flags Details
poudriere log: japanese/mecab-ipadic-eucjp (50.17 KB, text/plain)
2015-05-19 11:39 UTC, Koichiro Iwao
no flags Details
patch: separate options into individual ports (4.02 KB, patch)
2015-05-20 01:14 UTC, Koichiro Iwao
no flags Details | Diff
poudriere log: meta-port (12.55 KB, text/plain)
2015-05-20 01:21 UTC, Koichiro Iwao
no flags Details
improve and cleanup (4.99 KB, patch)
2015-07-17 12:04 UTC, TAKATSU Tomonari
no flags Details | Diff
Updated patch. (4.88 KB, patch)
2016-01-23 05:08 UTC, Yasuhiro Kimura
yasu: maintainer-approval+
Details | Diff
Updated patch. (3.70 KB, patch)
2016-01-29 23:05 UTC, Yasuhiro Kimura
yasu: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Koichiro Iwao freebsd_committer freebsd_triage 2015-05-19 11:34:24 UTC
Created attachment 156933 [details]
patch: separate options into individual ports

Current japanese/mecab-ipadic port has options to select character set.
However, name of the port/package does not show the character set.
It is confusing and inconvenient because we can't know which character
set is installed.


What is character set ja-mecab-ipadic?
% pkg search ja-mecab-ipadic
ja-mecab-ipadic-2.7.0.20070801


I separated japanese/mecab-ipadic port into three ports, 
mecab-ipadic-utf8, mecab-ipadic-eucjp, mecab-ipadic-sjis.
Now japanese/meecab-ipadic is just a meta-port.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-05-19 11:34:24 UTC
Maintainer informed via mail
Comment 2 Koichiro Iwao freebsd_committer freebsd_triage 2015-05-19 11:36:12 UTC
Created attachment 156934 [details]
shell archive of slave ports

Shell archive of new slave ports, 
 - japanese/mecab-ipadic-eucjp
 - japanese/mecab-ipadic-sjis
 - japanese/mecab-ipadic-utf8
Comment 3 Koichiro Iwao freebsd_committer freebsd_triage 2015-05-19 11:37:30 UTC
Created attachment 156935 [details]
poudriere log: meta-port

poudriere log of japanese/mecab-ipadic
Comment 4 Koichiro Iwao freebsd_committer freebsd_triage 2015-05-19 11:38:36 UTC
Created attachment 156936 [details]
poudriere log: japanese/mecab-ipadic-utf8

poudriere log of slave port, japanese/mecab-ipadic-utf8
Comment 5 Koichiro Iwao freebsd_committer freebsd_triage 2015-05-19 11:39:20 UTC
Created attachment 156937 [details]
poudriere log: japanese/mecab-ipadic-eucjp

poudriere log of japanese/mecab-ipadic-eucjp
Comment 6 Koichiro Iwao freebsd_committer freebsd_triage 2015-05-19 11:41:57 UTC
There's no poudriere log for japanese/mecab-ipadic-sjis because it is broken.
Not because of my changes, japanese/mecab-ipadic port with SHIFTJIS option
is broken since before. japanese/mecab-ipadic-sjis is just marked as broken.
Comment 7 TAKATSU Tomonari freebsd_committer freebsd_triage 2015-05-20 00:50:02 UTC
portlint says:
"
WARN: Makefile: COMMENT is not supposed to begin with 'A ', 'An ', or 'The '.
FATAL: Makefile: DISTVERSION appears out-of-order.
FATAL: Makefile: order must be PORTNAME/PORTVERSION/DISTVERSIONPREFIX/DISTVERSION/DISTVERSIONSUFFIX/PORTREVISION/PORTEPOCH/CATEGORIES/MASTER_SITES/MASTER_SITE_SUBDIR/PROJECTHOST/PKGNAMEPREFIX/PKGNAMESUFFIX/DISTNAME/EXTRACT_SUFX/DISTFILES/DIST_SUBDIR/EXTRACT_ONLY.
WARN: Makefile: no MASTER_SITES found. is it ok?
WARN: Makefile: Consider defining LICENSE.
2 fatal errors and 3 warnings found.
"
Comment 8 Koichiro Iwao freebsd_committer freebsd_triage 2015-05-20 01:14:27 UTC
Created attachment 156966 [details]
patch: separate options into individual ports

Pet portlint (FATAL only).

COMMENT still begins with "The" because I just imitated x11-wm/xfce4 the typical meta port for me.
Comment 9 Koichiro Iwao freebsd_committer freebsd_triage 2015-05-20 01:21:05 UTC
Created attachment 156967 [details]
poudriere log: meta-port
Comment 10 Yasuhiro Kimura freebsd_committer freebsd_triage 2015-07-16 10:45:08 UTC
Sorry for late response.
I approve this patch so please commit it.

Regards.
Comment 11 TAKATSU Tomonari freebsd_committer freebsd_triage 2015-07-17 12:04:23 UTC
Created attachment 158907 [details]
improve and cleanup
Comment 12 TAKATSU Tomonari freebsd_committer freebsd_triage 2015-07-17 12:23:36 UTC
I'm working on 
https://github.com/tota/freebsd-ports/commits/japanese/mecab-ipadic .
Comment 13 Koichiro Iwao freebsd_committer freebsd_triage 2015-08-05 17:22:05 UTC
tota@'s improvement looks good.
Comment 14 Yasuhiro Kimura freebsd_committer freebsd_triage 2016-01-23 05:08:16 UTC
Created attachment 165988 [details]
Updated patch.

Change from tota@'s patch:

* Unbreak mecab-ipadic-sjis
* Change default charset of metaport into EUC-JP because it is default charset of current mecab-ipadic port.
Comment 15 TAKATSU Tomonari freebsd_committer freebsd_triage 2016-01-23 14:29:10 UTC
(In reply to Yasuhiro KIMURA from comment #14)

I have updated https://github.com/tota/freebsd-ports/commits/japanese/mecab-ipadic to apply  attachment 165988 [details].
Comment 16 Koichiro Iwao freebsd_committer freebsd_triage 2016-01-25 10:16:04 UTC
It is good time to consider default charset rather than continuing EUC-JP as in the past.  How many people want to use EUC-JP as default?
Comment 17 TAKATSU Tomonari freebsd_committer freebsd_triage 2016-01-26 03:50:17 UTC
(In reply to Koichiro IWAO from comment #16)

I gree with you.
I have pushed another branch as
https://github.com/tota/freebsd-ports/commits/japanese/mecab-ipadic-default-UTF8 .
Comment 18 TAKATSU Tomonari freebsd_committer freebsd_triage 2016-01-28 08:02:47 UTC
(In reply to Yasuhiro KIMURA from comment #14)

Do you have any thoughts on comment #16 ?
Comment 19 Yasuhiro Kimura freebsd_committer freebsd_triage 2016-01-29 12:40:18 UTC
(In reply to TAKATSU Tomonari from comment #18)

I considered the intention of submitter again and it seems to me that following steps are better:

1. Rename japanese/mecab-ipadic to japanese/mecab-ipadic-eucjp and make it master port.
2. Add japanese/mecab-ipadic-sjis and japanese/mecab-ipadic-utf8 which are slave port.
3. Add entry to /usr/ports/MOVED that japanese/mecab-ipadic is renamed to japanese/mecab-ipadic-eucjp.

With these steps it is clear what character set is used, and we no longer worry about default one. With step 3 package-only user should also be able to migrate smoothly. 

IWAO-san and TAKATSU-an, what do you think of my idea? If you agree with me then I will create and submit new patch.
Comment 20 Yasuhiro Kimura freebsd_committer freebsd_triage 2016-01-29 23:05:59 UTC
Created attachment 166287 [details]
Updated patch.

I have already created new patch :-). So please try it give me feedback.
Kepp in mind following step should be take to apply this patch.

$ cd /usr/ports
$ svn move japanese/mecab-ipadic japanese/mecab-ipadic-eucjp
$ svn patch /path/to/this/patch
Comment 21 Koichiro Iwao freebsd_committer freebsd_triage 2016-01-30 15:09:24 UTC
(In reply to Yasuhiro KIMURA from comment #19)

I agree with most of your idea except for the master port. 
I prefer -utf8 as master.  But this is a trivial issue.
Comment 22 TAKATSU Tomonari freebsd_committer freebsd_triage 2016-01-31 02:21:35 UTC
(In reply to Yasuhiro KIMURA from comment #19)

I don't think that your patch includes submitter's intention.
It looks not better than following patch to me.
Please explain advantages of separating master-slave ports over using PKGNAMESUFFIX (following patch)
and/or over meta-port structure (submitter's intention).

diff --git a/japanese/mecab-ipadic/Makefile b/japanese/mecab-ipadic/Makefile
index 812dd06..fae73de 100644
--- a/japanese/mecab-ipadic/Makefile
+++ b/japanese/mecab-ipadic/Makefile
@@ -37,10 +37,13 @@ UTF8_DESC=  Use UTF-8 as dictionary charset.
 
 .if ${PORT_OPTIONS:MEUCJP}
 CONFIGURE_ARGS+=       --with-charset=euc-jp
+PKGNAMESUFFIX= -eucjp
 .elif ${PORT_OPTIONS:MSHIFTJIS}
-CONFIGURE_ARGS+=       --with-charset=shift_jis
+CONFIGURE_ARGS+=       --with-charset=shiftjis
+PKGNAMESUFFIX= -sjis
 .elif ${PORT_OPTIONS:MUTF8}
 CONFIGURE_ARGS+=       --with-charset=utf-8
+PKGNAMESUFFIX= -utf8
 .endif
 
 .include <bsd.port.mk>
Comment 23 Koichiro Iwao freebsd_committer freebsd_triage 2016-03-01 08:46:49 UTC
how's it going?
Comment 24 TAKATSU Tomonari freebsd_committer freebsd_triage 2016-03-03 13:13:17 UTC
(In reply to Koichiro IWAO from comment #23)

I have been waiting for yasuhiro-san's comment for comment #22 .
Comment 25 Koichiro Iwao freebsd_committer freebsd_triage 2016-03-22 07:01:30 UTC
10 months past. waste of time. maintainer timeout.
Comment 26 Koichiro Iwao freebsd_committer freebsd_triage 2016-03-22 07:05:40 UTC
(In reply to Yasuhiro KIMURA from comment #10)

hello?
Comment 27 TAKATSU Tomonari freebsd_committer freebsd_triage 2016-03-24 16:29:57 UTC
I have prepared to commit a patch based on
https://github.com/tota/freebsd-ports/commits/japanese/mecab-ipadic-default-UTF8 .
I will commit it if you have no objection.
Comment 28 commit-hook freebsd_committer freebsd_triage 2016-03-26 11:43:55 UTC
A commit references this bug:

Author: tota
Date: Sat Mar 26 11:42:56 UTC 2016
New revision: 411923
URL: https://svnweb.freebsd.org/changeset/ports/411923

Log:
  - Separate japanese/mecab-ipadic into three slave ports
    to identify character set by means of package name
    * japanese/mecab-ipadic-eucjp
    * japanese/mecab-ipadic-sjis
    * japanese/mecab-ipadic-utf8 (default)
  - Set default character set to UTF-8
  - Unbreak mecab-ipadic-sjis
  - Bump PORTREVISION

  PR:		200325
  Submitted by:	Koichiro IWAO (meta+ports_AT_vmeta_DOT_jp)
  Approved by:	maintainer timeout (> 8 weeks)

Changes:
  head/japanese/Makefile
  head/japanese/mecab-ipadic/Makefile
  head/japanese/mecab-ipadic/pkg-plist
  head/japanese/mecab-ipadic-eucjp/
  head/japanese/mecab-ipadic-eucjp/Makefile
  head/japanese/mecab-ipadic-sjis/
  head/japanese/mecab-ipadic-sjis/Makefile
  head/japanese/mecab-ipadic-utf8/
  head/japanese/mecab-ipadic-utf8/Makefile
Comment 29 TAKATSU Tomonari freebsd_committer freebsd_triage 2016-03-26 11:45:20 UTC
Committed.
Thanks!