diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..3569ebf4 Binary files /dev/null and b/.DS_Store differ diff --git a/projects/ruby-lang.org/mkconfig.rb.diff b/projects/ruby-lang.org/mkconfig.rb.diff new file mode 100644 index 00000000..86892167 --- /dev/null +++ b/projects/ruby-lang.org/mkconfig.rb.diff @@ -0,0 +1,28 @@ +diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb +index e6d61c5..1517669 100755 +--- a/tool/mkconfig.rb ++++ b/tool/mkconfig.rb +@@ -73,6 +73,7 @@ File.foreach "config.status" do |line| + when /^sitearch$/; val = '$(arch)' if val.empty? + when /^DESTDIR$/; next + when /RUBYGEMS/; next ++ when /^sysconfdir$/; val = '$(kegdir)/etc' + end + case val + when /^\$\(ac_\w+\)$/; next +@@ -191,6 +192,7 @@ module RbConfig + ] + print " # Ruby installed directory.\n" + print " TOPDIR = File.dirname(__FILE__).chomp!(#{relative_archdir.dump})\n" ++print " KEGDIR = TOPDIR ? File.dirname(TOPDIR) : nil\n" + print " # DESTDIR on make install.\n" + print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" + print <<'ARCH' if universal +@@ -293,6 +295,7 @@ print < '--no-rdoc --no-ri --env-shebang --user-install', ++ 'update' => '--no-rdoc --no-ri --env-shebang --user-install' ++ } + end + + ## + +diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb +index 9fbb282..8fa8bd9 100644 +--- a/lib/rubygems/installer.rb ++++ b/lib/rubygems/installer.rb +@@ -190,7 +190,7 @@ def initialize(package, options={}) + + if options[:user_install] + @gem_home = Gem.user_dir +- @bin_dir = Gem.bindir gem_home unless options[:bin_dir] ++ @bin_dir = File.join(Gem.user_home, ".local/bin") unless options[:bin_dir] + @plugins_dir = Gem.plugindir(gem_home) + check_that_user_bin_dir_is_in_path + end +@@ -953,7 +953,7 @@ def write_cache_file + + def ensure_writable_dir(dir) # :nodoc: + begin +- Dir.mkdir dir, *[options[:dir_mode] && 0755].compact ++ FileUtils.mkdir_p dir, *[options[:dir_mode] && 0755].compact + rescue SystemCallError + raise unless File.directory? dir + end diff --git a/projects/rubygems.org/package.yml b/projects/rubygems.org/package.yml index 7ec02d87..8f021de9 100644 --- a/projects/rubygems.org/package.yml +++ b/projects/rubygems.org/package.yml @@ -9,18 +9,31 @@ dependencies: ruby-lang.org: '>=2.3' build: + dependencies: + gnu.org/patch: '*' script: | - ruby setup.rb --prefix={{prefix}} --env-shebang + ruby setup.rb --prefix={{prefix}} --env-shebang --no-ri --no-rdoc + cd "{{prefix}}" + patch -p1 < "$SRCROOT"/props/fit-n-finish.patch + +runtime: + env: + # HACK that is only required for this ruby package + # since we cannot use `gem` to build `gem` itself + RUBYLIB: ${{prefix}}/lib test: dependencies: tea.xyz/gx/cc: c99 tea.xyz/gx/make: '*' + env: + HOME: $PWD script: | gem install awesome_print ruby -e 'require "rubygems"' -e 'require "awesome_print"' -e'ap $LOAD_PATH' + #TODO test -d ~/.gem/ruby/{{deps.ruby.version.major}}.{{deps.ruby.version.minor}}.0/gems/hexapdf-0.28.0 gem install hexapdf - hexapdf version + ~/.local/bin/hexapdf version provides: - bin/bundle