ffi-libarchive-binary 0.3.4-x64-mingw32 → 0.4.0-x64-mingw32
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 +4 -4
- data/ext/configuration.yml +40 -0
- data/lib/ffi-libarchive-binary/base_recipe.rb +12 -2
- data/lib/ffi-libarchive-binary/configuration.rb +31 -0
- data/lib/ffi-libarchive-binary/libarchive.dll +0 -0
- data/lib/ffi-libarchive-binary/libarchive_recipe.rb +31 -7
- data/lib/ffi-libarchive-binary/libexpat_recipe.rb +1 -8
- data/lib/ffi-libarchive-binary/openssl_recipe.rb +1 -16
- data/lib/ffi-libarchive-binary/version.rb +1 -1
- data/lib/ffi-libarchive-binary/xz_recipe.rb +1 -30
- data/lib/ffi-libarchive-binary/zlib_recipe.rb +1 -10
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6f07e32e296c41468f3cb52604e83055deb89fcbed0fd667acb2cce47a07011
|
4
|
+
data.tar.gz: 166a3bed1d62eb419a658c46c38e74ea4780f7830d839e0769765c600df0e548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c24a6e8ff1a50c8643b78ad4ab36048e976d2a50498a6187a979e0d75ff36e152d04d0efc6dd6aa697b719fe1395fefce9c78b18874c0e20185b2116e710977d
|
7
|
+
data.tar.gz: aef6a61354cd8f565af872e8703146b20f3827bf4b419fcc3f35751a06b4a2639068f214d4f37d04331d86d6d044d4838b4123c4955d1b76daecfa3a1e6d2c76
|
@@ -0,0 +1,40 @@
|
|
1
|
+
libraries:
|
2
|
+
zlib:
|
3
|
+
all:
|
4
|
+
version: "1.3.1"
|
5
|
+
url: "http://zlib.net/fossils/zlib-1.3.1.tar.gz"
|
6
|
+
sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"
|
7
|
+
libexpat:
|
8
|
+
all:
|
9
|
+
version: "2.6.4"
|
10
|
+
url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat-2.6.4.tar.gz"
|
11
|
+
sha256: "fd03b7172b3bd7427a3e7a812063f74754f24542429b634e0db6511b53fb2278"
|
12
|
+
# openssl:
|
13
|
+
# version 3.x.y requires pod2man, that is not easily available on Windows
|
14
|
+
openssl:
|
15
|
+
windows:
|
16
|
+
version: "1.1.1w"
|
17
|
+
url: "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz"
|
18
|
+
sha256: "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8"
|
19
|
+
all:
|
20
|
+
version: "3.3.2"
|
21
|
+
url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz"
|
22
|
+
sha256: "2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281"
|
23
|
+
# xz:
|
24
|
+
# versions > 5.2.4 get crazy on MinGW
|
25
|
+
# versions <= 5.2.5 do not support arm64-apple-darwin target
|
26
|
+
# version 5.2.7 could not be linked statically to libarchive
|
27
|
+
xz:
|
28
|
+
windows:
|
29
|
+
version: "5.2.4"
|
30
|
+
url: "https://tukaani.org/xz/xz-5.2.4.tar.gz"
|
31
|
+
sha256: "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145"
|
32
|
+
all:
|
33
|
+
version: "5.2.6"
|
34
|
+
url: "https://tukaani.org/xz/xz-5.2.6.tar.gz"
|
35
|
+
sha256: "a2105abee17bcd2ebd15ced31b4f5eda6e17efd6b10f921a01cda4a44c91b3a0"
|
36
|
+
libarchive:
|
37
|
+
all:
|
38
|
+
version: "3.7.7"
|
39
|
+
url: "https://www.libarchive.org/downloads/libarchive-3.7.7.tar.gz"
|
40
|
+
sha256: "4cc540a3e9a1eebdefa1045d2e4184831100667e6d7d5b315bb1cbc951f8ddff"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "mini_portile2"
|
4
|
+
require_relative "configuration"
|
4
5
|
|
5
6
|
module LibarchiveBinary
|
6
7
|
FORMATS = {
|
@@ -24,9 +25,18 @@ module LibarchiveBinary
|
|
24
25
|
"arm64-apple-darwin" => "libarchive.dylib",
|
25
26
|
}.freeze
|
26
27
|
|
28
|
+
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
29
|
+
|
27
30
|
class BaseRecipe < MiniPortile
|
28
|
-
def initialize(name
|
29
|
-
|
31
|
+
def initialize(name)
|
32
|
+
library = LibarchiveBinary.library_for(name)
|
33
|
+
version = library["version"]
|
34
|
+
super(name, version)
|
35
|
+
@target = ROOT.join(@target).to_s
|
36
|
+
@files << {
|
37
|
+
url: library["url"],
|
38
|
+
sha256: library["sha256"],
|
39
|
+
}
|
30
40
|
@printed = {}
|
31
41
|
end
|
32
42
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "psych"
|
4
|
+
require "yaml"
|
5
|
+
|
6
|
+
module LibarchiveBinary
|
7
|
+
def self.libraries
|
8
|
+
configuration_file = File.join(File.dirname(__FILE__), "..", "..", "ext", "configuration.yml")
|
9
|
+
@@libraries ||= ::YAML.load_file(configuration_file)["libraries"] || {}
|
10
|
+
rescue Psych::SyntaxError => e
|
11
|
+
puts "Warning: The configuration file '#{configuration_file}' contains invalid YAML syntax."
|
12
|
+
puts e.message
|
13
|
+
exit 1
|
14
|
+
rescue StandardError => e
|
15
|
+
puts "An unexpected error occurred while loading the configuration file '#{configuration_file}'."
|
16
|
+
puts e.message
|
17
|
+
exit 1
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.library_for(libname)
|
21
|
+
if MiniPortile::windows?
|
22
|
+
libraries[libname]["windows"] || libraries[libname]["all"]
|
23
|
+
else
|
24
|
+
libraries[libname]["all"]
|
25
|
+
end
|
26
|
+
rescue StandardError => e
|
27
|
+
puts "Failed to load library configuration for '#{libname}'."
|
28
|
+
puts e.message
|
29
|
+
exit 1
|
30
|
+
end
|
31
|
+
end
|
Binary file
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require "pathname"
|
4
4
|
require "open3"
|
5
5
|
|
6
|
+
require_relative "configuration"
|
6
7
|
require_relative "base_recipe"
|
7
8
|
require_relative "zlib_recipe"
|
8
9
|
require_relative "libexpat_recipe"
|
@@ -12,13 +13,15 @@ require_relative "xz_recipe"
|
|
12
13
|
module LibarchiveBinary
|
13
14
|
class LibarchiveRecipe < MiniPortileCMake
|
14
15
|
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
16
|
+
NAME = "libarchive"
|
15
17
|
def initialize
|
16
|
-
|
18
|
+
libarchive = LibarchiveBinary.library_for(NAME)
|
19
|
+
super(NAME, libarchive["version"])
|
17
20
|
@printed = {}
|
18
21
|
|
19
22
|
@files << {
|
20
|
-
url:
|
21
|
-
sha256: "
|
23
|
+
url: libarchive["url"],
|
24
|
+
sha256: libarchive["sha256"],
|
22
25
|
}
|
23
26
|
|
24
27
|
@target = ROOT.join(@target).to_s
|
@@ -44,9 +47,9 @@ module LibarchiveBinary
|
|
44
47
|
"-DENABLE_ZLIB::BOOL=ON", "-DENABLE_BZip2:BOOL=OFF", "-DENABLE_LIBXML2:BOOL=OFF",
|
45
48
|
"-DENABLE_EXPAT::BOOL=ON", "-DENABLE_TAR:BOOL=OFF", "-DENABLE_ICONV::BOOL=OFF",
|
46
49
|
"-DENABLE_CPIO::BOOL=OFF", "-DENABLE_CAT:BOOL=OFF", "-DENABLE_ACL:BOOL=OFF",
|
47
|
-
"-DENABLE_TEST:BOOL=OFF", "-DENABLE_UNZIP:BOOL=OFF",
|
48
|
-
"-DCMAKE_INCLUDE_PATH=#{include_path}",
|
49
|
-
"-DCMAKE_LIBRARY_PATH=#{library_path}"
|
50
|
+
"-DENABLE_TEST:BOOL=OFF", "-DENABLE_UNZIP:BOOL=OFF", "-DOPENSSL_USE_STATIC_LIBS=ON",
|
51
|
+
"-DCMAKE_INCLUDE_PATH:STRING=#{include_path}",
|
52
|
+
"-DCMAKE_LIBRARY_PATH:STRING=#{library_path}"
|
50
53
|
]
|
51
54
|
end
|
52
55
|
|
@@ -67,7 +70,7 @@ module LibarchiveBinary
|
|
67
70
|
|
68
71
|
def library_path
|
69
72
|
paths = [@zlib_recipe.path, @expat_recipe.path, @openssl_recipe.path, @xz_recipe.path]
|
70
|
-
paths.map { |k| "#{k}/lib" }.join(";")
|
73
|
+
paths.map { |k| "#{k}/lib;#{k}/lib64" }.join(";")
|
71
74
|
end
|
72
75
|
|
73
76
|
def activate
|
@@ -127,6 +130,27 @@ module LibarchiveBinary
|
|
127
130
|
@lib_fullpath ||= lib_filename.nil? ? nil : File.join(lib_workpath, lib_filename)
|
128
131
|
end
|
129
132
|
|
133
|
+
def libraries
|
134
|
+
configuration_file = File.join(File.dirname(__FILE__), "..", "..", "ext", "configuration.yml")
|
135
|
+
@libraries ||= ::YAML.load_file(configuration_file)["libraries"] || {}
|
136
|
+
rescue Psych::SyntaxError => e
|
137
|
+
puts "Warning: The configuration file '#{configuration_file}' contains invalid YAML syntax."
|
138
|
+
puts e.message
|
139
|
+
exit 1
|
140
|
+
rescue StandardError => e
|
141
|
+
puts "An unexpected error occurred while loading the configuration file '#{configuration_file}'."
|
142
|
+
puts e.message
|
143
|
+
exit 1
|
144
|
+
end
|
145
|
+
|
146
|
+
def library_for(libname)
|
147
|
+
libraries[libname][MiniPortile::windows? ? "windows" : "all"]
|
148
|
+
rescue StandardError => e
|
149
|
+
puts "Failed to load library configuration for '#{libname}'."
|
150
|
+
puts e.message
|
151
|
+
exit 1
|
152
|
+
end
|
153
|
+
|
130
154
|
def verify_lib
|
131
155
|
begin
|
132
156
|
out, = Open3.capture2("file #{lib_fullpath}")
|
@@ -4,15 +4,8 @@ require_relative "base_recipe"
|
|
4
4
|
|
5
5
|
module LibarchiveBinary
|
6
6
|
class LibexpatRecipe < BaseRecipe
|
7
|
-
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
8
|
-
|
9
7
|
def initialize
|
10
|
-
super("libexpat"
|
11
|
-
|
12
|
-
@files << {
|
13
|
-
url: "https://github.com/libexpat/libexpat/releases/download/R_2_6_4/expat-2.6.4.tar.gz",
|
14
|
-
sha256: "fd03b7172b3bd7427a3e7a812063f74754f24542429b634e0db6511b53fb2278",
|
15
|
-
}
|
8
|
+
super("libexpat")
|
16
9
|
|
17
10
|
@target = ROOT.join(@target).to_s
|
18
11
|
end
|
@@ -14,13 +14,8 @@ module LibarchiveBinary
|
|
14
14
|
ENV_CMD = ["env", "CFLAGS=-fPIC", "LDFLAGS=-fPIC"].freeze
|
15
15
|
|
16
16
|
class OpensslRecipe < BaseRecipe
|
17
|
-
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
18
|
-
|
19
17
|
def initialize
|
20
|
-
super("openssl"
|
21
|
-
|
22
|
-
@files << source_archive
|
23
|
-
@target = ROOT.join(@target).to_s
|
18
|
+
super("openssl")
|
24
19
|
end
|
25
20
|
|
26
21
|
def configure
|
@@ -49,15 +44,5 @@ module LibarchiveBinary
|
|
49
44
|
|
50
45
|
FileUtils.touch(checkpoint)
|
51
46
|
end
|
52
|
-
|
53
|
-
def source_archive
|
54
|
-
if MiniPortile::windows?
|
55
|
-
{ url: "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz",
|
56
|
-
sha256: "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8" }
|
57
|
-
else
|
58
|
-
{ url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz",
|
59
|
-
sha256: "2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281" }
|
60
|
-
end
|
61
|
-
end
|
62
47
|
end
|
63
48
|
end
|
@@ -4,37 +4,8 @@ require_relative "base_recipe"
|
|
4
4
|
|
5
5
|
module LibarchiveBinary
|
6
6
|
class XZRecipe < BaseRecipe
|
7
|
-
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
8
|
-
|
9
|
-
# As of 19.10.2022
|
10
|
-
# versions > 5.2.4 get crazy on MinGW
|
11
|
-
# versions <= 5.2.5 do not support arm64-apple-darwin target
|
12
|
-
# version 5.2.7 could not be linked statically to libarchive
|
13
|
-
|
14
7
|
def initialize
|
15
|
-
|
16
|
-
super("xz", "5.2.4")
|
17
|
-
windows_files
|
18
|
-
else
|
19
|
-
super("xz", "5.2.6")
|
20
|
-
not_windows_files
|
21
|
-
end
|
22
|
-
|
23
|
-
@target = ROOT.join(@target).to_s
|
24
|
-
end
|
25
|
-
|
26
|
-
def windows_files
|
27
|
-
@files << {
|
28
|
-
url: "https://tukaani.org/xz/xz-5.2.4.tar.gz",
|
29
|
-
sha256: "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145",
|
30
|
-
}
|
31
|
-
end
|
32
|
-
|
33
|
-
def not_windows_files
|
34
|
-
@files << {
|
35
|
-
url: "https://tukaani.org/xz/xz-5.2.6.tar.gz",
|
36
|
-
sha256: "a2105abee17bcd2ebd15ced31b4f5eda6e17efd6b10f921a01cda4a44c91b3a0",
|
37
|
-
}
|
8
|
+
super("xz")
|
38
9
|
end
|
39
10
|
|
40
11
|
def configure_defaults
|
@@ -5,17 +5,8 @@ require_relative "base_recipe"
|
|
5
5
|
|
6
6
|
module LibarchiveBinary
|
7
7
|
class ZLibRecipe < BaseRecipe
|
8
|
-
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
9
|
-
|
10
8
|
def initialize
|
11
|
-
super("zlib"
|
12
|
-
|
13
|
-
@files << {
|
14
|
-
url: "http://zlib.net/fossils/zlib-1.3.1.tar.gz",
|
15
|
-
sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23",
|
16
|
-
}
|
17
|
-
|
18
|
-
@target = ROOT.join(@target).to_s
|
9
|
+
super("zlib")
|
19
10
|
end
|
20
11
|
|
21
12
|
def configure_defaults
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-libarchive-binary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,10 +128,12 @@ files:
|
|
128
128
|
- README.adoc
|
129
129
|
- Rakefile
|
130
130
|
- ext/Makefile
|
131
|
+
- ext/configuration.yml
|
131
132
|
- ext/extconf.rb
|
132
133
|
- ffi-libarchive-binary.gemspec
|
133
134
|
- lib/ffi-libarchive-binary.rb
|
134
135
|
- lib/ffi-libarchive-binary/base_recipe.rb
|
136
|
+
- lib/ffi-libarchive-binary/configuration.rb
|
135
137
|
- lib/ffi-libarchive-binary/libarchive.dll
|
136
138
|
- lib/ffi-libarchive-binary/libarchive_recipe.rb
|
137
139
|
- lib/ffi-libarchive-binary/libexpat_recipe.rb
|