Commit f071fc8e authored by Tony Arcieri's avatar Tony Arcieri Committed by GitHub

Merge pull request #21 from nijikon/sodium_lib64

make compatible with 64 bit
parents 39b52464 748b6f78
require "rbnacl/libsodium/version"
require 'rbnacl/libsodium/version'
module RbNaCl
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
when /darwin/ then "libsodium*.dylib"
when /Windows|(win|mingw)32/ then "libsodium*.dll"
when /openbsd/ then "libsodium*.so.*"
else "libsodium*.so"
def sodiumlib_glob
case RUBY_DESCRIPTION
when /darwin/ then 'libsodium*.dylib'
when /Windows|(win|mingw)32/ then 'libsodium*.dll'
when /openbsd/ then 'libsodium*.so.*'
else 'libsodium*.so'
end
end
end
::RBNACL_LIBSODIUM_GEM_LIB_PATH = Dir.glob(File.join(sodiumlib_dir, sodiumlib_glob)).first
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