fix(ruby)

fixes #236
fixes #237
fixes #238
fixes #239
fixes #240
fixes #288
fixes #289
fixes #290
fixes #291
fixes #292
fixes #293
fixes #294
fixes #295
fixes #296
fixes #297
fixes #298
fixes #299
fixes #300
fixes #301
fixes #302
fixes #303
fixes #304
fixes #305
fixes #306
fixes #307
fixes #308
fixes #309
fixes #310
fixes #311
fixes #312
fixes #313
fixes #314
fixes #315
This commit is contained in:
Jacob Heider 2023-02-09 18:57:49 -05:00 committed by Jacob Heider
parent 5d5a371efd
commit 50224807cb
2 changed files with 6 additions and 17 deletions

View file

@ -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
##

View file

@ -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