rb_sys 0.9.117 → 0.9.118

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e65d18affa9d1d22fa9f2c4d69fc3a4feb46533f080a992e8bb5f88880ddf3d2
4
- data.tar.gz: 9e75361a5235dc6deeb74f7176e431781bb1ac62fec763253d6294eac6b976ec
3
+ metadata.gz: a7769c6390c96fd8779a22b6397e5dbf747b1f4c00c2ff1bdd522c7bcdcde736
4
+ data.tar.gz: 9ec86176519b61b5babbb4506ea0bb9d0484de6c57f5a45b7fd95645ff7043d9
5
5
  SHA512:
6
- metadata.gz: 99909124852c764c16bfbb36faf2e0771428ded10dc0392ae69f94a91b5d11a33e9c01fb72fd264e26cb2d3f484a2e0519e22e3271cd7cdbe62aeae72599cf46
7
- data.tar.gz: 43160f2a90c8fd808bb21b9557107506330af7acdfc1a7e78c573f0bed7885ddbbd9a7477a3752a7d87edf72084f890f9b3ef2fc694ee9659fd9485d3957fa69
6
+ metadata.gz: 370581d111056bffbb17a8d51ec4a5c6d5d779106cc3935de24e69dbe9a74132fbd52a21e768e872f453ae6d2ce9e6cf0e615aa9a26afb1b2b7f913cab69654f
7
+ data.tar.gz: f246f16238c74858ca6290dfe81e76312f8294698bce68e362e8be29e4f5cc55e15dd206c12eabcbd0e7eaa14266a55be631ee142ab2aa0faa7523a15dd8c05f
checksums.yaml.gz.sig CHANGED
Binary file
data/exe/rb-sys-dock CHANGED
@@ -14,7 +14,7 @@ require "tmpdir"
14
14
 
15
15
  OPTIONS = {
16
16
  docker_platform: "linux/amd64",
17
- version: RbSys::VERSION,
17
+ version: ENV["RCD_IMAGE_VERSION"] || RbSys::VERSION,
18
18
  directory: Dir.pwd
19
19
  }
20
20
 
@@ -99,28 +99,30 @@ OptionParser.new do |opts|
99
99
  OPTIONS[:toolchain_info] = toolchain_info
100
100
  end
101
101
 
102
- opts.on("-r", "--ruby-versions LIST", "List all supported Ruby versions") do |arg|
103
- vers = arg.split(/[^0-9.]+/).map do |v|
104
- override = RakeCompilerDock.cross_rubies[v]
102
+ opts.on("-r", "--ruby-versions LIST", "Comma- or colon-separated Ruby requirements (e.g., '3.4,~> 3.1')") do |arg|
103
+ requirements = arg.tr(":", ",").split(",").map(&:strip).reject(&:empty?)
105
104
 
106
- next override if override
107
-
108
- parts = v.split(".")
109
- parts[2] = "0" if parts[2].nil?
110
- parts.join(".")
105
+ begin
106
+ resolved = RakeCompilerDock.ruby_cc_version(*requirements)
107
+ rescue => error
108
+ logger.error("Could not resolve requested Ruby versions: #{error.message}")
109
+ exit(1)
111
110
  end
112
111
 
113
- OPTIONS[:ruby_versions] = vers
112
+ resolved_versions = resolved.split(":")
113
+ OPTIONS[:ruby_version_requirements] = requirements
114
+ OPTIONS[:ruby_versions] = resolved_versions
114
115
 
115
- logger.info("Building for Ruby requested versions: #{vers}")
116
+ logger.info("Building for Ruby requested versions: #{resolved_versions.join(":")}")
116
117
 
117
- ENV["RUBY_CC_VERSION"] = vers.join(":")
118
+ RakeCompilerDock.set_ruby_cc_version(*requirements)
118
119
  end
119
120
 
120
121
  opts.on("--tag TAG", "Use a specific version of the Docker image") do |tag|
121
122
  logger.info("Using version #{tag} of the Docker image")
122
123
  OPTIONS[:version] = tag
123
124
  OPTIONS[:no_cache] = tag == "latest"
125
+ ENV["RCD_IMAGE_VERSION"] = tag
124
126
  end
125
127
 
126
128
  opts.on("--list-platforms", "--list", "List all supported platforms") do
@@ -445,7 +447,9 @@ def log_some_useful_info
445
447
  end
446
448
 
447
449
  def set_env
448
- ENV["RCD_IMAGE"] ||= "rbsys/#{ruby_platform}:#{OPTIONS[:version]}"
450
+ ENV["RCD_IMAGE_VERSION"] ||= OPTIONS[:version]
451
+ version = ENV.fetch("RCD_IMAGE_VERSION")
452
+ ENV["RCD_IMAGE"] ||= "rbsys/#{ruby_platform}:#{version}"
449
453
  end
450
454
 
451
455
  def lint_rb_sys
data/lib/rb_sys/error.rb CHANGED
@@ -8,8 +8,8 @@ module RbSys
8
8
  class PackageNotFoundError < Error
9
9
  def initialize(name)
10
10
  msg = <<~MSG.chomp.tr("\n", " ")
11
- Could not find Cargo package metadata for #{@name.inspect}. Please
12
- check that #{@name.inspect} matches the crate name in your
11
+ Could not find Cargo package metadata for #{name.inspect}. Please
12
+ check that #{name.inspect} matches the crate name in your
13
13
  Cargo.toml."
14
14
  MSG
15
15
 
data/lib/rb_sys/mkmf.rb CHANGED
@@ -286,9 +286,18 @@ module RbSys
286
286
  end
287
287
 
288
288
  def fixup_libnames
289
- return unless find_executable("install_name_tool")
289
+ # Try to find install_name_tool, checking multiple possible names:
290
+ # 1. Native macOS install_name_tool
291
+ # 2. Target-prefixed version from osxcross (e.g., aarch64-apple-darwin-install_name_tool)
292
+ tool = if find_executable("install_name_tool")
293
+ "install_name_tool"
294
+ elsif find_executable("$(CARGO_BUILD_TARGET)-install_name_tool")
295
+ "$(CARGO_BUILD_TARGET)-install_name_tool"
296
+ else
297
+ return
298
+ end
290
299
 
291
- '$(Q) install_name_tool -id "" $(DLLIB)'
300
+ %($(Q) #{tool} -id "" $(DLLIB))
292
301
  end
293
302
 
294
303
  def if_eq_stmt(a, b)
@@ -5,6 +5,6 @@
5
5
  module RbSys
6
6
  class ToolchainInfo
7
7
  # @private
8
- DATA = {"arm-linux" => {"rust-target" => "arm-unknown-linux-gnueabihf", "rake-compiler-dock" => {"cc" => "arm-linux-gnueabihf-gcc"}, "docker-platform" => "linux/arm/v7", "supported" => true}, "aarch64-linux" => {"aliases" => ["aarch64-linux-gnu", "aarch64-unknown-linux-gnu"], "rust-target" => "aarch64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "aarch64-linux-gnu-gcc"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "aarch64-linux-musl" => {"rust-target" => "aarch64-unknown-linux-musl", "rake-compiler-dock" => {"cc" => "aarch64-linux-musl-gcc"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "arm64-darwin" => {"rust-target" => "aarch64-apple-darwin", "rake-compiler-dock" => {"cc" => "aarch64-apple-darwin-clang"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "x64-mingw-ucrt" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x64-mingw32" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86-linux" => {"rust-target" => "i686-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "i686-redhat-linux-gcc"}, "docker-platform" => "linux/i386", "supported" => false}, "x86-mingw32" => {"rust-target" => "i686-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "i686-w64-mingw32-gcc"}, "docker-platform" => "linux/i386", "supported" => false}, "x86_64-darwin" => {"rust-target" => "x86_64-apple-darwin", "rake-compiler-dock" => {"cc" => "x86_64-apple-darwin-clang"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86_64-linux" => {"aliases" => ["x86_64-linux-gnu", "x86_64-unknown-linux-gnu"], "rust-target" => "x86_64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "x86_64-redhat-linux-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86_64-linux-musl" => {"rust-target" => "x86_64-unknown-linux-musl", "rake-compiler-dock" => {"cc" => "x86_64-unknown-linux-musl-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}}
8
+ DATA = {"arm-linux" => {"rust-target" => "arm-unknown-linux-gnueabihf", "rake-compiler-dock" => {"cc" => "arm-linux-gnueabihf-gcc"}, "docker-platform" => "linux/arm/v7", "supported" => true}, "aarch64-linux" => {"aliases" => ["aarch64-linux-gnu", "aarch64-unknown-linux-gnu"], "rust-target" => "aarch64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "aarch64-linux-gnu-gcc"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "aarch64-linux-musl" => {"rust-target" => "aarch64-unknown-linux-musl", "rake-compiler-dock" => {"cc" => "aarch64-linux-musl-gcc"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "arm64-darwin" => {"rust-target" => "aarch64-apple-darwin", "rake-compiler-dock" => {"cc" => "aarch64-apple-darwin-clang"}, "docker-platform" => "linux/arm64/v8", "supported" => true}, "x64-mingw-ucrt" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "aarch64-mingw-ucrt" => {"rust-target" => "aarch64-pc-windows-gnullvm", "rake-compiler-dock" => {"cc" => "aarch64-w64-mingw32-clang"}, "docker-platform" => "linux/amd64", "supported" => true}, "x64-mingw32" => {"rust-target" => "x86_64-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "x86_64-windows-gnu-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86-linux" => {"rust-target" => "i686-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "i686-redhat-linux-gcc"}, "docker-platform" => "linux/i386", "supported" => false}, "x86-mingw32" => {"rust-target" => "i686-pc-windows-gnu", "rake-compiler-dock" => {"cc" => "i686-w64-mingw32-gcc"}, "docker-platform" => "linux/i386", "supported" => false}, "x86_64-darwin" => {"rust-target" => "x86_64-apple-darwin", "rake-compiler-dock" => {"cc" => "x86_64-apple-darwin-clang"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86_64-linux" => {"aliases" => ["x86_64-linux-gnu", "x86_64-unknown-linux-gnu"], "rust-target" => "x86_64-unknown-linux-gnu", "rake-compiler-dock" => {"cc" => "x86_64-redhat-linux-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}, "x86_64-linux-musl" => {"rust-target" => "x86_64-unknown-linux-musl", "rake-compiler-dock" => {"cc" => "x86_64-unknown-linux-musl-gcc"}, "docker-platform" => "linux/amd64", "supported" => true}}
9
9
  end
10
10
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RbSys
4
- VERSION = "0.9.117"
4
+ VERSION = "0.9.118"
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_sys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.117
4
+ version: 0.9.118
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
@@ -37,14 +37,14 @@ dependencies:
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.9.1
40
+ version: 1.10.0
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.9.1
47
+ version: 1.10.0
48
48
  email:
49
49
  - i.kerseymer@gmail.com
50
50
  executables:
@@ -86,7 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.5.0
89
+ version: 2.7.0
90
90
  required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - ">="
metadata.gz.sig CHANGED
Binary file