Module: LibarchiveBinary
- Defined in:
- lib/ffi-libarchive-binary.rb,
lib/ffi-libarchive-binary/version.rb,
lib/ffi-libarchive-binary/xz_recipe.rb,
lib/ffi-libarchive-binary/base_recipe.rb,
lib/ffi-libarchive-binary/zlib_recipe.rb,
lib/ffi-libarchive-binary/openssl_recipe.rb,
lib/ffi-libarchive-binary/libexpat_recipe.rb,
lib/ffi-libarchive-binary/libarchive_recipe.rb
Defined Under Namespace
Classes: BaseRecipe, Error, LibarchiveRecipe, LibexpatRecipe, OpensslRecipe, XZRecipe, ZLibRecipe
Constant Summary
collapse
- LIBRARY_PATH =
Pathname.new(File.join(__dir__, "ffi-libarchive-binary"))
- VERSION =
"0.3.0"
- FORMATS =
{
"arm64-apple-darwin" => "Mach-O 64-bit dynamically linked shared library arm64",
"x86_64-apple-darwin" => "Mach-O 64-bit dynamically linked shared library x86_64",
"aarch64-linux-gnu" => "ELF 64-bit LSB shared object, ARM aarch64",
"x86_64-linux-gnu" => "ELF 64-bit LSB shared object, x86-64",
"x86_64-w64-mingw32" => "PE32+ executable (DLL) (console) x86-64, for MS Windows",
}.freeze
- ARCHS =
{
"arm64-apple-darwin" => "arm64",
"x86_64-apple-darwin" => "x86_64",
}.freeze
- LIBNAMES =
{
"x86_64-w64-mingw32" => "libarchive.dll",
"x86_64-linux-gnu" => "libarchive.so",
"aarch64-linux-gnu" => "libarchive.so",
"x86_64-apple-darwin" => "libarchive.dylib",
"arm64-apple-darwin" => "libarchive.dylib",
}.freeze
- OS_COMPILERS =
{
"arm64-apple-darwin" => "darwin64-arm64-cc",
"x86_64-apple-darwin" => "darwin64-x86_64-cc",
"aarch64-linux-gnu" => nil,
"x86_64-linux-gnu" => nil,
"x86_64-w64-mingw32" => "mingw64",
}.freeze
- ENV_CMD =
["env", "CFLAGS=-fPIC", "LDFLAGS=-fPIC"].freeze
Class Method Summary
collapse
Class Method Details
.lib_filename ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'lib/ffi-libarchive-binary.rb', line 15
def self.lib_filename
if FFI::Platform.windows?
"libarchive.dll"
elsif FFI::Platform.mac?
"libarchive.dylib"
else
"libarchive.so"
end
end
|
.lib_path ⇒ Object
11
12
13
|
# File 'lib/ffi-libarchive-binary.rb', line 11
def self.lib_path
LIBRARY_PATH.join(lib_filename).to_s
end
|