From 50224807cbaf70dad15d5afa61976065e19258d5 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Thu, 9 Feb 2023 18:57:49 -0500 Subject: [PATCH] fix(ruby) fixes #236 fixes #237 fixes #238 fixes #239 fixes #240 fixes #288 fixes #289 fixes #290 fixes #291 fixes #292 fixes #293 fixes #294 fixes #295 fixes #296 fixes #297 fixes #298 fixes #299 fixes #300 fixes #301 fixes #302 fixes #303 fixes #304 fixes #305 fixes #306 fixes #307 fixes #308 fixes #309 fixes #310 fixes #311 fixes #312 fixes #313 fixes #314 fixes #315 --- projects/ruby-lang.org/defaults.rb.patch | 13 ------------- projects/ruby-lang.org/package.yml | 10 ++++++---- 2 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 projects/ruby-lang.org/defaults.rb.patch diff --git a/projects/ruby-lang.org/defaults.rb.patch b/projects/ruby-lang.org/defaults.rb.patch deleted file mode 100644 index 6f95d7d8..00000000 --- a/projects/ruby-lang.org/defaults.rb.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/lib/ruby/3.2.0/rubygems/defaults.rb b/lib/ruby/3.2.0/rubygems/defaults.rb -index 8daff0b..59ecd32 100644 ---- a/lib/ruby/3.2.0/rubygems/defaults.rb -+++ b/lib/ruby/3.2.0/rubygems/defaults.rb -@@ -34,7 +34,7 @@ module Gem - # specified in the environment - - def self.default_dir -- @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version"]) -+ @default_dir ||= File.expand_path(File.join(__FILE__, "../../../../../../gems", RbConfig::CONFIG["ruby_version"])) - end - - ## diff --git a/projects/ruby-lang.org/package.yml b/projects/ruby-lang.org/package.yml index 3ab3bc85..0a9fd9a8 100644 --- a/projects/ruby-lang.org/package.yml +++ b/projects/ruby-lang.org/package.yml @@ -16,20 +16,22 @@ build: gnu.org/gettext: ^0.21 tea.xyz/gx/cc: c99 tea.xyz/gx/make: '*' - gnu.org/patch: '*' script: | ./configure --prefix="{{prefix}}" --enable-load-relative --disable-rubygems make --jobs {{hw.concurrency}} install - cd "{{prefix}}/lib/ruby/{{version.major}}.{{version.minor}}.0" + cd "{{prefix}}/lib/ruby/{{version.major}}.{{version.minor}}.0/rubygems" # use the GEM_PATH we want - patch -p4 < "$SRCROOT"/props/defaults.rb.patch + sed -i.bak -e 's;@default_dir ||=.*;@default_dir ||= File.expand_path(File.join(__FILE__, "../../../../../../gems", RbConfig::CONFIG["ruby_version"]));' defaults.rb + rm defaults.rb.bak cd "{{prefix}}/bin" # we provide these as `rubygems.org` - rm bundle bundler gem rake rbs rdbg typeprof + for GEM in bundle bundler gem rake rbs rdbg typeprof; do + test -f $GEM && rm $GEM + done for shim in $shims; do sed -i.bak -e 's_#!{{prefix}}/bin/ruby_#!/usr/bin/env ruby_' $shim