mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
e151a37e98
patches don't age well. closes #4440 closes #4450
95 lines
2.5 KiB
YAML
95 lines
2.5 KiB
YAML
distributable:
|
||
url: https://github.com/rubygems/rubygems/archive/refs/tags/v{{version}}.tar.gz
|
||
strip-components: 1
|
||
|
||
versions:
|
||
github: rubygems/rubygems
|
||
|
||
dependencies:
|
||
ruby-lang.org: '>=2.3'
|
||
|
||
runtime:
|
||
env:
|
||
RUBYLIB: ${{prefix}}/lib
|
||
|
||
build:
|
||
dependencies:
|
||
gnu.org/patch: '*'
|
||
ruby-lang.org: ~3.1 # testing a theory
|
||
script:
|
||
- ruby setup.rb
|
||
--prefix={{prefix}}
|
||
--env-shebang
|
||
--no-ri
|
||
--no-rdoc
|
||
|
||
- run: cp $SRCROOT/props/proxy .
|
||
working-directory: ${{prefix}}/shim
|
||
|
||
- run: |
|
||
patch -p1 < "$SRCROOT"/props/fit-n-finish.patch
|
||
patch -p1 < "$SRCROOT"/props/fit-n-finish.2.patch
|
||
sed -i'' -e 's/Gem.default_dir/Gem.default_system_dir/' lib/rubygems/path_support.rb
|
||
working-directory: ${{prefix}}
|
||
|
||
- run: sed -i'' -e 's/Gem.state_home, "gem",/Gem.state_home,/' defaults.rb
|
||
working-directory: ${{prefix}}/lib/rubygems
|
||
if: '>=3.4'
|
||
|
||
- run: patch -p1 < "$SRCROOT"/props/fit-n-finish.3.patch
|
||
working-directory: ${{prefix}}
|
||
if: '<3.5'
|
||
|
||
- run: patch -p1 < "$SRCROOT"/props/fit-n-finish.4.patch
|
||
working-directory: ${{prefix}}
|
||
if: '>=3.5'
|
||
|
||
- run: |
|
||
sed -i.bak -e 's/Dir\.mkdir dir, \*\[options\[:dir_mode\].*/FileUtils.mkdir_p dir, *[options[:dir_mode] \&\& 0o755].compact/' installer.rb
|
||
rm installer.rb.bak
|
||
working-directory: ${{prefix}}/lib/rubygems
|
||
|
||
# these are provided by ruby-lang.org
|
||
# we don’t know why they turn up here too…
|
||
- run: rm rake rbs rdbg typeprof
|
||
working-directory: ${{prefix}}/bin
|
||
|
||
# We’re not a “GEMHOME” since we *are* gem, so yeah instead
|
||
# we have a RUBYLIB hack via our proxy script
|
||
- run: |
|
||
for x in *; do
|
||
mv $x ../shim
|
||
ln -s ../shim/proxy $x
|
||
done
|
||
working-directory: ${{prefix}}/bin
|
||
|
||
- rmdir {{prefix}}/plugins
|
||
|
||
test:
|
||
env:
|
||
HOME: $PWD
|
||
vRUBY: ${{deps.ruby-lang.org.version.marketing}}.0
|
||
script:
|
||
# for debug
|
||
- gem env
|
||
|
||
- |
|
||
gem install awesome_print --verbose
|
||
ruby -e 'require "rubygems"' -e 'require "awesome_print"' -e'ap $LOAD_PATH'
|
||
|
||
- |
|
||
gem install hexapdf --verbose
|
||
|
||
if [ -w /usr/local/lib/ruby/ ]; then
|
||
v="$(/usr/local/bin/hexapdf version | cut -d' ' -f2)"
|
||
test -d /usr/local/lib/ruby/gems/$vRUBY/gems/hexapdf-$v
|
||
else
|
||
v="$(~/.local/bin/hexapdf version | cut -d' ' -f2)"
|
||
test -d ~/.gem/ruby/$vRUBY/gems/hexapdf-$v
|
||
fi
|
||
|
||
provides:
|
||
- bin/bundle
|
||
- bin/bundler
|
||
- bin/gem
|