distributable: url: https://cache.ruby-lang.org/pub/ruby/{{version.marketing}}/ruby-{{version}}.tar.xz strip-components: 1 versions: github: ruby/ruby/tags dependencies: openssl.org: ^1.1 pyyaml.org: ^0.2 zlib.net: ^1 build: dependencies: freedesktop.org/pkg-config: ^0.29 gnu.org/gettext: ^0.21 tea.xyz/gx/cc: c99 tea.xyz/gx/make: '*' gnu.org/patch: '*' 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 env: ARGS: - --prefix="{{prefix}}" - --enable-load-relative # makes us relocatable - --disable-rubygems # we provide rubygems.org - --without-gmp - --with-rubyarchprefix={{prefix}}/lib/ruby # no need for architecture specific crap - --with-rubyhdrdir={{prefix}}/include # ^^ - --with-rubyarchhdrdir={{prefix}}/include # ^^ - --disable-multiarch # ^^ - --with-vendordir=no # is empty so don’t pollute - --with-vendorarchdir=no # ^^ - --with-sitedir=no # ^^ - --with-sitearchdir=no # ^^ script: - patch -p1 < props/mkconfig.rb.diff - ./configure $ARGS - make --jobs {{hw.concurrency}} install # we provide these as `rubygems.org` - run: rm bundle bundler gem working-directory: ${{prefix}}/bin - fix-shebangs.ts ${{prefix}}/bin/* - run: | rm -rf share/ri rm -rf share/doc rm -rf lib/ruby/site_ruby rm -rf lib/ruby/vendor_ruby working-directory: ${{prefix}} # weirdly files get put here and we can't figure out how to stop it - run: | mv *-{{hw.platform}}*/* . rmdir *-{{hw.platform}}* working-directory: ${{prefix}}/lib - run: sed -i.bak -e 's|$(DESTDIR){{prefix}}|$(topdir)|g' -e 's|CONFIG\["topdir"\] = .*|CONFIG\["topdir"\] = TOPDIR|g' rbconfig.rb working-directory: ${{prefix}}/lib/ruby/{{version.marketing}}.0 test: dependencies: tea.xyz/gx/cc: c99 # for native extensions tea.xyz/gx/make: '*' script: | ruby -e 'puts "Hello World!"' echo 'puts 1' | irb provides: - bin/erb - bin/irb - bin/racc - bin/rake - bin/rbs - bin/rdoc - bin/ri - bin/ruby - bin/typeprof interprets: extensions: rb args: ruby companions: rubygems.org: '*'