Ruby 3.2.2-1 => 3.3.0 (#9133)

Add ruby buildsystem and update ruby_* packages
This commit is contained in:
Ed Reel
2024-01-03 00:41:53 -06:00
committed by GitHub
parent b8fa8d9ce9
commit 5d3e024d40
38 changed files with 61614 additions and 44010 deletions

21
lib/buildsystems/ruby.rb Normal file
View File

@@ -0,0 +1,21 @@
require 'package'
class RUBY < Package
property :ruby_install_extras
depends_on 'ruby'
no_compile_needed
def self.install
# This assumes the package class name starts with 'Ruby_' and
# version is in the form '(gem version)-ruby-(ruby version)'.
# For example, name 'Ruby_awesome' and version '1.0.0-ruby-3.3'.
@gem_name = name.sub('ruby_', '').sub('_', '-')
@gem_ver = version.split('-', 2).first
@ruby_ver = version.split('-', 3).last
system "yes | gem uninstall -a #{@gem_name}", exception: false
system "gem install -i #{CREW_DEST_LIB_PREFIX}/ruby/gems/#{@ruby_ver}.0 -n #{CREW_DEST_PREFIX}/bin -N -v #{@gem_ver} #{@gem_name}", exception: false
eval @ruby_install_extras if @ruby_install_extras
end
end