Fix last commit

This commit is contained in:
Jari Bakken 2010-05-14 19:16:17 +02:00
parent 3282dad24a
commit 65321d07a4
2 changed files with 7 additions and 3 deletions

View File

@ -10,10 +10,10 @@ Simple FFI wrappers for things I need from ICU. For the full thing, check out IC
= Dependencies
ICU. If you get messages that the library or functions are not found, you can
set some env vars to tell ffi-icu where to find it:
ICU. If you get messages that the library or functions are not found, you can
set some environment varibles to tell ffi-icu where to find it:
...
FFI_ICU_LIB="icui18n.so" FFI_ICU_VERSION_SUFFIX="_3_8" ruby -r ffi-icu
= Features

View File

@ -17,6 +17,7 @@ module ICU
def self.find_icu
suffix = ''
# let the user tell us where the lib is
if ENV['FFI_ICU_LIB']
libs = ENV['FFI_ICU_LIB'].split(",")
ffi_lib *libs
@ -25,9 +26,12 @@ module ICU
return ENV['FFI_ICU_VERSION_SUFFIX']
elsif num = libs.first[/\d+$/]
return num.split(//).join("_")
else
return suffix
end
end
# ok, try to find it
case ICU.platform
when :osx
ffi_lib "icucore"