diff --git a/projects/ruby-lang.org/defaults.rb.patch b/projects/ruby-lang.org/defaults.rb.patch deleted file mode 100644 index 6f95d7d8..00000000 --- a/projects/ruby-lang.org/defaults.rb.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/ruby/3.2.0/rubygems/defaults.rb b/lib/ruby/3.2.0/rubygems/defaults.rb -index 8daff0b..59ecd32 100644 ---- a/lib/ruby/3.2.0/rubygems/defaults.rb -+++ b/lib/ruby/3.2.0/rubygems/defaults.rb -@@ -34,7 +34,7 @@ module Gem - # specified in the environment - - def self.default_dir -- @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version"]) -+ @default_dir ||= File.expand_path(File.join(__FILE__, "../../../../../../gems", RbConfig::CONFIG["ruby_version"])) - end - - ## diff --git a/projects/ruby-lang.org/package.yml b/projects/ruby-lang.org/package.yml index 3ab3bc85..0a9fd9a8 100644 --- a/projects/ruby-lang.org/package.yml +++ b/projects/ruby-lang.org/package.yml @@ -16,20 +16,22 @@ build: gnu.org/gettext: ^0.21 tea.xyz/gx/cc: c99 tea.xyz/gx/make: '*' - gnu.org/patch: '*' script: | ./configure --prefix="{{prefix}}" --enable-load-relative --disable-rubygems make --jobs {{hw.concurrency}} install - cd "{{prefix}}/lib/ruby/{{version.major}}.{{version.minor}}.0" + cd "{{prefix}}/lib/ruby/{{version.major}}.{{version.minor}}.0/rubygems" # use the GEM_PATH we want - patch -p4 < "$SRCROOT"/props/defaults.rb.patch + sed -i.bak -e 's;@default_dir ||=.*;@default_dir ||= File.expand_path(File.join(__FILE__, "../../../../../../gems", RbConfig::CONFIG["ruby_version"]));' defaults.rb + rm defaults.rb.bak cd "{{prefix}}/bin" # we provide these as `rubygems.org` - rm bundle bundler gem rake rbs rdbg typeprof + for GEM in bundle bundler gem rake rbs rdbg typeprof; do + test -f $GEM && rm $GEM + done for shim in $shims; do sed -i.bak -e 's_#!{{prefix}}/bin/ruby_#!/usr/bin/env ruby_' $shim