fix rubygems (#2171)

This commit is contained in:
Max Howell 2023-06-13 15:31:03 -04:00 committed by GitHub
parent c080f418fa
commit 4341e71540
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 24 deletions

View file

@ -73,6 +73,11 @@ build:
mv lib/*-{{hw.platform}}*/* lib
rmdir lib/*-{{hw.platform}}*
sed -i.bak \
-e 's|$(DESTDIR){{prefix}}|$(topdir)|g' \
-e 's|CONFIG\["topdir"\] = .*|CONFIG\["topdir"\] = TOPDIR|g' \
{{prefix}}/lib/ruby/{{version.marketing}}.0/rbconfig.rb
test:
dependencies:
tea.xyz/gx/cc: c99 # for native extensions

View file

@ -11,29 +11,30 @@ dependencies:
build:
dependencies:
gnu.org/patch: '*'
script: |
ruby setup.rb --prefix={{prefix}} --env-shebang --no-ri --no-rdoc
script:
- ruby setup.rb --prefix={{prefix}} --env-shebang --no-ri --no-rdoc
mkdir {{prefix}}/shim
cp props/proxy {{prefix}}/shim
- working-directory: ${{prefix}}/shim
run: cp $SRCROOT/props/proxy .
cd "{{prefix}}"
patch -p1 < "$SRCROOT"/props/fit-n-finish.patch
- working-directory: ${{prefix}}
run: patch -p1 < "$SRCROOT"/props/fit-n-finish.patch
- working-directory: ${{prefix}}/bin
# these are provided by ruby-lang.org
# we dont know why they turn up here too…
for x in rake rbs rdbg typeprof; do
rm {{prefix}}/bin/$x
done
run: rm rake rbs rdbg typeprof
- working-directory: ${{prefix}}/bin
# Were not a “GEMHOME” since we *are* gem, so yeah instead
# we have a RUBYLIB hack via our proxy script
for x in bin/*; do
mv $x shim
ln shim/proxy $x
run: |
for x in *; do
mv $x ../shim
ln -s ../shim/proxy $x
done
rmdir {{prefix}}/plugins
- rmdir {{prefix}}/plugins
test:
dependencies:
@ -41,15 +42,16 @@ test:
tea.xyz/gx/make: '*'
env:
HOME: $PWD
vRUBY: ${{deps.ruby-lang.org.version.marketing}}.0
script: |
gem install awesome_print
ruby -e 'require "rubygems"' -e 'require "awesome_print"' -e'ap $LOAD_PATH'
gem install hexapdf
v="$(~/.local/bin/hexapdf version | cut -d' ' -f2)"
test -d ~/.gem/ruby/3.2.0/gems/hexapdf-$v #FIXME ruby version
test -d ~/.gem/ruby/$vRUBY/gems/hexapdf-$v #FIXME ruby version
gem install bundle
test -d ~/.gem/ruby/{{version.marketing}}.0/gems/bundle-0.0.1
test -d ~/.gem/ruby/{{deps.ruby-lang.org.version.marketing}}.0/gems/bundle-0.0.1
test -f ~/.local/bin/bundle
~/.local/bin/bundle --version
@ -57,7 +59,3 @@ provides:
- bin/bundle
- bin/bundler
- bin/gem
- bin/rake
- bin/rbs
- bin/rdbg
- bin/typeprof