ffi-libarchive-binary 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c441dbc20d5540eb35c94d0f176e4689b0502ee7f2790f4f710160da1e26665
4
- data.tar.gz: 6729109bb4d88b27cdcd042244dff7c8d1a5b14582f74d338577cde13be7250d
3
+ metadata.gz: 6ea67f8137280b4f0a884cac471353ece2dbcf2d2d5c1dc80f4feb94ce050ca8
4
+ data.tar.gz: 7366a4225e2734ee10976a49ee1a3768fd088bc9fb736fba22eb6e94bd4dc4db
5
5
  SHA512:
6
- metadata.gz: e7e4ea161e8ac8e2242a51a1f69652be6785745e7694b68a6ac942fbeba25c292aaf0fba5fd970e00d6c9407a7aa6881b46a4b1daefe26eabf55282eca299da4
7
- data.tar.gz: ad587d155abaf29242dd3aa59edc8ff98dd34017dd60da4f271af7b2bf9567111530e94d79a56c752db391bd3067ffaee958db5bc15e085ffdb3755b3eb4986d
6
+ metadata.gz: 9fb2c860acd932f4ba90c7980de0bdc379054560a9a7651b072ba731a1bd9a0be61636e6d9b2920e11631e432ce1b464cd446a9385d7f6718759ae2dc008f0e5
7
+ data.tar.gz: e7fb8216d7448c709fb27077ce95b22adf5f72b65b9611dc1c81e86c8381084de04c4b2a78693c3617e91c4bca98b557dcdbadf8711aca1579d4b87069b34dbe
@@ -6,9 +6,9 @@ libraries:
6
6
  # - Other libraries use cross-platform versions under 'all'
7
7
  zlib:
8
8
  all:
9
- version: "1.3.1"
10
- url: "https://zlib.net/zlib-1.3.1.tar.gz"
11
- sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"
9
+ version: "1.3.2"
10
+ url: "https://zlib.net/zlib-1.3.2.tar.gz"
11
+ sha256: "bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16"
12
12
  libexpat:
13
13
  all:
14
14
  version: "2.7.4"
@@ -8,7 +8,9 @@ module LibarchiveBinary
8
8
  "arm64-apple-darwin" => "Mach-O 64-bit dynamically linked shared library arm64",
9
9
  "x86_64-apple-darwin" => "Mach-O 64-bit dynamically linked shared library x86_64",
10
10
  "aarch64-linux-gnu" => "ELF 64-bit LSB shared object, ARM aarch64",
11
+ "aarch64-linux-musl" => "ELF 64-bit LSB shared object, ARM aarch64",
11
12
  "x86_64-linux-gnu" => "ELF 64-bit LSB shared object, x86-64",
13
+ "x86_64-linux-musl" => "ELF 64-bit LSB shared object, x86-64",
12
14
  "x86_64-w64-mingw32" => "PE32+ executable",
13
15
  "aarch64-w64-mingw32" => "PE32+ executable",
14
16
  }.freeze
@@ -23,6 +25,8 @@ module LibarchiveBinary
23
25
  "aarch64-w64-mingw32" => "libarchive.dll",
24
26
  "x86_64-linux-gnu" => "libarchive.so",
25
27
  "aarch64-linux-gnu" => "libarchive.so",
28
+ "x86_64-linux-musl" => "libarchive.so",
29
+ "aarch64-linux-musl" => "libarchive.so",
26
30
  "x86_64-apple-darwin" => "libarchive.dylib",
27
31
  "arm64-apple-darwin" => "libarchive.dylib",
28
32
  }.freeze
@@ -59,7 +63,8 @@ module LibarchiveBinary
59
63
  # For aarch64 cross-compilation, set the compiler
60
64
  return {} unless host&.start_with?("aarch64")
61
65
 
62
- if host == "aarch64-linux-gnu" || host == "aarch64-linux-musl"
66
+ case host
67
+ when "aarch64-linux-gnu", "aarch64-linux-musl"
63
68
  # Note: We use aarch64-linux-gnu-gcc for both glibc and musl targets because:
64
69
  # 1. We build static libraries (.a files) which are libc-agnostic
65
70
  # 2. The compiler generates aarch64 machine code (architecture-specific)
@@ -72,7 +77,7 @@ module LibarchiveBinary
72
77
  "RANLIB" => "aarch64-linux-gnu-ranlib",
73
78
  "STRIP" => "aarch64-linux-gnu-strip",
74
79
  }
75
- elsif host == "aarch64-w64-mingw32"
80
+ when "aarch64-w64-mingw32"
76
81
  # For Windows ARM64 cross-compilation, use regular clang with explicit target
77
82
  # Not clang-cl because configure scripts don't recognize it as a C99 compiler
78
83
  {
@@ -122,8 +122,7 @@ module LibarchiveBinary
122
122
  def install
123
123
  super
124
124
 
125
- libs = Dir.glob(File.join(port_path, "{lib,bin}", "*"))
126
- .grep(/\/(?:lib)?[a-zA-Z0-9\-]+\.(?:so|dylib|dll)$/)
125
+ libs = Dir.glob(File.join(port_path, "{lib,bin}", "*.{so,dylib,dll,DLL}"))
127
126
  FileUtils.cp_r(libs, lib_workpath, verbose: true)
128
127
  if lib_fullpath.nil?
129
128
  message("Cannot guess libarchive library name, skipping format verification")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LibarchiveBinary
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.2"
5
5
  end
@@ -9,7 +9,17 @@ module LibarchiveBinary
9
9
  LIBRARY_PATH = Pathname.new(File.join(__dir__, "ffi-libarchive-binary"))
10
10
 
11
11
  def self.lib_path
12
- LIBRARY_PATH.join(lib_filename).to_s
12
+ path = LIBRARY_PATH.join(lib_filename).to_s
13
+ unless File.exist?(path)
14
+ # Provide helpful debugging output for library loading failures
15
+ if LIBRARY_PATH.exist?
16
+ files = Dir.glob("#{LIBRARY_PATH}/*").map { |f| File.basename(f) }
17
+ raise Error, "Library not found at #{path}. Files in directory: #{files.join(', ')}"
18
+ else
19
+ raise Error, "Library directory does not exist: #{LIBRARY_PATH}"
20
+ end
21
+ end
22
+ path
13
23
  end
14
24
 
15
25
  def self.lib_filename
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-libarchive-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.