ffi-libarchive-binary 0.4.1 → 0.4.2
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/README.adoc +61 -0
- data/Rakefile +6 -0
- data/ext/configuration.yml +14 -9
- data/ffi-libarchive-binary.gemspec +13 -4
- data/lib/ffi-libarchive-binary/base_recipe.rb +20 -0
- data/lib/ffi-libarchive-binary/configuration.rb +6 -1
- data/lib/ffi-libarchive-binary/libarchive_recipe.rb +19 -8
- data/lib/ffi-libarchive-binary/libexpat_recipe.rb +4 -2
- data/lib/ffi-libarchive-binary/libxml2_recipe.rb +55 -0
- data/lib/ffi-libarchive-binary/openssl_recipe.rb +13 -4
- data/lib/ffi-libarchive-binary/version.rb +1 -1
- data/lib/ffi-libarchive-binary/xz_recipe.rb +4 -2
- data/lib/ffi-libarchive-binary/zlib_recipe.rb +4 -2
- data/toolchain/aarch64-linux-gnu.cmake +5 -18
- metadata +4 -26
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f9abf6ba2110443ad8bb4dfcb3f18ed17e2ea6f76ef5a35179527cb4c417c8b
|
|
4
|
+
data.tar.gz: fd63afa8b8c66c725e971247fe9d6608eaf7fa5be3430485e468c6cb858f7350
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 164f11089192293ea1d0b32bc72081d55eaa490ed2a3761b901e54531cf7e0299e26a30957bf8bbbfff54f731d5dbae93b0c45224f63d91140ff507416af7466
|
|
7
|
+
data.tar.gz: ccd6907d03c690fbfb15c648f01dd38880218147f42fb83c7926d8a436f87bc69f96518aa67f2cc56123534a8a8bc9b3176a1f85de01990b7e0da22cb5c71a80
|
data/README.adoc
CHANGED
|
@@ -83,3 +83,64 @@ Here are a few technical guidelines to follow:
|
|
|
83
83
|
This gem is distributed with a BSD 3-Clause license.
|
|
84
84
|
|
|
85
85
|
This gem is developed, maintained and funded by https://www.ribose.com/[Ribose Inc.]
|
|
86
|
+
|
|
87
|
+
=== Supported platforms
|
|
88
|
+
|
|
89
|
+
The following platforms are officially tested and supported:
|
|
90
|
+
|
|
91
|
+
[cols="1,1,1,1",options="header"]
|
|
92
|
+
|===
|
|
93
|
+
| Platform | Architecture | Ruby Versions | Status
|
|
94
|
+
|
|
95
|
+
| Windows 2022 | x86_64 | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
96
|
+
| Windows 2025 | x86_64 | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
97
|
+
| macOS 15 | ARM64 (Apple Silicon) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
98
|
+
| macOS 15 Large | x86_64 (Intel) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
99
|
+
| macOS 26 | ARM64 (Apple Silicon) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
100
|
+
| Ubuntu 24.04 | x86_64 (glibc) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
101
|
+
| Ubuntu 22.04 | x86_64 (glibc) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
102
|
+
| Alpine Linux | x86_64 (musl) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
103
|
+
| Ubuntu 24.04 | ARM64 (glibc) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
104
|
+
| Ubuntu 22.04 | ARM64 (glibc) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
105
|
+
| Alpine Linux | ARM64 (musl) | 2.7, 3.0, 3.1, 3.2, 3.3, 3.4 | ✅ Supported
|
|
106
|
+
|===
|
|
107
|
+
|
|
108
|
+
NOTE: The gem provides pre-compiled binaries for 10 platforms. Separate binaries
|
|
109
|
+
are provided for glibc-based (gnu) and musl-based Linux distributions to ensure
|
|
110
|
+
compatibility. Windows ARM64 support is planned for future releases pending
|
|
111
|
+
resolution of OpenSSL build system compatibility issues with MSYS2 CLANGARM64.
|
|
112
|
+
|
|
113
|
+
=== OpenSSL compiler target strategy
|
|
114
|
+
|
|
115
|
+
The gem explicitly sets OpenSSL compiler targets to ensure correct assembly
|
|
116
|
+
code generation:
|
|
117
|
+
|
|
118
|
+
[cols="1,1,1",options="header"]
|
|
119
|
+
|===
|
|
120
|
+
| Platform | Compiler Target | Reason
|
|
121
|
+
|
|
122
|
+
| Windows x64 | `mingw64` | Explicit x86_64 assembly selection
|
|
123
|
+
| Linux x86_64 (gnu/musl) | Auto-detect | Native toolchain works correctly
|
|
124
|
+
| Linux ARM64 (gnu/musl) | Auto-detect | Native toolchain works correctly
|
|
125
|
+
| macOS ARM64 | Auto-detect | Native toolchain works correctly
|
|
126
|
+
| macOS x64 | Auto-detect | Native toolchain works correctly
|
|
127
|
+
|===
|
|
128
|
+
|
|
129
|
+
NOTE: Windows platforms require explicit compiler targets because OpenSSL's
|
|
130
|
+
auto-detection does not reliably select the correct target on Windows.
|
|
131
|
+
Linux musl and glibc variants use the same OpenSSL configuration with
|
|
132
|
+
auto-detection, as the toolchain correctly identifies the target.
|
|
133
|
+
|
|
134
|
+
== Build requirements
|
|
135
|
+
|
|
136
|
+
=== Windows
|
|
137
|
+
|
|
138
|
+
==== Windows x64
|
|
139
|
+
|
|
140
|
+
For building from source on Windows x64, you need:
|
|
141
|
+
|
|
142
|
+
* Ruby 2.7 or higher with DevKit
|
|
143
|
+
* MinGW-w64 x86_64 toolchain
|
|
144
|
+
* MSYS2 (recommended) or equivalent Unix-like environment
|
|
145
|
+
|
|
146
|
+
=== macOS
|
data/Rakefile
CHANGED
|
@@ -29,8 +29,14 @@ end
|
|
|
29
29
|
platforms = [
|
|
30
30
|
["x64-mingw32", "x86_64-w64-mingw32"],
|
|
31
31
|
["x64-mingw-ucrt", "x86_64-w64-mingw32"],
|
|
32
|
+
# Future: Windows ARM64 support (commented out due to OpenSSL build system incompatibility)
|
|
33
|
+
# ["arm64-mingw-ucrt", "aarch64-w64-mingw32"],
|
|
32
34
|
["x86_64-linux", "x86_64-linux-gnu"],
|
|
35
|
+
["x86_64-linux-gnu", "x86_64-linux-gnu"],
|
|
36
|
+
["x86_64-linux-musl", "x86_64-linux-musl"],
|
|
33
37
|
["aarch64-linux", "aarch64-linux-gnu"],
|
|
38
|
+
["aarch64-linux-gnu", "aarch64-linux-gnu"],
|
|
39
|
+
["aarch64-linux-musl", "aarch64-linux-musl"],
|
|
34
40
|
["x86_64-darwin", "x86_64-apple-darwin"],
|
|
35
41
|
["arm64-darwin", "arm64-apple-darwin"],
|
|
36
42
|
]
|
data/ext/configuration.yml
CHANGED
|
@@ -2,20 +2,25 @@ libraries:
|
|
|
2
2
|
zlib:
|
|
3
3
|
all:
|
|
4
4
|
version: "1.3.1"
|
|
5
|
-
url: "
|
|
5
|
+
url: "https://zlib.net/zlib-1.3.1.tar.gz"
|
|
6
6
|
sha256: "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"
|
|
7
7
|
libexpat:
|
|
8
8
|
all:
|
|
9
|
-
version: "2.
|
|
10
|
-
url: "https://github.com/libexpat/libexpat/releases/download/
|
|
11
|
-
sha256: "
|
|
9
|
+
version: "2.7.3"
|
|
10
|
+
url: "https://github.com/libexpat/libexpat/releases/download/R_2_7_3/expat-2.7.3.tar.gz"
|
|
11
|
+
sha256: "821ac9710d2c073eaf13e1b1895a9c9aa66c1157a99635c639fbff65cdbdd732"
|
|
12
12
|
# openssl:
|
|
13
|
-
# version 3.x.y requires pod2man, that is not easily available on Windows
|
|
13
|
+
# version 3.x.y requires pod2man, that is not easily available on Windows x64
|
|
14
|
+
# Windows ARM64 requires OpenSSL 3.3.2 (1.1.1w is x86_64 only)
|
|
14
15
|
openssl:
|
|
15
|
-
windows:
|
|
16
|
+
windows-x64:
|
|
16
17
|
version: "1.1.1w"
|
|
17
18
|
url: "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz"
|
|
18
19
|
sha256: "cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8"
|
|
20
|
+
windows-arm64:
|
|
21
|
+
version: "3.3.2"
|
|
22
|
+
url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz"
|
|
23
|
+
sha256: "2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281"
|
|
19
24
|
all:
|
|
20
25
|
version: "3.3.2"
|
|
21
26
|
url: "https://github.com/openssl/openssl/releases/download/openssl-3.3.2/openssl-3.3.2.tar.gz"
|
|
@@ -35,6 +40,6 @@ libraries:
|
|
|
35
40
|
sha256: "a2105abee17bcd2ebd15ced31b4f5eda6e17efd6b10f921a01cda4a44c91b3a0"
|
|
36
41
|
libarchive:
|
|
37
42
|
all:
|
|
38
|
-
version: "3.
|
|
39
|
-
url: "https://www.libarchive.org/downloads/libarchive-3.
|
|
40
|
-
sha256: "
|
|
43
|
+
version: "3.8.4"
|
|
44
|
+
url: "https://www.libarchive.org/downloads/libarchive-3.8.4.tar.gz"
|
|
45
|
+
sha256: "b2c75b132a0ec43274d2867221befcb425034cd038e465afbfad09911abb1abb"
|
|
@@ -20,9 +20,19 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.metadata["changelog_uri"] = "https://github.com/fontist/ffi-libarchive-binary"
|
|
21
21
|
|
|
22
22
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
Dir.glob([
|
|
24
|
+
"lib/**/*.rb",
|
|
25
|
+
"lib/**/*.{so,dylib,dll}",
|
|
26
|
+
"ext/**/*",
|
|
27
|
+
"toolchain/**/*",
|
|
28
|
+
"ffi-libarchive-binary.gemspec",
|
|
29
|
+
"Gemfile",
|
|
30
|
+
"Rakefile",
|
|
31
|
+
"README.adoc",
|
|
32
|
+
".gitignore",
|
|
33
|
+
".rspec",
|
|
34
|
+
".rubocop.yml"
|
|
35
|
+
], base: __dir__)
|
|
26
36
|
end
|
|
27
37
|
|
|
28
38
|
spec.bindir = "exe"
|
|
@@ -30,7 +40,6 @@ Gem::Specification.new do |spec|
|
|
|
30
40
|
spec.require_paths = ["lib"]
|
|
31
41
|
spec.extensions = ["ext/extconf.rb"]
|
|
32
42
|
|
|
33
|
-
spec.add_runtime_dependency "bundler", "~> 2.3", ">= 2.3.22"
|
|
34
43
|
spec.add_runtime_dependency "ffi", "~> 1.0"
|
|
35
44
|
spec.add_runtime_dependency "ffi-libarchive", "~> 1.0"
|
|
36
45
|
spec.add_runtime_dependency "mini_portile2", "~> 2.7"
|
|
@@ -10,6 +10,7 @@ module LibarchiveBinary
|
|
|
10
10
|
"aarch64-linux-gnu" => "ELF 64-bit LSB shared object, ARM aarch64",
|
|
11
11
|
"x86_64-linux-gnu" => "ELF 64-bit LSB shared object, x86-64",
|
|
12
12
|
"x86_64-w64-mingw32" => "PE32+ executable",
|
|
13
|
+
"aarch64-w64-mingw32" => "PE32+ executable",
|
|
13
14
|
}.freeze
|
|
14
15
|
|
|
15
16
|
ARCHS = {
|
|
@@ -19,6 +20,7 @@ module LibarchiveBinary
|
|
|
19
20
|
|
|
20
21
|
LIBNAMES = {
|
|
21
22
|
"x86_64-w64-mingw32" => "libarchive.dll",
|
|
23
|
+
"aarch64-w64-mingw32" => "libarchive.dll",
|
|
22
24
|
"x86_64-linux-gnu" => "libarchive.so",
|
|
23
25
|
"aarch64-linux-gnu" => "libarchive.so",
|
|
24
26
|
"x86_64-apple-darwin" => "libarchive.dylib",
|
|
@@ -53,6 +55,24 @@ module LibarchiveBinary
|
|
|
53
55
|
"LDFLAGS=-fPIC#{apple_arch_flag(host)}"
|
|
54
56
|
end
|
|
55
57
|
|
|
58
|
+
def cross_compiler_env(host)
|
|
59
|
+
# For aarch64 cross-compilation, set the compiler
|
|
60
|
+
return {} unless host&.start_with?("aarch64-linux")
|
|
61
|
+
|
|
62
|
+
# Note: We use aarch64-linux-gnu-gcc for both glibc and musl targets because:
|
|
63
|
+
# 1. We build static libraries (.a files) which are libc-agnostic
|
|
64
|
+
# 2. The compiler generates aarch64 machine code (architecture-specific)
|
|
65
|
+
# 3. glibc vs musl only matters for dynamic linking at runtime
|
|
66
|
+
# 4. Our static libs link into libarchive.so which links to the target libc
|
|
67
|
+
{
|
|
68
|
+
"CC" => "aarch64-linux-gnu-gcc",
|
|
69
|
+
"CXX" => "aarch64-linux-gnu-g++",
|
|
70
|
+
"AR" => "aarch64-linux-gnu-ar",
|
|
71
|
+
"RANLIB" => "aarch64-linux-gnu-ranlib",
|
|
72
|
+
"STRIP" => "aarch64-linux-gnu-strip",
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
56
76
|
def message(text)
|
|
57
77
|
return super unless text.start_with?("\rDownloading")
|
|
58
78
|
|
|
@@ -19,7 +19,12 @@ module LibarchiveBinary
|
|
|
19
19
|
|
|
20
20
|
def self.library_for(libname)
|
|
21
21
|
if MiniPortile::windows?
|
|
22
|
-
|
|
22
|
+
# Detect Windows ARM64
|
|
23
|
+
if RUBY_PLATFORM =~ /aarch64|arm64/i
|
|
24
|
+
libraries[libname]["windows-arm64"] || libraries[libname]["windows"] || libraries[libname]["all"]
|
|
25
|
+
else
|
|
26
|
+
libraries[libname]["windows-x64"] || libraries[libname]["windows"] || libraries[libname]["all"]
|
|
27
|
+
end
|
|
23
28
|
else
|
|
24
29
|
libraries[libname]["all"]
|
|
25
30
|
end
|
|
@@ -45,9 +45,17 @@ module LibarchiveBinary
|
|
|
45
45
|
"-DENABLE_OPENSSL:BOOL=ON", "-DENABLE_LIBB2:BOOL=OFF", "-DENABLE_LZ4:BOOL=OFF",
|
|
46
46
|
"-DENABLE_LZO::BOOL=OFF", "-DENABLE_LZMA:BOOL=ON", "-DENABLE_ZSTD:BOOL=OFF",
|
|
47
47
|
"-DENABLE_ZLIB::BOOL=ON", "-DENABLE_BZip2:BOOL=OFF", "-DENABLE_LIBXML2:BOOL=OFF",
|
|
48
|
-
"-DENABLE_EXPAT::BOOL=ON", "-DENABLE_TAR:BOOL=OFF", "-
|
|
49
|
-
"-
|
|
50
|
-
"-
|
|
48
|
+
"-DENABLE_EXPAT::BOOL=ON", "-DENABLE_TAR:BOOL=OFF", "-DENABLE_CPIO::BOOL=OFF",
|
|
49
|
+
"-DENABLE_CAT:BOOL=OFF", "-DENABLE_ACL:BOOL=OFF", "-DENABLE_TEST:BOOL=OFF",
|
|
50
|
+
"-DENABLE_UNZIP:BOOL=OFF", "-DOPENSSL_USE_STATIC_LIBS=ON", "-DENABLE_XAR:BOOL=ON",
|
|
51
|
+
|
|
52
|
+
# Provide root directories - let CMake find libraries in lib or lib64
|
|
53
|
+
"-DOPENSSL_ROOT_DIR:PATH=#{@openssl_recipe.path}",
|
|
54
|
+
|
|
55
|
+
# 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",
|
|
57
|
+
|
|
58
|
+
# Provide search paths for CMake to find libraries
|
|
51
59
|
"-DCMAKE_INCLUDE_PATH:STRING=#{include_path}",
|
|
52
60
|
"-DCMAKE_LIBRARY_PATH:STRING=#{library_path}"
|
|
53
61
|
]
|
|
@@ -55,12 +63,11 @@ module LibarchiveBinary
|
|
|
55
63
|
|
|
56
64
|
def configure_defaults
|
|
57
65
|
df = generator_flags + default_flags
|
|
66
|
+
|
|
58
67
|
ar = ARCHS[host]
|
|
59
|
-
if ar
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
df + ["-DCMAKE_OSX_ARCHITECTURES=#{ar}"]
|
|
63
|
-
end
|
|
68
|
+
df += ["-DCMAKE_OSX_ARCHITECTURES=#{ar}"] if ar
|
|
69
|
+
|
|
70
|
+
df
|
|
64
71
|
end
|
|
65
72
|
|
|
66
73
|
def include_path
|
|
@@ -99,6 +106,10 @@ module LibarchiveBinary
|
|
|
99
106
|
@xz_recipe.host = @host if @host
|
|
100
107
|
@xz_recipe.cook_if_not
|
|
101
108
|
|
|
109
|
+
# 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"
|
|
112
|
+
|
|
102
113
|
super
|
|
103
114
|
|
|
104
115
|
FileUtils.touch(checkpoint)
|
|
@@ -18,8 +18,10 @@ module LibarchiveBinary
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def configure
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
# Set cross-compiler environment variables for aarch64
|
|
22
|
+
env_vars = cross_compiler_env(host)
|
|
23
|
+
cmd = ["env"] + env_vars.map { |k, v| "#{k}=#{v}" } +
|
|
24
|
+
[cflags(host), ldflags(host), "./configure"] + computed_options
|
|
23
25
|
execute("configure", cmd)
|
|
24
26
|
end
|
|
25
27
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "base_recipe"
|
|
4
|
+
|
|
5
|
+
module LibarchiveBinary
|
|
6
|
+
class Libxml2Recipe < BaseRecipe
|
|
7
|
+
def initialize
|
|
8
|
+
super("libxml2")
|
|
9
|
+
|
|
10
|
+
@target = ROOT.join(@target).to_s
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def configure_defaults
|
|
14
|
+
[
|
|
15
|
+
"--host=#{@host}",
|
|
16
|
+
"--disable-dependency-tracking",
|
|
17
|
+
"--without-python",
|
|
18
|
+
"--without-lzma",
|
|
19
|
+
"--without-zlib",
|
|
20
|
+
"--without-iconv",
|
|
21
|
+
"--without-icu",
|
|
22
|
+
"--without-debug",
|
|
23
|
+
"--without-threads",
|
|
24
|
+
"--without-modules",
|
|
25
|
+
"--without-catalog",
|
|
26
|
+
"--without-docbook",
|
|
27
|
+
"--without-legacy",
|
|
28
|
+
"--without-http",
|
|
29
|
+
"--without-ftp",
|
|
30
|
+
"--enable-static",
|
|
31
|
+
"--disable-shared"
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def configure
|
|
36
|
+
cmd = ["env", cflags(host), ldflags(host),
|
|
37
|
+
"./configure"] + computed_options
|
|
38
|
+
execute("configure", cmd)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def checkpoint
|
|
42
|
+
File.join(@target, "#{name}-#{version}-#{host}.installed")
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def cook_if_not
|
|
46
|
+
cook unless File.exist?(checkpoint)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def cook
|
|
50
|
+
super
|
|
51
|
+
|
|
52
|
+
FileUtils.touch(checkpoint)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -6,9 +6,13 @@ module LibarchiveBinary
|
|
|
6
6
|
OS_COMPILERS = {
|
|
7
7
|
"arm64-apple-darwin" => "darwin64-arm64-cc",
|
|
8
8
|
"x86_64-apple-darwin" => "darwin64-x86_64-cc",
|
|
9
|
-
"aarch64-linux-gnu" =>
|
|
9
|
+
"aarch64-linux-gnu" => "linux-aarch64",
|
|
10
|
+
"aarch64-linux-musl" => "linux-aarch64",
|
|
10
11
|
"x86_64-linux-gnu" => nil,
|
|
12
|
+
"x86_64-linux-musl" => nil,
|
|
11
13
|
"x86_64-w64-mingw32" => "mingw64",
|
|
14
|
+
# Future: Windows ARM64 support (commented out due to OpenSSL build system incompatibility)
|
|
15
|
+
# "aarch64-w64-mingw32" => "VC-CLANG-WIN64-CLANGASM-ARM",
|
|
12
16
|
}.freeze
|
|
13
17
|
|
|
14
18
|
ENV_CMD = ["env", "CFLAGS=-fPIC", "LDFLAGS=-fPIC"].freeze
|
|
@@ -20,13 +24,18 @@ module LibarchiveBinary
|
|
|
20
24
|
|
|
21
25
|
def configure
|
|
22
26
|
os_compiler = OS_COMPILERS[@host]
|
|
23
|
-
common_opts = ["--openssldir=#{ROOT}/ports/SSL", "no-tests", "no-shared"] +
|
|
27
|
+
common_opts = ["--openssldir=#{ROOT}/ports/SSL", "--libdir=lib", "no-tests", "no-shared"] +
|
|
24
28
|
computed_options.grep(/--prefix/)
|
|
29
|
+
|
|
30
|
+
# Set cross-compiler environment variables for aarch64
|
|
31
|
+
env_vars = cross_compiler_env(@host)
|
|
32
|
+
env_prefix = env_vars.empty? ? ENV_CMD : ENV_CMD + env_vars.map { |k, v| "#{k}=#{v}" }
|
|
33
|
+
|
|
25
34
|
cmd = if os_compiler.nil?
|
|
26
35
|
message("OpensslRecipe: guessing with 'config' for '#{@host}'\n")
|
|
27
|
-
|
|
36
|
+
env_prefix + ["./config"] + common_opts
|
|
28
37
|
else
|
|
29
|
-
|
|
38
|
+
env_prefix + ["./Configure"] + common_opts + [os_compiler]
|
|
30
39
|
end
|
|
31
40
|
execute("configure", cmd)
|
|
32
41
|
end
|
|
@@ -18,8 +18,10 @@ module LibarchiveBinary
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def configure
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
# Set cross-compiler environment variables for aarch64
|
|
22
|
+
env_vars = cross_compiler_env(host)
|
|
23
|
+
cmd = ["env"] + env_vars.map { |k, v| "#{k}=#{v}" } +
|
|
24
|
+
[cflags(host), ldflags(host), "./configure"] + computed_options
|
|
23
25
|
execute("configure", cmd)
|
|
24
26
|
end
|
|
25
27
|
|
|
@@ -33,8 +33,10 @@ module LibarchiveBinary
|
|
|
33
33
|
configure_windows
|
|
34
34
|
end
|
|
35
35
|
else
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
# Set cross-compiler environment variables for aarch64
|
|
37
|
+
env_vars = cross_compiler_env(host)
|
|
38
|
+
cmd = ["env"] + env_vars.map { |k, v| "#{k}=#{v}" } +
|
|
39
|
+
[cflags(host), ldflags(host), "./configure"] + computed_options
|
|
38
40
|
execute("configure", cmd)
|
|
39
41
|
end
|
|
40
42
|
end
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
#
|
|
2
|
-
# CMake Toolchain file for crosscompiling for aarch64-linux-gnu.
|
|
3
|
-
#
|
|
4
1
|
set(CMAKE_SYSTEM_NAME Linux)
|
|
5
2
|
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
|
6
3
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
OUTPUT_VARIABLE BINUTILS_PATH
|
|
11
|
-
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
12
|
-
)
|
|
4
|
+
# Specify the cross compiler
|
|
5
|
+
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
|
|
6
|
+
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
|
|
13
7
|
|
|
14
|
-
|
|
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})
|
|
8
|
+
# Where to look for the target environment
|
|
23
9
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
24
10
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
25
11
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
12
|
+
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
metadata
CHANGED
|
@@ -1,35 +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.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
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
12
|
- !ruby/object:Gem::Dependency
|
|
34
13
|
name: ffi
|
|
35
14
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -151,6 +130,7 @@ files:
|
|
|
151
130
|
- lib/ffi-libarchive-binary/configuration.rb
|
|
152
131
|
- lib/ffi-libarchive-binary/libarchive_recipe.rb
|
|
153
132
|
- lib/ffi-libarchive-binary/libexpat_recipe.rb
|
|
133
|
+
- lib/ffi-libarchive-binary/libxml2_recipe.rb
|
|
154
134
|
- lib/ffi-libarchive-binary/openssl_recipe.rb
|
|
155
135
|
- lib/ffi-libarchive-binary/version.rb
|
|
156
136
|
- lib/ffi-libarchive-binary/xz_recipe.rb
|
|
@@ -163,7 +143,6 @@ metadata:
|
|
|
163
143
|
homepage_uri: https://github.com/fontist/ffi-libarchive-binary
|
|
164
144
|
source_code_uri: https://github.com/fontist/ffi-libarchive-binary
|
|
165
145
|
changelog_uri: https://github.com/fontist/ffi-libarchive-binary
|
|
166
|
-
post_install_message:
|
|
167
146
|
rdoc_options: []
|
|
168
147
|
require_paths:
|
|
169
148
|
- lib
|
|
@@ -178,8 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
178
157
|
- !ruby/object:Gem::Version
|
|
179
158
|
version: '0'
|
|
180
159
|
requirements: []
|
|
181
|
-
rubygems_version: 3.
|
|
182
|
-
signing_key:
|
|
160
|
+
rubygems_version: 3.6.9
|
|
183
161
|
specification_version: 4
|
|
184
162
|
summary: Binaries for ffi-libarchive
|
|
185
163
|
test_files: []
|