ffi-libarchive-binary 0.3.2-x64-mingw-ucrt → 0.4.0.rc1-x64-mingw-ucrt
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/.rubocop.yml +1 -0
- data/ext/configuration.yml +40 -0
- data/lib/ffi-libarchive-binary/base_recipe.rb +11 -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 -16
- data/lib/ffi-libarchive-binary/libexpat_recipe.rb +1 -8
- data/lib/ffi-libarchive-binary/openssl_recipe.rb +1 -9
- data/lib/ffi-libarchive-binary/version.rb +1 -1
- data/lib/ffi-libarchive-binary/xz_recipe.rb +1 -29
- data/lib/ffi-libarchive-binary/zlib_recipe.rb +1 -9
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38e0558a7c1151c0e756bb289f7b8d2e2666b00c7b3cb8012795a0e41ac657da
|
4
|
+
data.tar.gz: 07c146e7b7363629d817f3f38d560656f9c8c633475ec059492147bb88d6dcd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 236ce7206505b242ed3aa8391d50fedb894581c734670b3af55a0a5274432f023bb91764207825aeb81ff632b404937236b756e5ddf67f9aa03309f5c21cd5b6
|
7
|
+
data.tar.gz: 3f65c7f781f28e994b06fe6f7088d0aeb530380a8344b6042e9c8740edb14158a1df242a429b25acd0aefaef12c65ef758c7071642bc24c7c1a872a8f37c580d
|
data/.rubocop.yml
CHANGED
@@ -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,17 @@ 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
|
+
@files << {
|
36
|
+
url: library["url"],
|
37
|
+
sha256: library["sha256"],
|
38
|
+
}
|
30
39
|
@printed = {}
|
31
40
|
end
|
32
41
|
|
@@ -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,22 +13,15 @@ require_relative "xz_recipe"
|
|
12
13
|
module LibarchiveBinary
|
13
14
|
class LibarchiveRecipe < MiniPortileCMake
|
14
15
|
ROOT = Pathname.new(File.expand_path("../..", __dir__))
|
15
|
-
|
16
|
-
# libarchive 3.7.x uses new GLIBC packaging ( links to libc only and not to pthread, dl, ...)
|
17
|
-
# this does not link work on Ubuntu 20 with GLIBC 3.21
|
18
|
-
#
|
19
|
-
# Cannot build 3.7.x on Ubuntu 22 either because it creates a reference to GLIB 3.22 (min) that does
|
20
|
-
# not resolve on Ubuntu 20
|
21
|
-
#
|
22
|
-
# So without patching we are stick to 3.6.2 until Ubuntu 20 shall be supported
|
23
|
-
#
|
16
|
+
NAME = "libarchive"
|
24
17
|
def initialize
|
25
|
-
|
18
|
+
libarchive = LibarchiveBinary.library_for(NAME)
|
19
|
+
super(NAME, libarchive["version"])
|
26
20
|
@printed = {}
|
27
21
|
|
28
22
|
@files << {
|
29
|
-
url:
|
30
|
-
sha256: "
|
23
|
+
url: libarchive["url"],
|
24
|
+
sha256: libarchive["sha256"],
|
31
25
|
}
|
32
26
|
|
33
27
|
@target = ROOT.join(@target).to_s
|
@@ -53,9 +47,9 @@ module LibarchiveBinary
|
|
53
47
|
"-DENABLE_ZLIB::BOOL=ON", "-DENABLE_BZip2:BOOL=OFF", "-DENABLE_LIBXML2:BOOL=OFF",
|
54
48
|
"-DENABLE_EXPAT::BOOL=ON", "-DENABLE_TAR:BOOL=OFF", "-DENABLE_ICONV::BOOL=OFF",
|
55
49
|
"-DENABLE_CPIO::BOOL=OFF", "-DENABLE_CAT:BOOL=OFF", "-DENABLE_ACL:BOOL=OFF",
|
56
|
-
"-DENABLE_TEST:BOOL=OFF", "-DENABLE_UNZIP:BOOL=OFF",
|
57
|
-
"-DCMAKE_INCLUDE_PATH=#{include_path}",
|
58
|
-
"-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}"
|
59
53
|
]
|
60
54
|
end
|
61
55
|
|
@@ -76,7 +70,7 @@ module LibarchiveBinary
|
|
76
70
|
|
77
71
|
def library_path
|
78
72
|
paths = [@zlib_recipe.path, @expat_recipe.path, @openssl_recipe.path, @xz_recipe.path]
|
79
|
-
paths.map { |k| "#{k}/lib" }.join(";")
|
73
|
+
paths.map { |k| "#{k}/lib;#{k}/lib64" }.join(";")
|
80
74
|
end
|
81
75
|
|
82
76
|
def activate
|
@@ -136,6 +130,27 @@ module LibarchiveBinary
|
|
136
130
|
@lib_fullpath ||= lib_filename.nil? ? nil : File.join(lib_workpath, lib_filename)
|
137
131
|
end
|
138
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
|
+
|
139
154
|
def verify_lib
|
140
155
|
begin
|
141
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,16 +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 << {
|
23
|
-
url: "https://www.openssl.org/source/openssl-1.1.1n.tar.gz",
|
24
|
-
sha256: "40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a",
|
25
|
-
}
|
26
|
-
|
18
|
+
super("openssl")
|
27
19
|
@target = ROOT.join(@target).to_s
|
28
20
|
end
|
29
21
|
|
@@ -4,39 +4,11 @@ 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
|
-
|
8
|
+
super("xz")
|
23
9
|
@target = ROOT.join(@target).to_s
|
24
10
|
end
|
25
11
|
|
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
|
-
}
|
38
|
-
end
|
39
|
-
|
40
12
|
def configure_defaults
|
41
13
|
[
|
42
14
|
"--host=#{@host}",
|
@@ -5,16 +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
|
-
|
9
|
+
super("zlib")
|
18
10
|
@target = ROOT.join(@target).to_s
|
19
11
|
end
|
20
12
|
|
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.rc1
|
5
5
|
platform: x64-mingw-ucrt
|
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-24 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
|
@@ -158,9 +160,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
160
|
version: 2.7.0
|
159
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
162
|
requirements:
|
161
|
-
- - "
|
163
|
+
- - ">"
|
162
164
|
- !ruby/object:Gem::Version
|
163
|
-
version:
|
165
|
+
version: 1.3.1
|
164
166
|
requirements: []
|
165
167
|
rubygems_version: 3.3.27
|
166
168
|
signing_key:
|