diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-13 14:33:30 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-13 14:33:30 +0000 |
| commit | 53e5dbc189f11c031cecd187a980013e922e9e44 (patch) | |
| tree | f78867b9514c6175fd902d38f6e8a69f316154c3 /ext | |
| parent | 644489858fcd2b38260677760ea5322689fae3ff (diff) | |
| download | ruby-53e5dbc189f11c031cecd187a980013e922e9e44.tar.gz ruby-53e5dbc189f11c031cecd187a980013e922e9e44.tar.xz ruby-53e5dbc189f11c031cecd187a980013e922e9e44.zip | |
* ext/iconv/charset_alias.rb (charset_alias): create wrapper libray
even if no target matched.
* ext/iconv/extconf.rb: create wrapper library under RUBYARCHDIR
directly.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/iconv/charset_alias.rb | 8 | ||||
| -rw-r--r-- | ext/iconv/extconf.rb | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/ext/iconv/charset_alias.rb b/ext/iconv/charset_alias.rb index f3a54b8dd..aed464429 100644 --- a/ext/iconv/charset_alias.rb +++ b/ext/iconv/charset_alias.rb @@ -1,4 +1,5 @@ #! /usr/bin/ruby +# :stopdoc: require 'rbconfig' require 'optparse' @@ -27,13 +28,12 @@ end def charset_alias(config_charset, mapfile, target = OS) map = Hash::Ordered.new comments = [] - match = false open(config_charset) do |input| - input.find {|line| /^case "\$os" in/ =~ line} or return + input.find {|line| /^case "\$os" in/ =~ line} or break input.find {|line| /^\s*([-\w\*]+(?:\s*\|\s*[-\w\*]+)*)(?=\))/ =~ line and $&.split('|').any? {|pattern| File.fnmatch?(pattern.strip, target)} - } or return + } or break input.find do |line| case line when /^\s*echo "(?:\$\w+\.)?([-\w*]+)\s+([-\w]+)"/ @@ -50,7 +50,7 @@ def charset_alias(config_charset, mapfile, target = OS) end case target when /linux|-gnu/ -# map.delete('ascii') + # map.delete('ascii') when /cygwin|os2-emx/ # get rid of tilde/yen problem. map['shift_jis'] = 'cp932' diff --git a/ext/iconv/extconf.rb b/ext/iconv/extconf.rb index 71221d60a..c6e5fa124 100644 --- a/ext/iconv/extconf.rb +++ b/ext/iconv/extconf.rb @@ -27,8 +27,12 @@ if have_func("iconv", "iconv.h") or if conf prefix = '$(srcdir)' prefix = $nmake ? "{#{prefix}}" : "#{prefix}/" - wrapper = "./iconv.rb" - $INSTALLFILES = [[wrapper, "$(RUBYARCHDIR)"]] + if $extout + wrapper = "$(RUBYARCHDIR)/iconv.rb" + else + wrapper = "./iconv.rb" + $INSTALLFILES = [[wrapper, "$(RUBYARCHDIR)"]] + end if String === conf require 'uri' scheme = URI.parse(conf).scheme |
