Changeset 9850 for lang/perl/Alien-MeCab

Show
Ignore:
Timestamp:
04/19/08 08:50:15 (8 months ago)
Author:
daisuke
Message:

Optionally depend on Alien::Iconv

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Alien-MeCab/trunk/Makefile.PL

    r9344 r9850  
    3535$MECAB_EXE           = File::Spec->rel2abs($MECAB_EXE); 
    3636 
     37my %REQUIRES; 
     38 
    3739# Construct the necessary flags 
    3840my $CCFLAGS = $ENV{CCFLAGS}; 
     
    5254*** Whoa! libiconv was not detected! *** 
    5355 
    54 Can't proceed without libiconv. 
    55 You will have to install libiconv by yourself. 
    56  
    57 EOM 
    58  
    59     # XXX - in the future, after we create Alien::Iconv, I want to say 
    60     # the following instead: 
    61 # You can either 
    62 #  (1) install Alien::Iconv (which will build iconv from source), or 
    63 #  (2) install libiconv by yourself by other means. 
    64 #before proceeding. 
    65         exit 0; 
     56MeCab requires libiconv to work properly. You can either  
     57    (1) install it yourself by hand, or 
     58    (2) install it via Alien::Iconv 
     59EOM 
     60 
     61        my $yn = prompt("Would you like to add Alien::Iconv to prerequisite modules?", "y"); 
     62        if ($yn !~ /^y(?:es)?$/) { 
     63            print <<EOM; 
     64 
     65You chose not to install libiconv. Please install it manually and 
     66re-run perl Makefile.PL for Alien::MeCab. 
     67 
     68EOM 
     69            exit 0; 
     70        } 
     71 
     72        $REQUIRES{ 'Alien::MeCab' } = '1.12001'; 
    6673    } 
    6774} 
     
    192199    NAME => 'Alien-MeCab', 
    193200    VERSION => $DIST_VERSION, 
     201    PREREQ_PM => \%REQUIRES, 
    194202); 
    195203