ruby/rubygems-1.5.0_buildroot.patch
Klaus Kämpf 9594841e44 Accepting request 220747 from openSUSE:Factory:Staging:H
- readd old macros - for now at least
- generate provides for embedded rubygems
- merged ruby-common
- new package split - only single Ruby version installable
  ruby - binary
  libruby2_1-2_0 - ruby runtime library
  ruby-stdlib - ruby standard library
  ruby-doc - ruby documentation
  ruby-devel - ruby development
- revert the ruby split (ruby - ruby21)
  rename ruby21 to ruby, integrate 'ruby' and 'ruby-common'
- remove part of rubygems1.5 patch that modify mkmf which is
  already fixed upstream
- fix rb_arch in spec: append -gnu
- fix native gem builds: create gem native extensions dir
- initial version for ruby 2.1.0 - changes to Ruby 2.0:
  VM (method cache)
  RGenGC (See ko1’s RubyKaigi presentation and RubyConf 2013 presentation)
  refinements #8481 #8571
  syntax changes
  Rational/Complex Literal #8430
  def’s return value #3753
  Bignum
  use GMP #8796
  String#scrub #8414
  Socket.getifaddrs #8368
  RDoc 4.1.0 and RubyGems 2.2.0
  “literal”.freeze is now optimized #9042
  add Exception#cause #8257
  update libraries like BigDecimal, JSON, NKF, Rake, RubyGems, and RDoc

OBS-URL: https://build.opensuse.org/request/show/220747
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=70
2014-02-03 20:16:17 +00:00

60 lines
2.4 KiB
Diff

Index: lib/rubygems/dependency_installer.rb
===================================================================
--- lib/rubygems/dependency_installer.rb.orig
+++ lib/rubygems/dependency_installer.rb
@@ -72,6 +72,7 @@ class Gem::DependencyInstaller
def initialize options = {}
@only_install_dir = !!options[:install_dir]
@install_dir = options[:install_dir] || Gem.dir
+ @build_root = options[:build_root]
options = DEFAULT_OPTIONS.merge options
@@ -382,6 +383,7 @@ class Gem::DependencyInstaller
:security_policy => @security_policy,
:user_install => @user_install,
:wrappers => @wrappers,
+ :build_root => @build_root,
:install_as_default => @install_as_default
}
options[:install_dir] = @install_dir if @only_install_dir
Index: lib/rubygems/installer.rb
===================================================================
--- lib/rubygems/installer.rb.orig
+++ lib/rubygems/installer.rb
@@ -590,8 +590,17 @@ class Gem::Installer
# (or use) a new bin dir under the gem_home.
@bin_dir = options[:bin_dir] || Gem.bindir(gem_home)
@development = options[:development]
+ @build_root = options[:build_root]
@build_args = options[:build_args] || Gem::Command.build_args
+
+ unless @build_root.nil?
+ require 'pathname'
+ @build_root = Pathname.new(@build_root).expand_path
+ @bin_dir = File.join(@build_root, options[:bin_dir] || Gem.bindir(@gem_home))
+ @gem_home = File.join(@build_root,@gem_home)
+ alert_warning "You build with buildroot.\n Build root: #{@build_root}\n Bin dir: #{@bin_dir}\n Gem home: #{@gem_home}"
+ end
end
# DOC: Missing docs or :nodoc:.
Index: lib/rubygems/install_update_options.rb
===================================================================
--- lib/rubygems/install_update_options.rb.orig
+++ lib/rubygems/install_update_options.rb
@@ -59,6 +59,12 @@ module Gem::InstallUpdateOptions
end
end
+ add_option(:"Install/Update", '--build-root DIR',
+ 'Temporary installation root. Useful for building',
+ 'packages. Do not use this when installing remote gems.') do |value, options|
+ options[:build_root] = File.expand_path(value)
+ end
+
add_option(:"Install/Update", '-N', '--no-document',
'Disable documentation generation') do |value, options|
options[:document] = []