Sha256: 533f0013d1908d6242344e2d528640976986fa127457867e6b2ab06f5e4380b4
Contents?: true
Size: 717 Bytes
Versions: 5
Compression:
Stored size: 717 Bytes
Contents
# Utility to load native binaries on Java CLASSPATH #HACK until jruby returns a more specific 'host_os' than 'linux' class NativeFolder attr_reader :os, :bit LINUX_FORMAT = 'linux%s'.freeze ARM32 = '-armv6hf'.freeze ARM64 = '-aarch64'.freeze def initialize @os = java.lang.System.get_property('os.name').downcase @bit = java.lang.System.get_property('os.arch') end def name if /linux/.match?(os) return format(LINUX_FORMAT, '64') if /amd64/.match?(bit) return format(LINUX_FORMAT, ARM32) if /arm/.match?(bit) return format(LINUX_FORMAT, ARM64) if /aarch/.match?(bit) end raise RuntimeError, "Unsupported Architecture" end def extension '*.so' end end
Version data entries
5 entries across 5 versions & 1 rubygems