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-04-16 00:38:14 +03:00
|
|
|
|
github: ruby/ruby/tags
|
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: '*'
|
2023-06-13 18:15:14 +03:00
|
|
|
|
gnu.org/bison: ^3
|
|
|
|
|
gnu.org/autoconf: '*'
|
|
|
|
|
linux:
|
|
|
|
|
ruby-lang.org: ~3.1 # ruby requires ruby to build
|
|
|
|
|
# ^^ only linux because we got issues on darwin currently
|
2022-10-03 18:37:28 +03:00
|
|
|
|
script: |
|
2023-02-17 15:41:07 +03:00
|
|
|
|
patch -p1 < props/mkconfig.rb.diff
|
|
|
|
|
|
2023-03-17 00:26:25 +03:00
|
|
|
|
./configure \
|
|
|
|
|
--prefix="{{prefix}}" \
|
|
|
|
|
--enable-load-relative \
|
|
|
|
|
--disable-rubygems \
|
|
|
|
|
--without-gmp \
|
2023-03-19 15:01:42 +03:00
|
|
|
|
--with-rubyarchprefix={{prefix}}/lib/ruby \
|
2023-03-17 00:26:25 +03:00
|
|
|
|
--with-rubyhdrdir={{prefix}}/include \
|
|
|
|
|
--with-rubyarchhdrdir={{prefix}}/include \
|
2023-03-19 15:01:42 +03:00
|
|
|
|
--with-vendordir=no \
|
|
|
|
|
--with-vendorarchdir=no \
|
|
|
|
|
--with-sitedir=no \
|
|
|
|
|
--with-sitearchdir=no \
|
|
|
|
|
--disable-multiarch
|
2023-03-17 00:26:25 +03:00
|
|
|
|
|
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-03-19 15:01:42 +03:00
|
|
|
|
for x in bundle bundler gem; do
|
|
|
|
|
test -f $x && rm $x
|
2023-02-10 02:57:49 +03:00
|
|
|
|
done
|
2022-11-02 23:38:19 +03:00
|
|
|
|
|
2023-03-19 15:01:42 +03:00
|
|
|
|
fix-shebangs.ts *
|
2023-02-17 15:41:07 +03:00
|
|
|
|
|
2023-03-17 00:26:25 +03:00
|
|
|
|
cd ../lib/ruby/{{version.marketing}}.0
|
2023-02-17 15:41:07 +03:00
|
|
|
|
|
|
|
|
|
# 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
|
2023-03-19 15:01:42 +03:00
|
|
|
|
ln -s ../../../../../rubygems.org/v\*/lib/$x
|
2023-02-17 15:41:07 +03:00
|
|
|
|
done
|
2023-03-17 00:26:25 +03:00
|
|
|
|
|
2023-03-19 15:01:42 +03:00
|
|
|
|
cd {{prefix}}
|
|
|
|
|
rm -rf share/ri
|
|
|
|
|
rm -rf share/doc
|
|
|
|
|
rm -rf lib/ruby/site_ruby
|
|
|
|
|
rm -rf lib/ruby/vendor_ruby
|
|
|
|
|
|
|
|
|
|
# weirdly files get put here and we can't figure out how to stop it
|
|
|
|
|
mv lib/*-{{hw.platform}}*/* lib
|
|
|
|
|
rmdir lib/*-{{hw.platform}}*
|
2022-11-02 23:38:19 +03:00
|
|
|
|
|
2023-06-13 22:31:03 +03:00
|
|
|
|
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
|
|
|
|
|
|
2023-01-15 22:34:19 +03:00
|
|
|
|
test:
|
|
|
|
|
dependencies:
|
|
|
|
|
tea.xyz/gx/cc: c99 # for native extensions
|
|
|
|
|
tea.xyz/gx/make: '*'
|
|
|
|
|
script: |
|
|
|
|
|
ruby -e 'puts "Hello World!"'
|
2022-11-02 23:38:19 +03:00
|
|
|
|
|
|
|
|
|
provides:
|
|
|
|
|
- bin/erb
|
|
|
|
|
- bin/irb
|
|
|
|
|
- bin/racc
|
2023-03-19 15:01:42 +03:00
|
|
|
|
- bin/rake
|
|
|
|
|
- bin/rbs
|
2022-11-02 23:38:19 +03:00
|
|
|
|
- bin/rdoc
|
|
|
|
|
- bin/ri
|
|
|
|
|
- bin/ruby
|
2023-03-19 15:01:42 +03:00
|
|
|
|
- bin/typeprof
|
2022-11-02 23:38:19 +03:00
|
|
|
|
|
2022-11-25 19:03:11 +03:00
|
|
|
|
interprets:
|
|
|
|
|
extensions: rb
|
|
|
|
|
args: ruby
|
|
|
|
|
|
2022-11-02 23:38:19 +03:00
|
|
|
|
companions:
|
|
|
|
|
rubygems.org: '*'
|