mirror of https://github.com/erickguan/ffi-icu.git
Fix last commit
This commit is contained in:
parent
3282dad24a
commit
65321d07a4
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue