2022-10-03 18:37:28 +03:00
|
|
|
|
distributable:
|
2023-01-03 19:09:13 +03:00
|
|
|
|
url: https://cache.ruby-lang.org/pub/ruby/{{version.marketing}}/ruby-{{version}}.tar.xz
|
2022-10-03 18:37:28 +03:00
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
|
|
versions:
|
2023-02-10 02:57:49 +03:00
|
|
|
|
github: ruby/ruby
|
2022-10-03 18:37:28 +03:00
|
|
|
|
|
|
|
|
|
dependencies:
|
|
|
|
|
openssl.org: ^1.1
|
|
|
|
|
pyyaml.org: ^0.2
|
2023-01-15 22:34:19 +03:00
|
|
|
|
zlib.net: ^1
|
2022-10-03 18:37:28 +03:00
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
dependencies:
|
|
|
|
|
freedesktop.org/pkg-config: ^0.29
|
|
|
|
|
gnu.org/gettext: ^0.21
|
|
|
|
|
tea.xyz/gx/cc: c99
|
|
|
|
|
tea.xyz/gx/make: '*'
|
2023-02-17 15:41:07 +03:00
|
|
|
|
gnu.org/patch: '*'
|
2022-10-03 18:37:28 +03:00
|
|
|
|
script: |
|
2023-02-17 15:41:07 +03:00
|
|
|
|
patch -p1 < props/mkconfig.rb.diff
|
|
|
|
|
|
2023-02-18 05:07:30 +03:00
|
|
|
|
./configure --prefix="{{prefix}}" --enable-load-relative --disable-rubygems --without-gmp
|
2022-10-03 18:37:28 +03:00
|
|
|
|
make --jobs {{hw.concurrency}} install
|
|
|
|
|
|
2023-02-10 00:54:43 +03:00
|
|
|
|
cd "{{prefix}}/bin"
|
2022-11-02 23:38:19 +03:00
|
|
|
|
|
|
|
|
|
# we provide these as `rubygems.org`
|
2023-02-10 02:57:49 +03:00
|
|
|
|
for GEM in bundle bundler gem rake rbs rdbg typeprof; do
|
|
|
|
|
test -f $GEM && rm $GEM
|
|
|
|
|
done
|
2022-11-02 23:38:19 +03:00
|
|
|
|
|
|
|
|
|
for shim in $shims; do
|
|
|
|
|
sed -i.bak -e 's_#!{{prefix}}/bin/ruby_#!/usr/bin/env ruby_' $shim
|
|
|
|
|
rm $shim.bak
|
|
|
|
|
done
|
2023-02-17 15:41:07 +03:00
|
|
|
|
|
|
|
|
|
cd ../lib/ruby/{{version.major}}.{{version.minor}}.0
|
|
|
|
|
|
|
|
|
|
# ruby itself provides the gems for these and we don’t want that
|
|
|
|
|
# we want to pkg them ourselves as part of rubygems.org
|
|
|
|
|
for x in bundler rubygems bundler.rb rubygems.rb; do
|
|
|
|
|
if test -d $x; then
|
|
|
|
|
rm -rf $x
|
|
|
|
|
else
|
|
|
|
|
rm $x
|
|
|
|
|
fi
|
|
|
|
|
ln -s ../../../../rubygems.org/v\*/lib/$x
|
|
|
|
|
done
|
2022-11-02 23:38:19 +03:00
|
|
|
|
env:
|
|
|
|
|
shims:
|
|
|
|
|
- erb
|
|
|
|
|
- irb
|
|
|
|
|
- racc
|
|
|
|
|
- rdoc
|
|
|
|
|
- ri
|
|
|
|
|
|
2023-01-15 22:34:19 +03:00
|
|
|
|
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!"'
|
2023-02-17 15:41:07 +03:00
|
|
|
|
gem install hexapdf -v 0.28.0 --bindir=. --no-user-install
|
|
|
|
|
./hexapdf version
|
2023-02-10 00:54:43 +03:00
|
|
|
|
test -d "{{tea.prefix}}"/ruby-lang.org/gems/{{version.major}}.{{version.minor}}.0/gems/hexapdf-0.28.0
|
2023-02-17 15:41:07 +03:00
|
|
|
|
gem install bundle
|
|
|
|
|
test -d ~/.gem/ruby/{{version.major}}.{{version.minor}}.0/gems/bundle-0.0.1
|
|
|
|
|
test -f ~/.local/bin/bundle
|
2022-11-02 23:38:19 +03:00
|
|
|
|
|
|
|
|
|
provides:
|
|
|
|
|
- bin/erb
|
|
|
|
|
- bin/irb
|
|
|
|
|
- bin/racc
|
|
|
|
|
- bin/rdoc
|
|
|
|
|
- bin/ri
|
|
|
|
|
- bin/ruby
|
|
|
|
|
|
2022-11-25 19:03:11 +03:00
|
|
|
|
interprets:
|
|
|
|
|
extensions: rb
|
|
|
|
|
args: ruby
|
|
|
|
|
|
2022-11-02 23:38:19 +03:00
|
|
|
|
companions:
|
|
|
|
|
rubygems.org: '*'
|