Search
j0ke.net Open Build Service
>
Projects
>
ha
:
firewall
>
rubygems
> rubygems-1.3.7_buildroot.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File rubygems-1.3.7_buildroot.patch of Package rubygems
Index: lib/rubygems/dependency_installer.rb =================================================================== --- lib/rubygems/dependency_installer.rb.orig +++ lib/rubygems/dependency_installer.rb @@ -68,6 +68,7 @@ class Gem::DependencyInstaller @installed_gems = [] @install_dir = options[:install_dir] || Gem.dir + @build_root = options[:build_root] @cache_dir = options[:cache_dir] || @install_dir # Set with any errors that SpecFetcher finds while search through @@ -269,6 +270,7 @@ class Gem::DependencyInstaller :format_executable => @format_executable, :ignore_dependencies => @ignore_dependencies, :install_dir => @install_dir, + :build_root => @build_root, :security_policy => @security_policy, :source_index => @source_index, :user_install => @user_install, Index: lib/rubygems/installer.rb =================================================================== --- lib/rubygems/installer.rb.orig +++ lib/rubygems/installer.rb @@ -113,6 +113,7 @@ class Gem::Installer @bin_dir = options[:bin_dir] @development = options[:development] @source_index = options[:source_index] + @build_root = options[:build_root] begin @format = Gem::Format.from_file_by_path @gem, @security_policy @@ -132,6 +133,14 @@ class Gem::Installer end end + 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 + FileUtils.mkdir_p @gem_home raise Gem::FilePermissionError, @gem_home unless options[:unpack] or File.writable? @gem_home Index: lib/rubygems/install_update_options.rb =================================================================== --- lib/rubygems/install_update_options.rb.orig +++ lib/rubygems/install_update_options.rb @@ -34,6 +34,12 @@ module Gem::InstallUpdateOptions options[:bin_dir] = File.expand_path(value) 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", '-d', '--[no-]rdoc', 'Generate RDoc documentation for the gem on', 'install') do |value, options|