ffi-libarchive-binary 0.5.0-x86_64-linux-gnu → 0.5.3-x86_64-linux-gnu

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: 5b99920bae4364d32f2e2d7f3fc42365756bfb217c536ccb4c1b018b9ce0168f
4
- data.tar.gz: b81dede26776a8cfe1ffc531cadc4948de61f9969a8b645afad783f630f93c35
3
+ metadata.gz: d00a6aed94af704d9af603fe36bf298074b2c090388e45a6bc19bd0cc3030a3d
4
+ data.tar.gz: 72744d1a5cceab304727bb9cb8ee5e44d618f8bec43fad9937f94b2241be28be
5
5
  SHA512:
6
- metadata.gz: c9154ab0cc8790d2196da478f1a416993b1a9e24c17aecece77cde676d3a35b51beb9290f62d387bb2ec9e3906f68cd66db63dd74a3a5dd4992678dea300b97a
7
- data.tar.gz: 06427b50e629c79136781921827dd31f713cb0c03bc3815cf5e1f1011b8f11eaabc8e7ae3bc37d25bbcbcc5eb1103dc146b86aee8c56aebc9408bbdccf38e1a0
6
+ metadata.gz: 46e4e4908949c56c932dfa09add7335d3bc4bc56426e45e7aa1077379cdab5bc74741819ab2d134a773c33f9ce37c8d8a4bbb50fa85db227e2f9114fc3ec37fd
7
+ data.tar.gz: 6a96b2881b76faa44afee725faa46813633fa2d0ed4359d110704da56212697113a3563e720158524ea8f36e4f9ef975626a4cc6d30d3e99dae0274d5f73b58b
@@ -4,11 +4,16 @@ libraries:
4
4
  # - OpenSSL uses version 1.1.1w for Windows x64 (more stable for x86_64)
5
5
  # - xz uses version 5.2.4 for all Windows platforms (MinGW compatibility)
6
6
  # - Other libraries use cross-platform versions under 'all'
7
+ libiconv:
8
+ all:
9
+ version: "1.18"
10
+ url: "https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.18.tar.gz"
11
+ sha256: "3b08f5f4f9b4eb82f151a7040bfd6fe6c6fb922efe4b1659c66ea933276965e8"
7
12
  zlib:
8
13
  all:
9
- version: "1.3.1"
10
- url: "https://zlib.net/zlib-1.3.1.tar.gz"
11
- sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"
14
+ version: "1.3.2"
15
+ url: "https://zlib.net/zlib-1.3.2.tar.gz"
16
+ sha256: "bb329a0a2cd0274d05519d61c667c062e06990d72e125ee2dfa8de64f0119d16"
12
17
  libexpat:
13
18
  all:
14
19
  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
  {
@@ -20,7 +20,7 @@ module LibarchiveBinary
20
20
  def self.library_for(libname)
21
21
  if MiniPortile::windows?
22
22
  # Detect Windows ARM64
23
- if RUBY_PLATFORM =~ /aarch64|arm64/i
23
+ if RUBY_PLATFORM.match?(/aarch64|arm64/i)
24
24
  libraries[libname]["windows-arm64"] || libraries[libname]["windows"] || libraries[libname]["all"]
25
25
  else
26
26
  libraries[libname]["windows-x64"] || libraries[libname]["windows"] || libraries[libname]["all"]
@@ -7,6 +7,7 @@ require_relative "configuration"
7
7
  require_relative "base_recipe"
8
8
  require_relative "zlib_recipe"
9
9
  require_relative "libexpat_recipe"
10
+ require_relative "libiconv_recipe"
10
11
  require_relative "openssl_recipe"
11
12
  require_relative "xz_recipe"
12
13
 
@@ -32,6 +33,7 @@ module LibarchiveBinary
32
33
  def create_dependencies
33
34
  @zlib_recipe = ZLibRecipe.new
34
35
  @expat_recipe = LibexpatRecipe.new
36
+ @iconv_recipe = LibiconvRecipe.new
35
37
  @openssl_recipe = OpensslRecipe.new
36
38
  @xz_recipe = XZRecipe.new
37
39
  end
@@ -42,10 +44,10 @@ module LibarchiveBinary
42
44
 
43
45
  def default_flags
44
46
  [
45
- "-DENABLE_OPENSSL:BOOL=ON", "-DENABLE_LIBB2:BOOL=OFF", "-DENABLE_LZ4:BOOL=OFF",
46
- "-DENABLE_LZO::BOOL=OFF", "-DENABLE_LZMA:BOOL=ON", "-DENABLE_ZSTD:BOOL=OFF",
47
- "-DENABLE_ZLIB::BOOL=ON", "-DENABLE_BZip2:BOOL=OFF", "-DENABLE_LIBXML2:BOOL=OFF",
48
- "-DENABLE_EXPAT::BOOL=ON", "-DENABLE_TAR:BOOL=OFF", "-DENABLE_CPIO::BOOL=OFF",
47
+ "-DENABLE_OPENSSL:BOOL=ON", "-DENABLE_LIBB2:BOOL=OFF", "-DENABLE_LZ4:BOOL=OFF",
48
+ "-DENABLE_LZO:BOOL=OFF", "-DENABLE_LZMA:BOOL=ON", "-DENABLE_ZSTD:BOOL=OFF",
49
+ "-DENABLE_ZLIB:BOOL=ON", "-DENABLE_BZip2:BOOL=OFF", "-DENABLE_LIBXML2:BOOL=OFF",
50
+ "-DENABLE_EXPAT:BOOL=ON", "-DENABLE_TAR:BOOL=OFF", "-DENABLE_CPIO:BOOL=OFF",
49
51
  "-DENABLE_CAT:BOOL=OFF", "-DENABLE_ACL:BOOL=OFF", "-DENABLE_TEST:BOOL=OFF",
50
52
  "-DENABLE_UNZIP:BOOL=OFF", "-DOPENSSL_USE_STATIC_LIBS=ON", "-DENABLE_XAR:BOOL=ON",
51
53
 
@@ -53,7 +55,11 @@ module LibarchiveBinary
53
55
  "-DOPENSSL_ROOT_DIR:PATH=#{@openssl_recipe.path}",
54
56
 
55
57
  # Add include paths to C flags so CMake's header detection can find them
56
- "-DCMAKE_C_FLAGS=-I#{@expat_recipe.path}/include -I#{@openssl_recipe.path}/include -I#{@xz_recipe.path}/include -I#{@zlib_recipe.path}/include",
58
+ "-DCMAKE_C_FLAGS=-I#{@expat_recipe.path}/include " \
59
+ "-I#{@iconv_recipe.path}/include " \
60
+ "-I#{@openssl_recipe.path}/include " \
61
+ "-I#{@xz_recipe.path}/include " \
62
+ "-I#{@zlib_recipe.path}/include",
57
63
 
58
64
  # Provide search paths for CMake to find libraries
59
65
  "-DCMAKE_INCLUDE_PATH:STRING=#{include_path}",
@@ -71,18 +77,19 @@ module LibarchiveBinary
71
77
  end
72
78
 
73
79
  def include_path
74
- paths = [@zlib_recipe.path, @expat_recipe.path, @openssl_recipe.path, @xz_recipe.path]
80
+ paths = [@zlib_recipe.path, @expat_recipe.path, @iconv_recipe.path, @openssl_recipe.path, @xz_recipe.path]
75
81
  paths.map { |k| "#{k}/include" }.join(";")
76
82
  end
77
83
 
78
84
  def library_path
79
- paths = [@zlib_recipe.path, @expat_recipe.path, @openssl_recipe.path, @xz_recipe.path]
85
+ paths = [@zlib_recipe.path, @expat_recipe.path, @iconv_recipe.path, @openssl_recipe.path, @xz_recipe.path]
80
86
  paths.map { |k| "#{k}/lib;#{k}/lib64" }.join(";")
81
87
  end
82
88
 
83
89
  def activate
84
90
  @zlib_recipe.activate
85
91
  @expat_recipe.activate
92
+ @iconv_recipe.activate
86
93
  @openssl_recipe.activate
87
94
  @xz_recipe.activate
88
95
 
@@ -100,6 +107,9 @@ module LibarchiveBinary
100
107
  @expat_recipe.host = @host if @host
101
108
  @expat_recipe.cook_if_not
102
109
 
110
+ @iconv_recipe.host = @host if @host
111
+ @iconv_recipe.cook_if_not
112
+
103
113
  @openssl_recipe.host = @host if @host
104
114
  @openssl_recipe.cook_if_not
105
115
 
@@ -107,8 +117,8 @@ module LibarchiveBinary
107
117
  @xz_recipe.cook_if_not
108
118
 
109
119
  # Set explicit LZMA environment variables for libarchive configure
110
- ENV['LIBLZMA_CFLAGS'] = "-I#{@xz_recipe.path}/include"
111
- ENV['LIBLZMA_LIBS'] = "-L#{@xz_recipe.path}/lib -llzma"
120
+ ENV["LIBLZMA_CFLAGS"] = "-I#{@xz_recipe.path}/include"
121
+ ENV["LIBLZMA_LIBS"] = "-L#{@xz_recipe.path}/lib -llzma"
112
122
 
113
123
  super
114
124
 
@@ -122,8 +132,7 @@ module LibarchiveBinary
122
132
  def install
123
133
  super
124
134
 
125
- libs = Dir.glob(File.join(port_path, "{lib,bin}", "*"))
126
- .grep(/\/(?:lib)?[a-zA-Z0-9\-]+\.(?:so|dylib|dll)$/)
135
+ libs = Dir.glob(File.join(port_path, "{lib,bin}", "*.{so,dylib,dll,DLL}"))
127
136
  FileUtils.cp_r(libs, lib_workpath, verbose: true)
128
137
  if lib_fullpath.nil?
129
138
  message("Cannot guess libarchive library name, skipping format verification")
@@ -21,7 +21,7 @@ module LibarchiveBinary
21
21
  # Set cross-compiler environment variables for aarch64
22
22
  env_vars = cross_compiler_env(host)
23
23
  cmd = ["env"] + env_vars.map { |k, v| "#{k}=#{v}" } +
24
- [cflags(host), ldflags(host), "./configure"] + computed_options
24
+ [cflags(host), ldflags(host), "./configure"] + computed_options
25
25
  execute("configure", cmd)
26
26
  end
27
27
 
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "base_recipe"
4
+
5
+ module LibarchiveBinary
6
+ class LibiconvRecipe < BaseRecipe
7
+ def initialize
8
+ super("libiconv")
9
+
10
+ @target = ROOT.join(@target).to_s
11
+ end
12
+
13
+ def configure_defaults
14
+ [
15
+ "--host=#{@host}",
16
+ "--disable-shared",
17
+ "--enable-static",
18
+ "--disable-nls",
19
+ ]
20
+ end
21
+
22
+ def configure
23
+ # Set cross-compiler environment variables for aarch64
24
+ env_vars = cross_compiler_env(host)
25
+ cmd = ["env"] + env_vars.map { |k, v| "#{k}=#{v}" } +
26
+ [cflags(host), ldflags(host), "./configure"] + computed_options
27
+ execute("configure", cmd)
28
+ end
29
+
30
+ def checkpoint
31
+ File.join(@target, "#{name}-#{version}-#{host}.installed")
32
+ end
33
+
34
+ def cook_if_not
35
+ cook unless File.exist?(checkpoint)
36
+ end
37
+
38
+ def cook
39
+ super
40
+
41
+ FileUtils.touch(checkpoint)
42
+ end
43
+ end
44
+ end
@@ -28,7 +28,7 @@ module LibarchiveBinary
28
28
  "--without-http",
29
29
  "--without-ftp",
30
30
  "--enable-static",
31
- "--disable-shared"
31
+ "--disable-shared",
32
32
  ]
33
33
  end
34
34
 
@@ -52,4 +52,4 @@ module LibarchiveBinary
52
52
  FileUtils.touch(checkpoint)
53
53
  end
54
54
  end
55
- end
55
+ end
@@ -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.3"
5
5
  end
@@ -21,7 +21,7 @@ module LibarchiveBinary
21
21
  # Set cross-compiler environment variables for aarch64
22
22
  env_vars = cross_compiler_env(host)
23
23
  cmd = ["env"] + env_vars.map { |k, v| "#{k}=#{v}" } +
24
- [cflags(host), ldflags(host), "./configure"] + computed_options
24
+ [cflags(host), ldflags(host), "./configure"] + computed_options
25
25
  execute("configure", cmd)
26
26
  end
27
27
 
@@ -36,7 +36,7 @@ module LibarchiveBinary
36
36
  # Set cross-compiler environment variables for aarch64
37
37
  env_vars = cross_compiler_env(host)
38
38
  cmd = ["env"] + env_vars.map { |k, v| "#{k}=#{v}" } +
39
- [cflags(host), ldflags(host), "./configure"] + computed_options
39
+ [cflags(host), ldflags(host), "./configure"] + computed_options
40
40
  execute("configure", cmd)
41
41
  end
42
42
  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.3
5
5
  platform: x86_64-linux-gnu
6
6
  authors:
7
7
  - Ribose Inc.
@@ -116,6 +116,7 @@ files:
116
116
  - lib/ffi-libarchive-binary/libarchive.so
117
117
  - lib/ffi-libarchive-binary/libarchive_recipe.rb
118
118
  - lib/ffi-libarchive-binary/libexpat_recipe.rb
119
+ - lib/ffi-libarchive-binary/libiconv_recipe.rb
119
120
  - lib/ffi-libarchive-binary/libxml2_recipe.rb
120
121
  - lib/ffi-libarchive-binary/openssl_recipe.rb
121
122
  - lib/ffi-libarchive-binary/version.rb