#31553 closed enhancement (fixed)
split chasen port into chasen meta, chasen-base and chasen dictionaries
Reported by: | humem (humem) | Owned by: | takanori@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.3 |
Keywords: | Cc: | takanori@… | |
Port: | chasen |
Description
The current chasen port is very concise and well constructed, and can install the IPA dictionary data in every available encodings by default. Although the IPAdic is a de facto standard, the naist-jdic is a possible alternative.
I propose to split the chasen port into chasen meta, chasen-base analyzer and chasen dictionaries (ipadic and naist-jdic) ports. Please refer to my user's svn: http://trac.macports.org/browser/users/hum/textproc
The chasen meta port depends on chasen-base and a chasen dictionary, and has variants for encodings. For example, run 'install chasen +utf8 +naistjdic' to use UTF-8 version of naist-jdic, then chasen-base and chasen-naist-jdic-utf8 will be installed, and 'chasen-utf8' command can be used.
Can you check my proposed ports?
Attachments (1)
Change History (14)
comment:1 follow-up: 3 Changed 13 years ago by takanori@…
comment:2 follow-up: 4 Changed 13 years ago by takanori@…
chasen:
default_variants +eucjp
You may use +utf8 instead of +eucjp because the most of users now prefer the Unicode encoding.
comment:3 follow-up: 6 Changed 13 years ago by humem (humem)
Replying to takanori@…:
So you should add +darts (or +darts_clone) variant to this Portfile to separate the two versions of Chasen, I think.
Actually, I made +dartsclone variant at first. However I have removed the variant and replaced port:-style with path:-style in depends_lib according to a comment at http://lists.macosforge.org/pipermail/macports-dev/2011-October/016374.html.
If you do not care about which type of darts is used, the chasen analyzer and a dictionary will be built with an existing darts. In the case there is no darts, the original darts will be installed. If you prefer darts-clone, you will install darts-clone explicitly before installing chasen, and you do not need to specify +dartsclone variant. If you decide to switch darts to darts-clone, you will uninstall and clean chasen chasen-* darts, then install darts-clone chasen.
However, I think we should add +dartsclone variant to the Portfile to distribute binary packages.
comment:4 Changed 13 years ago by humem (humem)
Replying to takanori@…:
You may use +utf8 instead of +eucjp because the most of users now prefer the Unicode encoding.
I agree most users including me prefer utf8 to eucjp. However eucjp is the default encoding for chasen by tradition. How about if both +eucjp and +utf8 are set as default_variants?
comment:5 Changed 13 years ago by humem (humem)
I added dependencies on chasen-base to chasen dictionary ports. See r85208.
comment:6 follow-up: 8 Changed 13 years ago by takanori@…
Replying to hum@…:
Actually, I made +dartsclone variant at first. However I have removed the variant and replaced port:-style with path:-style in depends_lib according to a comment at http://lists.macosforge.org/pipermail/macports-dev/2011-October/016374.html.
Well, It looks like Ryan at that time just didn't notice about the "Half-size units" incompatibilities between these two Darts libraries described on the following web page. http://code.google.com/p/darts-clone/
Trust me. In this situation you should add +darts (or +darts_clone) variant to your Portfiles, or delete port:darts (or port:darts-clone) simply. There is no other way.
comment:7 Changed 13 years ago by humem (humem)
I changed dependency on darts from *_lib to *_build in chasen-base. See r85304.
comment:8 Changed 13 years ago by humem (humem)
Replying to takanori@…:
Trust me. In this situation you should add +darts (or +darts_clone) variant to your Portfiles, or delete port:darts (or port:darts-clone) simply. There is no other way.
Let us continue to discuss the variant a little. I understand dictionaries built with darts and darts-clone are not compatible with one another, and I think marking a darts-type with a variant is informative. Still, I am not convinced that the darts(clone) variant is mandatory, because chasen ports without the variant seem to be fairly consistent in a site. I am afraid users would specify the variant explicitly according to their installed darts-type if we add the variant to the portfile.
Anyway, I committed in r85425 to add dartsclone variants to chasen-* ports. Could you play with these ports and give me any suggestions?
comment:9 Changed 13 years ago by humem (humem)
Owner: | changed from macports-tickets@… to takanori@… |
---|
comment:10 Changed 13 years ago by humem (humem)
Can I merge http://trac.macports.org/browser/users/hum/textproc/chasen* to the trunk?
comment:11 follow-up: 12 Changed 13 years ago by takanori@…
Sorry for late reply.
Well, before commitment I'd like to add some additional improvements. Do you mind if I modify your Portfiles on the repos directly?
Changed 13 years ago by takanori@…
Attachment: | chasen-1028.diff added |
---|
Like this. What do you think about these changes?
comment:12 Changed 13 years ago by humem (humem)
Replying to takanori@…:
Well, before commitment I'd like to add some additional improvements. Do you mind if I modify your Portfiles on the repos directly?
Thank you for your proposal! Your treatment of dartsclone variants in the base and dictionary ports seems to be nice. Additionally, I committed improvements in upgrading from an old chasen port in r86574 and r86575. Could you update the trunk of chasen ports with your improvements as well as my user repo if you like?
comment:13 Changed 13 years ago by takanori@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed in r86585. Thank you for your hard work!!
Umemoto-san,
Nice hacks!! except a few problems.
chasen-base:
This is a bad idea. You shouldn't unify Darts and Darts-clone here because the dictionary file format (ie. the output) differs between these two libraries.
So you should add +darts (or +darts_clone) variant to this Portfile to separate the two versions of Chasen, I think.
Moreover,
chasen-ipadic*, chasen-naist-jdic*:
Due to the same reason, all of these dictionary ports should have +darts (or +darts_clone) like chasen-base.
You may feel this is an ugly way. Indeed. ;-(
That's why I want to delete darts (ie. replace darts to darts-clone) simply. (Ticket #31541)