ffi-libarchive-binary 0.2.3-x86-linux → 0.2.4-x86-linux
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/Rakefile +2 -3
- data/ffi-libarchive-binary.gemspec +2 -0
- data/lib/ffi-libarchive-binary.rb +19 -5
- data/lib/ffi-libarchive-binary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69e4b963b4e2b5cf3795313799bd681c1f0271d6
|
4
|
+
data.tar.gz: cafd44b7faf3201ce10f083b53de4e09126ec4b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de2f29f5f066dd81a6ec2607e33b52abd612528676e2ee276c2b5417685fd1ab0f6a6291772e2269b1e552fb9acf562ab5e7409d7175dfb6e2da0da127a0bca5
|
7
|
+
data.tar.gz: c6cf8b691032ccc95ab133df119fac91bc7a39e90e0a4f95265977dab3f600bd667f7a77c416f2922aa81adfab9d1056be820d2dadec4ab8f9f876c8a4cf9461
|
data/Rakefile
CHANGED
@@ -12,9 +12,6 @@ end
|
|
12
12
|
desc "Define the gem task to build on any platform (compile on install)"
|
13
13
|
task "platform:any" do
|
14
14
|
spec = Gem::Specification::load("ffi-libarchive-binary.gemspec").dup
|
15
|
-
spec.extensions = ['ext/extconf.rb']
|
16
|
-
spec.add_runtime_dependency("mini_portile2", "~> 2.0")
|
17
|
-
|
18
15
|
task = Gem::PackageTask.new(spec)
|
19
16
|
task.define
|
20
17
|
end
|
@@ -39,6 +36,8 @@ platforms.each do |platform, host, lib|
|
|
39
36
|
spec = Gem::Specification::load("ffi-libarchive-binary.gemspec").dup
|
40
37
|
spec.platform = Gem::Platform.new(platform)
|
41
38
|
spec.files += ["lib/ffi-libarchive-binary/#{lib}"]
|
39
|
+
spec.extensions = []
|
40
|
+
spec.dependencies.reject! { |d| d.name == "mini_portile2" }
|
42
41
|
|
43
42
|
task = Gem::PackageTask.new(spec)
|
44
43
|
task.define
|
@@ -25,6 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.bindir = "exe"
|
26
26
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
|
+
spec.extensions = ['ext/extconf.rb']
|
28
29
|
|
29
30
|
spec.add_runtime_dependency "ffi-libarchive", "~> 1.0"
|
31
|
+
spec.add_runtime_dependency "mini_portile2", "~> 2.0"
|
30
32
|
end
|
@@ -7,18 +7,32 @@ module LibarchiveBinary
|
|
7
7
|
class Error < StandardError; end
|
8
8
|
|
9
9
|
LIBRARY_PATH = Pathname.new(File.join(__dir__, "ffi-libarchive-binary"))
|
10
|
+
|
11
|
+
def self.lib_path
|
12
|
+
LIBRARY_PATH.join(lib_filename).to_s
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.lib_filename
|
16
|
+
if FFI::Platform.windows?
|
17
|
+
"libarchive-13.dll"
|
18
|
+
elsif FFI::Platform.mac?
|
19
|
+
"libarchive.dylib"
|
20
|
+
else
|
21
|
+
"libarchive.so"
|
22
|
+
end
|
23
|
+
end
|
10
24
|
end
|
11
25
|
|
12
26
|
module Archive
|
13
27
|
module C
|
14
28
|
def self.ffi_lib(*args)
|
15
29
|
prefixed = args.map do |names|
|
16
|
-
|
17
|
-
|
18
|
-
LibarchiveBinary
|
30
|
+
paths = names.is_a?(Array) ? names : [names]
|
31
|
+
if paths.any? { |f| f.include?("libarchive") }
|
32
|
+
[LibarchiveBinary.lib_path] + paths
|
33
|
+
else
|
34
|
+
names
|
19
35
|
end
|
20
|
-
|
21
|
-
with_path + filenames
|
22
36
|
end
|
23
37
|
|
24
38
|
super(*prefixed)
|
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.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: x86-linux
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi-libarchive
|