Ruby gems path (#85)

* set gem path correctly
This commit is contained in:
Max Howell 2023-01-15 14:34:19 -05:00 committed by GitHub
parent eb8024ad63
commit a1b84aa7da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 5 deletions

View file

@ -9,6 +9,10 @@ versions:
provides: provides:
- bin/make - bin/make
interprets:
filename: Makefile
args: [make, --file]
build: build:
dependencies: dependencies:
gnu.org/m4: 1 gnu.org/m4: 1

View file

@ -0,0 +1,13 @@
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

@ -8,7 +8,7 @@ versions:
dependencies: dependencies:
openssl.org: ^1.1 openssl.org: ^1.1
pyyaml.org: ^0.2 pyyaml.org: ^0.2
zlib.net: 1 zlib.net: ^1
build: build:
dependencies: dependencies:
@ -16,11 +16,17 @@ build:
gnu.org/gettext: ^0.21 gnu.org/gettext: ^0.21
tea.xyz/gx/cc: c99 tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*' tea.xyz/gx/make: '*'
git-scm.org: ^2
script: | script: |
./configure --prefix="{{prefix}}" --enable-load-relative ./configure --prefix="{{prefix}}" --enable-load-relative --disable-rubygems
make --jobs {{hw.concurrency}} install make --jobs {{hw.concurrency}} install
cd "{{prefix}}"/bin cd "{{prefix}}"
# use the GEM_PATH we want
git apply "$SRCROOT"/props/defaults.rb.patch
cd bin
# we provide these as `rubygems.org` # we provide these as `rubygems.org`
rm bundle bundler gem rake rbs rdbg typeprof rm bundle bundler gem rake rbs rdbg typeprof
@ -37,8 +43,18 @@ build:
- rdoc - rdoc
- ri - ri
test: | test:
dependencies:
#NOTE rubygems.org depends on us… so it may be difficult to test this
# in a bootstrap scenario…
rubygems.org: '*'
tea.xyz/gx/cc: c99 # for native extensions
tea.xyz/gx/make: '*'
script: |
ruby -e 'puts "Hello World!"' ruby -e 'puts "Hello World!"'
gem install hexapdf -v 0.28.0
hexapdf version
test -d "{{tea.prefix}}"/ruby-lang.org/gems/{{version}}/gems/hexapdf-0.28.0
provides: provides:
- bin/erb - bin/erb