Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#31837 closed defect (fixed)

Mecab's script modules fail to install with mecab-utf8/sjis.

Reported by: takanori@… Owned by: humem (humem)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: rsky0711@…
Port: mecab

Description

Mecab's script modules (such as p5.12-mecab, py-mecab, py25-mecab and rb-mecab) cannot be installed properly unless the EUC-jp based mecab (i.e. port:mecab) is installed.

If mecab-utf8 or mecab-sjis is installed, it fails like the following.

$ sudo port install mecab-utf8
--->  Computing dependencies for mecab-utf8
--->  Dependencies to be installed: mecab-base mecab-ipadic-utf8
...
--->  Installing mecab-utf8 @0.98_0+ipadic
--->  Activating mecab-utf8 @0.98_0+ipadic
--->  Cleaning mecab-utf8

$ sudo port install p5.12-mecab
--->  Computing dependencies for p5.12-mecab
Error: Unable to execute port: Can't install mecab because conflicting ports are installed: mecab-utf8
To report a bug, see <http://guide.macports.org/#project.tickets>

Change History (3)

comment:1 Changed 12 years ago by humem (humem)

Cc: rsky0711@… added
Status: newassigned

A simple solution is to use lib:-style dependency instead of port:-style. For example, the following is a diff for rb-ruby Portfile:

--- Portfile.orig	2011-07-31 15:02:55.000000000 +0900
+++ Portfile	2011-11-01 00:04:29.000000000 +0900
@@ -18,7 +18,7 @@
                 rmd160 bb0063b20162c0a6d02b529f9e451d8fe0e7b518
 
 categories-append   textproc japanese
-depends_lib-append  port:mecab
+depends_lib-append  lib:libmecab:mecab
 
 post-extract {
     reinplace s|\#!/usr/bin/ruby|\#!${ruby.bin}|g \

How about this? I am ready to update mecab module ports.

comment:2 Changed 12 years ago by humem (humem)

Resolution: fixed
Status: assignedclosed

I updated p5-mecab (r86833), py-mecab (r86834) and rb-mecab (r86835) to 0.98 (maintainer timeout). Then, I added rb19-mecab (r86837) and deleted py27-mecab (r86839). I specified the default mecab port to mecab-utf8, because test scripts are in UTF-8, not EUC-JP.

I am closing this ticket, but please feel free to reopen it if you have any problems.

comment:3 Changed 12 years ago by humem (humem)

A library for mecab is already installed in system directory /usr/lib/libmecab.dylib, and depends_lib is not effective at all. I fixed it to set "depends_lib-append bin:mecab-config:mecab-utf8" and committed in r86846.

Note: See TracTickets for help on using tickets.