Changeset 8923 for lang/perl/Alien-MeCab
- Timestamp:
- 04/05/08 21:17:06 (8 months ago)
- Files:
-
- 1 modified
-
lang/perl/Alien-MeCab/trunk/Makefile.PL (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Alien-MeCab/trunk/Makefile.PL
r8918 r8923 9 9 10 10 # Here's the file that we're going to use to extract some data 11 my $SPEC_FILE = 'lib/Alien/MeCab.pm'; 11 my $SPEC_FILE = 'lib/Alien/MeCab.pm'; 12 my $RUNNING_IN_HELL = $^O eq 'MSWin32'; 12 13 13 14 # Get the version … … 21 22 my $MECAB_BASENAME = "mecab-$MECAB_VERSION.tar.gz"; 22 23 my $MECAB_SOURCE = File::Spec->catfile("src", $MECAB_BASENAME); 23 my $MECAB_EXE = File::Spec->catfile("src", "mecab-$MECAB_VERSION.exe") if $^O eq 'MSWin32'; 24 25 eval { 26 Devel::CheckLib::assert_lib(lib => "iconv", libpath => $ENV{LIBDIR}); 27 }; 28 if ($@) { 29 print <<EOM; 24 my $MECAB_EXE = File::Spec->catfile("src", "mecab-$MECAB_VERSION.exe"); 25 26 if (! $RUNNING_IN_HELL) { 27 eval { 28 Devel::CheckLib::assert_lib(lib => "iconv", libpath => $ENV{LIBDIR}); 29 }; 30 if ($@) { 31 print <<EOM; 30 32 31 33 *** Whoa! libiconv was not detected! *** … … 42 44 # (2) install libiconv by yourself by other means. 43 45 #before proceeding. 44 exit 0; 46 exit 0; 47 } 45 48 } 46 49 … … 69 72 70 73 # Ask if we want to download the source. 71 my $sourcefile; 72 my $test; 73 $sourcefile = ($^O eq 'MSWin32') ? $MECAB_EXE 74 : $MECAB_SOURCE; 75 $test = ($^O eq 'MSWin32') ? "win\n" 76 : "other\n"; 74 my $sourcefile = $RUNNING_IN_HELL ? $MECAB_EXE : $MECAB_SOURCE; 77 75 if (! -f $sourcefile) { 78 76 my $yn = prompt("mecab source file $sourcefile does not exist. Download it now?", "y"); … … 184 182 my $make_str; 185 183 186 if ($ ^O eq 'MSWin32') {184 if ($RUNNING_IN_HELL) { 187 185 $make_str = <<MAKE_FRAG; 188 186 libmecab:
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)