ffi-libarchive-binary 0.2.6-x86_64-linux → 0.3.0-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +1,10 @@
1
- require "mini_portile2"
1
+ # frozen_string_literal: true
2
+
2
3
  require "pathname"
4
+ require_relative "base_recipe"
3
5
 
4
6
  module LibarchiveBinary
5
- def self.windows?
6
- RbConfig::CONFIG["target_os"] =~ /mingw32|mswin/
7
- end
8
-
9
- # inspired by https://github.com/sparklemotion/nokogiri/blob/35823bd/ext/nokogiri/extconf.rb#L655
10
- class ZLibRecipe < MiniPortile
7
+ class ZLibRecipe < BaseRecipe
11
8
  ROOT = Pathname.new(File.expand_path("../..", __dir__))
12
9
 
13
10
  def initialize
@@ -15,7 +12,7 @@ module LibarchiveBinary
15
12
 
16
13
  @files << {
17
14
  url: "http://zlib.net/fossils/zlib-1.2.11.tar.gz",
18
- sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
15
+ sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
19
16
  }
20
17
 
21
18
  @target = ROOT.join(@target).to_s
@@ -23,31 +20,36 @@ module LibarchiveBinary
23
20
 
24
21
  def configure_defaults
25
22
  [
26
- "--static"
23
+ "--static",
27
24
  ]
28
25
  end
29
26
 
27
+ def configure_windows
28
+ mk = File.read("win32/Makefile.gcc")
29
+ File.open("win32/Makefile.gcc", "wb") do |f|
30
+ f.puts "BINARY_PATH = #{path}/bin"
31
+ f.puts "LIBRARY_PATH = #{path}/lib"
32
+ f.puts "INCLUDE_PATH = #{path}/include"
33
+ f.puts "SHARED_MODE = 0"
34
+ f.puts "LOC = -fPIC"
35
+ f.puts mk
36
+ end
37
+ end
38
+
30
39
  def configure
31
- if LibarchiveBinary::windows?
40
+ if MiniPortile::windows?
32
41
  Dir.chdir(work_path) do
33
- mk = File.read("win32/Makefile.gcc")
34
- File.open("win32/Makefile.gcc", "wb") do |f|
35
- f.puts "BINARY_PATH = #{path}/bin"
36
- f.puts "LIBRARY_PATH = #{path}/lib"
37
- f.puts "INCLUDE_PATH = #{path}/include"
38
- f.puts "SHARED_MODE = 0"
39
- f.puts "LOC = -fPIC"
40
- f.puts mk
41
- end
42
+ configure_windows
42
43
  end
43
44
  else
44
- cmd = ["env", "CFLAGS=-fPIC", "LDFLAGS=-fPIC", "./configure"] + computed_options
45
+ cmd = ["env", cflags(host), ldflags(host),
46
+ "./configure"] + computed_options
45
47
  execute("configure", cmd)
46
48
  end
47
49
  end
48
50
 
49
51
  def configured?
50
- if LibarchiveBinary::windows?
52
+ if MiniPortile::windows?
51
53
  Dir.chdir(work_path) do
52
54
  !!(File.read("win32/Makefile.gcc") =~ /^BINARY_PATH/)
53
55
  end
@@ -57,7 +59,7 @@ module LibarchiveBinary
57
59
  end
58
60
 
59
61
  def compile
60
- if LibarchiveBinary::windows?
62
+ if MiniPortile::windows?
61
63
  execute("compile", "make -f win32/Makefile.gcc libz.a")
62
64
  else
63
65
  super
@@ -65,7 +67,7 @@ module LibarchiveBinary
65
67
  end
66
68
 
67
69
  def install
68
- if LibarchiveBinary::windows?
70
+ if MiniPortile::windows?
69
71
  execute("install", "make -f win32/Makefile.gcc install")
70
72
  else
71
73
  super
@@ -73,7 +75,7 @@ module LibarchiveBinary
73
75
  end
74
76
 
75
77
  def checkpoint
76
- File.join(@target, "#{self.name}-#{self.version}-#{self.host}.installed")
78
+ File.join(@target, "#{name}-#{version}-#{host}.installed")
77
79
  end
78
80
 
79
81
  def cook_if_not
@@ -86,4 +88,4 @@ module LibarchiveBinary
86
88
  FileUtils.touch(checkpoint)
87
89
  end
88
90
  end
89
- end
91
+ end
@@ -14,7 +14,7 @@ module LibarchiveBinary
14
14
 
15
15
  def self.lib_filename
16
16
  if FFI::Platform.windows?
17
- "libarchive-13.dll"
17
+ "libarchive.dll"
18
18
  elsif FFI::Platform.mac?
19
19
  "libarchive.dylib"
20
20
  else
@@ -0,0 +1,25 @@
1
+ #
2
+ # CMake Toolchain file for crosscompiling for aarch64-linux-gnu.
3
+ #
4
+ set(CMAKE_SYSTEM_NAME Linux)
5
+ set(CMAKE_SYSTEM_PROCESSOR aarch64)
6
+
7
+ set(TOOLCHAIN_PREFIX aarch64-linux-gnu-)
8
+ execute_process(
9
+ COMMAND which ${TOOLCHAIN_PREFIX}gcc
10
+ OUTPUT_VARIABLE BINUTILS_PATH
11
+ OUTPUT_STRIP_TRAILING_WHITESPACE
12
+ )
13
+
14
+ get_filename_component(AARCH64_TOOLCHAIN_DIR ${BINUTILS_PATH} DIRECTORY)
15
+
16
+ set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
17
+ set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
18
+ set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
19
+ set(CMAKE_C_COMPILER_WORKS 1)
20
+ set(CMAKE_CXX_COMPILER_WORKS 1)
21
+
22
+ set(CMAKE_FIND_ROOT_PATH ${BINUTILS_PATH})
23
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
24
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
25
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
metadata CHANGED
@@ -1,15 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-libarchive-binary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.3.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.3'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 2.3.22
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '2.3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 2.3.22
33
+ - !ruby/object:Gem::Dependency
34
+ name: ffi
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.0'
13
47
  - !ruby/object:Gem::Dependency
14
48
  name: ffi-libarchive
15
49
  requirement: !ruby/object:Gem::Requirement
@@ -24,6 +58,62 @@ dependencies:
24
58
  - - "~>"
25
59
  - !ruby/object:Gem::Version
26
60
  version: '1.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '13.0'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '13.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '3.0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '3.0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rubocop
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.7'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '1.7'
103
+ - !ruby/object:Gem::Dependency
104
+ name: rubocop-performance
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.15'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '1.15'
27
117
  description: Contains pre-compiled and install-time-compiled binaries for ffi-libarchive
28
118
  email:
29
119
  - open.source@ribose.com
@@ -33,6 +123,7 @@ extra_rdoc_files: []
33
123
  files:
34
124
  - ".gitignore"
35
125
  - ".rspec"
126
+ - ".rubocop.yml"
36
127
  - Gemfile
37
128
  - README.adoc
38
129
  - Rakefile
@@ -40,13 +131,15 @@ files:
40
131
  - ext/extconf.rb
41
132
  - ffi-libarchive-binary.gemspec
42
133
  - lib/ffi-libarchive-binary.rb
134
+ - lib/ffi-libarchive-binary/base_recipe.rb
43
135
  - lib/ffi-libarchive-binary/libarchive.so
44
136
  - lib/ffi-libarchive-binary/libarchive_recipe.rb
45
137
  - lib/ffi-libarchive-binary/libexpat_recipe.rb
138
+ - lib/ffi-libarchive-binary/openssl_recipe.rb
46
139
  - lib/ffi-libarchive-binary/version.rb
140
+ - lib/ffi-libarchive-binary/xz_recipe.rb
47
141
  - lib/ffi-libarchive-binary/zlib_recipe.rb
48
- - updates/config.guess
49
- - updates/config.sub
142
+ - toolchain/aarch64-linux-gnu.cmake
50
143
  homepage: https://github.com/fontist/ffi-libarchive-binary
51
144
  licenses:
52
145
  - BSD-3-Clause
@@ -62,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
155
  requirements:
63
156
  - - ">="
64
157
  - !ruby/object:Gem::Version
65
- version: 2.4.0
158
+ version: 2.7.0
66
159
  required_rubygems_version: !ruby/object:Gem::Requirement
67
160
  requirements:
68
161
  - - ">="