Commit 748b6f78 authored by Tomasz Pajor's avatar Tomasz Pajor

make compatible with 64 bit

parent 39b52464
require "rbnacl/libsodium/version" require 'rbnacl/libsodium/version'
module RbNaCl module RbNaCl
module Libsodium module Libsodium
sodiumlib_dir = File.expand_path("../../../vendor/libsodium/dist/lib/", __FILE__) class << self
def sodiumlib_dir
sodiumlib32_dir = File.expand_path('../../../vendor/libsodium/dist/lib/', __FILE__)
sodiumlib64_dir = File.expand_path('../../../vendor/libsodium/dist/lib64/', __FILE__)
[sodiumlib32_dir, sodiumlib64_dir].select { |dir| Dir.exist?(dir) }.first
end
sodiumlib_glob = case RUBY_DESCRIPTION def sodiumlib_glob
when /darwin/ then "libsodium*.dylib" case RUBY_DESCRIPTION
when /Windows|(win|mingw)32/ then "libsodium*.dll" when /darwin/ then 'libsodium*.dylib'
when /openbsd/ then "libsodium*.so.*" when /Windows|(win|mingw)32/ then 'libsodium*.dll'
else "libsodium*.so" when /openbsd/ then 'libsodium*.so.*'
else 'libsodium*.so'
end
end
end end
::RBNACL_LIBSODIUM_GEM_LIB_PATH = Dir.glob(File.join(sodiumlib_dir, sodiumlib_glob)).first ::RBNACL_LIBSODIUM_GEM_LIB_PATH = Dir.glob(File.join(sodiumlib_dir, sodiumlib_glob)).first
end end
end end
require "rbnacl" require 'rbnacl'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment