diff options
author | taca <taca@pkgsrc.org> | 2013-07-07 15:01:01 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2013-07-07 15:01:01 +0000 |
commit | 44c96a16db0caf3a5a943f7a1d304ec8e895dc25 (patch) | |
tree | caf05bf24d3142cd93c5b05f2e530fa8d3d87d05 /lang | |
parent | b0437d2dd0149db1622897029745d9148aadae65 (diff) | |
download | pkgsrc-44c96a16db0caf3a5a943f7a1d304ec8e895dc25.tar.gz |
Add partly support build_info to bundled rubygems to make compatibilty with
rubygems 2.0.3.
Bump PKGREVISION.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/ruby193-base/Makefile | 3 | ||||
-rw-r--r-- | lang/ruby193-base/PLIST | 3 | ||||
-rw-r--r-- | lang/ruby193-base/distinfo | 11 | ||||
-rw-r--r-- | lang/ruby193-base/patches/patch-lib_rubygems_command.rb | 34 | ||||
-rw-r--r-- | lang/ruby193-base/patches/patch-lib_rubygems_command__manager.rb | 46 | ||||
-rw-r--r-- | lang/ruby193-base/patches/patch-lib_rubygems_dependency__installer.rb | 33 | ||||
-rw-r--r-- | lang/ruby193-base/patches/patch-lib_rubygems_gem__runner.rb | 15 | ||||
-rw-r--r-- | lang/ruby193-base/patches/patch-lib_rubygems_installer.rb | 56 | ||||
-rw-r--r-- | lang/ruby193-base/patches/patch-lib_rubygems_specification.rb | 45 |
9 files changed, 223 insertions, 23 deletions
diff --git a/lang/ruby193-base/Makefile b/lang/ruby193-base/Makefile index d9ef8f6b16a..4b7591868eb 100644 --- a/lang/ruby193-base/Makefile +++ b/lang/ruby193-base/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.30 2013/05/16 16:13:59 taca Exp $ +# $NetBSD: Makefile,v 1.31 2013/07/07 15:01:01 taca Exp $ # DISTNAME= ${RUBY_DISTNAME} PKGNAME= ${RUBY_PKGPREFIX}-base-${RUBY_VERSION_FULL} +PKGREVISION= 1 CATEGORIES= lang ruby MASTER_SITES= ${MASTER_SITE_RUBY} diff --git a/lang/ruby193-base/PLIST b/lang/ruby193-base/PLIST index 5e763136220..af249a39b49 100644 --- a/lang/ruby193-base/PLIST +++ b/lang/ruby193-base/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.8 2013/04/04 13:31:55 obache Exp $ +@comment $NetBSD: PLIST,v 1.9 2013/07/07 15:01:01 taca Exp $ bin/erb${RUBY_VER} bin/gem${RUBY_VER} bin/irb${RUBY_VER} @@ -957,6 +957,7 @@ ${RUBY_EG}/webrick/httpproxy.rb ${RUBY_EG}/webrick/httpsd.rb @pkgdir ${RUBY_SITEARCHLIB} @pkgdir ${RUBY_VENDORARCHLIB} +@pkgdir ${GEM_HOME}/build_info @pkgdir ${GEM_HOME}/cache @pkgdir ${GEM_HOME}/doc @pkgdir ${RUBY_SITERIDIR} diff --git a/lang/ruby193-base/distinfo b/lang/ruby193-base/distinfo index 8edbe7bac43..5b77bd13cc6 100644 --- a/lang/ruby193-base/distinfo +++ b/lang/ruby193-base/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.22 2013/06/27 16:35:43 taca Exp $ +$NetBSD: distinfo,v 1.23 2013/07/07 15:01:01 taca Exp $ SHA1 (ruby-1.9.3-p448.tar.bz2) = 4bd9140bd4760409f771d4dd55138c22d3ff2995 RMD160 (ruby-1.9.3-p448.tar.bz2) = e012b5b506092406a4e35711d57290932ba557c6 @@ -8,17 +8,20 @@ SHA1 (patch-configure.in) = cef794d185fa41cd144d55558fcee320f9385f94 SHA1 (patch-defs_default__gems) = fb24111736f1a76a05e853aa068024dbdd24e5a5 SHA1 (patch-lib_rdoc_ri_driver.rb) = acb4cb022893eb8dea2adf7564f5e5e1a0f1e9c8 SHA1 (patch-lib_rubygems.rb) = 2aed4990a868dc92668a78da7bcff2050ff3dd66 +SHA1 (patch-lib_rubygems_command.rb) = 916a93372e714b56a741acc15350536194f34c77 +SHA1 (patch-lib_rubygems_command__manager.rb) = 4fabf9a6c8bf5e47a4fb3bb3d398105b4452ec7e SHA1 (patch-lib_rubygems_commands_install__command.rb) = ff637f39f3fd76b7550fd7f8c32fe303eec6f8c3 SHA1 (patch-lib_rubygems_commands_setup__command.rb) = 85b666544fc0787e67bb54071d8660cbfe3015d6 SHA1 (patch-lib_rubygems_commands_uninstall__command.rb) = 7d8dd07d332f0e89822d06f2d71e7552358107cc SHA1 (patch-lib_rubygems_commands_unpack__command.rb) = b8e18f1feedb7966e2a5280d6020c6134a7d83a3 SHA1 (patch-lib_rubygems_config__file.rb) = ed4ff25ea89a2d13ee601c7edfda0902f08fe29c SHA1 (patch-lib_rubygems_defaults.rb) = 101a6e653ef3811cdda3ed333b50448c0d3f0d26 -SHA1 (patch-lib_rubygems_dependency__installer.rb) = 5b86f3baae2181253230a35cd53481f7207cfa56 +SHA1 (patch-lib_rubygems_dependency__installer.rb) = 9ad04af723c1fa8a7d07b871e0ca2b03cf585e78 SHA1 (patch-lib_rubygems_doc__manager.rb) = 4b2d70e5dfaeff1f1b70ff27f1084065dcc742d3 +SHA1 (patch-lib_rubygems_gem__runner.rb) = 03ff2f0b72004ef7e09b5ba9d56752109e4e6b73 SHA1 (patch-lib_rubygems_install__update__options.rb) = 74f81900c92bc3c7a663a112cccf6ff88b6ae180 -SHA1 (patch-lib_rubygems_installer.rb) = cec82bd0c5255a2a23799273c7a2835e2bef7e33 -SHA1 (patch-lib_rubygems_specification.rb) = bc1f844153d00623349ea2d703a979001c9986ec +SHA1 (patch-lib_rubygems_installer.rb) = 5832fd6e8a3d26fe8ae5afc9f8a6fea462d56ccf +SHA1 (patch-lib_rubygems_specification.rb) = 3da23596f701c1966bc12f2341c82f2f2c646779 SHA1 (patch-lib_rubygems_uninstaller.rb) = bde19710968f80e56760288d09870a08f3a4ec52 SHA1 (patch-lib_rubygems_version.rb) = 3ec26651ba8f2e6bbd4527e8c0a2f5944833264f SHA1 (patch-man_erb.1) = a8f69ebb02b4d5e1c80b270a3d683c23d8dfbcf1 diff --git a/lang/ruby193-base/patches/patch-lib_rubygems_command.rb b/lang/ruby193-base/patches/patch-lib_rubygems_command.rb new file mode 100644 index 00000000000..1970431d4ad --- /dev/null +++ b/lang/ruby193-base/patches/patch-lib_rubygems_command.rb @@ -0,0 +1,34 @@ +$NetBSD: patch-lib_rubygems_command.rb,v 1.1 2013/07/07 15:01:01 taca Exp $ + +* Support partly build_args options. + +--- lib/rubygems/command.rb.orig 2011-07-27 02:04:03.000000000 +0000 ++++ lib/rubygems/command.rb +@@ -268,8 +268,18 @@ class Gem::Command + # Invoke the command with the given list of arguments. + + def invoke(*args) ++ invoke_with_build_args args, nil ++ end ++ ++ ## ++ # Invoke the command with the given list of normal arguments ++ # and additional build arguments. ++ ++ def invoke_with_build_args(args, build_args) + handle_options args + ++ options[:build_args] = build_args ++ + if options[:help] then + show_help + elsif @when_invoked then +@@ -344,7 +354,7 @@ class Gem::Command + + def handle_options(args) + args = add_extra_args(args) +- @options = @defaults.clone ++ @options = Marshal.load Marshal.dump @defaults # deep copy + parser.parse!(args) + @options[:args] = args + end diff --git a/lang/ruby193-base/patches/patch-lib_rubygems_command__manager.rb b/lang/ruby193-base/patches/patch-lib_rubygems_command__manager.rb new file mode 100644 index 00000000000..06132dada6b --- /dev/null +++ b/lang/ruby193-base/patches/patch-lib_rubygems_command__manager.rb @@ -0,0 +1,46 @@ +$NetBSD: patch-lib_rubygems_command__manager.rb,v 1.1 2013/07/07 15:01:01 taca Exp $ + +* Support partly build_args options. + +--- lib/rubygems/command_manager.rb.orig 2011-07-27 02:04:03.000000000 +0000 ++++ lib/rubygems/command_manager.rb +@@ -113,8 +113,8 @@ class Gem::CommandManager + ## + # Run the config specified by +args+. + +- def run(args) +- process_args(args) ++ def run(args, build_args=nil) ++ process_args(args, build_args) + rescue StandardError, Timeout::Error => ex + alert_error "While executing gem ... (#{ex.class})\n #{ex.to_s}" + ui.errs.puts "\t#{ex.backtrace.join "\n\t"}" if +@@ -125,13 +125,15 @@ class Gem::CommandManager + terminate_interaction(1) + end + +- def process_args(args) ++ def process_args(args, build_args=nil) + args = args.to_str.split(/\s+/) if args.respond_to?(:to_str) +- if args.size == 0 ++ ++ if args.empty? then + say Gem::Command::HELP +- terminate_interaction(1) ++ terminate_interaction 1 + end +- case args[0] ++ ++ case args.first + when '-h', '--help' + say Gem::Command::HELP + terminate_interaction(0) +@@ -144,7 +146,7 @@ class Gem::CommandManager + else + cmd_name = args.shift.downcase + cmd = find_command(cmd_name) +- cmd.invoke(*args) ++ cmd.invoke_with_build_args args, build_args + end + end + diff --git a/lang/ruby193-base/patches/patch-lib_rubygems_dependency__installer.rb b/lang/ruby193-base/patches/patch-lib_rubygems_dependency__installer.rb index 3603820a3ca..3bffaa12c93 100644 --- a/lang/ruby193-base/patches/patch-lib_rubygems_dependency__installer.rb +++ b/lang/ruby193-base/patches/patch-lib_rubygems_dependency__installer.rb @@ -1,10 +1,18 @@ -$NetBSD: patch-lib_rubygems_dependency__installer.rb,v 1.3 2013/06/27 16:35:44 taca Exp $ +$NetBSD: patch-lib_rubygems_dependency__installer.rb,v 1.4 2013/07/07 15:01:01 taca Exp $ Add install_root option for pkgsrc's rubygems support. --- lib/rubygems/dependency_installer.rb.orig 2011-07-27 02:04:03.000000000 +0000 +++ lib/rubygems/dependency_installer.rb -@@ -38,6 +38,7 @@ class Gem::DependencyInstaller +@@ -23,6 +23,7 @@ class Gem::DependencyInstaller + :prerelease => false, + :security_policy => nil, # HACK NoSecurity requires OpenSSL. AlmostNo? Low? + :wrappers => true, ++ :build_args => nil, + } + + ## +@@ -38,10 +39,12 @@ class Gem::DependencyInstaller # :format_executable:: See Gem::Installer#initialize. # :ignore_dependencies:: Don't install any dependencies. # :install_dir:: See Gem::Installer#install. @@ -12,7 +20,17 @@ Add install_root option for pkgsrc's rubygems support. # :prerelease:: Allow prerelease versions. See #install. # :security_policy:: See Gem::Installer::new and Gem::Security. # :user_install:: See Gem::Installer.new -@@ -69,7 +70,12 @@ class Gem::DependencyInstaller + # :wrappers:: See Gem::Installer::new ++ # :build_args:: See Gem::Installer::new + + def initialize(options = {}) + if options[:install_dir] then +@@ -65,11 +68,17 @@ class Gem::DependencyInstaller + @security_policy = options[:security_policy] + @user_install = options[:user_install] + @wrappers = options[:wrappers] ++ @build_args = options[:build_args] + @installed_gems = [] @install_dir = options[:install_dir] || Gem.dir @@ -26,11 +44,16 @@ Add install_root option for pkgsrc's rubygems support. # Set with any errors that SpecFetcher finds while search through # gemspecs for a dep -@@ -290,6 +296,7 @@ class Gem::DependencyInstaller +@@ -290,9 +299,11 @@ class Gem::DependencyInstaller :format_executable => @format_executable, :ignore_dependencies => @ignore_dependencies, :install_dir => @install_dir, + :install_root => @install_root, :security_policy => @security_policy, :user_install => @user_install, - :wrappers => @wrappers +- :wrappers => @wrappers ++ :wrappers => @wrappers, ++ :build_args => @build_args + + spec = inst.install + diff --git a/lang/ruby193-base/patches/patch-lib_rubygems_gem__runner.rb b/lang/ruby193-base/patches/patch-lib_rubygems_gem__runner.rb new file mode 100644 index 00000000000..d8c548a58ff --- /dev/null +++ b/lang/ruby193-base/patches/patch-lib_rubygems_gem__runner.rb @@ -0,0 +1,15 @@ +$NetBSD: patch-lib_rubygems_gem__runner.rb,v 1.1 2013/07/07 15:01:01 taca Exp $ + +* Support partly build_args options. + +--- lib/rubygems/gem_runner.rb.orig 2011-07-27 02:04:03.000000000 +0000 ++++ lib/rubygems/gem_runner.rb +@@ -62,7 +60,7 @@ class Gem::GemRunner + Gem::Command.add_specific_extra_args command_name, config_args + end + +- cmd.run Gem.configuration.args ++ cmd.run Gem.configuration.args, build_args + end_time = Time.now + + if Gem.configuration.benchmark then diff --git a/lang/ruby193-base/patches/patch-lib_rubygems_installer.rb b/lang/ruby193-base/patches/patch-lib_rubygems_installer.rb index 73559a321a2..684a2eeca2b 100644 --- a/lang/ruby193-base/patches/patch-lib_rubygems_installer.rb +++ b/lang/ruby193-base/patches/patch-lib_rubygems_installer.rb @@ -1,10 +1,10 @@ -$NetBSD: patch-lib_rubygems_installer.rb,v 1.1.1.1 2011/11/08 16:10:51 taca Exp $ +$NetBSD: patch-lib_rubygems_installer.rb,v 1.2 2013/07/07 15:01:01 taca Exp $ Add install_root option for pkgsrc's rubygems support. ---- lib/rubygems/installer.rb.orig 2011-08-04 22:39:35.000000000 +0000 +--- lib/rubygems/installer.rb.orig 2012-10-25 09:18:59.000000000 +0000 +++ lib/rubygems/installer.rb -@@ -85,6 +85,9 @@ class Gem::Installer +@@ -85,11 +85,16 @@ class Gem::Installer # for a signed-gems-only policy. # :ignore_dependencies:: Don't raise if a dependency is missing. # :install_dir:: The directory to install the gem into. @@ -14,7 +14,22 @@ Add install_root option for pkgsrc's rubygems support. # :format_executable:: Format the executable the same as the ruby executable. # If your ruby is ruby18, foo_exec will be installed as # foo_exec18. -@@ -283,7 +286,11 @@ class Gem::Installer + # :security_policy:: Use the specified security policy. See Gem::Security + # :wrappers:: Install wrappers if true, symlinks if false. ++ # :build_args:: An Array of arguments to pass to the extension builder ++ # process. If not set, then Gem::Command.build_args is used + + def initialize(gem, options={}) + require 'fileutils' +@@ -178,6 +183,7 @@ class Gem::Installer + + extract_files + build_extensions ++ write_build_info_file + + Gem.post_build_hooks.each do |hook| + result = hook.call self +@@ -283,7 +289,11 @@ class Gem::Installer # If the user has asked for the gem to be installed in a directory that is # the system gem directory, then use the system bin directory, else create # (or use) a new bin dir under the gem_home. @@ -27,7 +42,7 @@ Add install_root option for pkgsrc's rubygems support. Dir.mkdir bindir unless File.exist? bindir raise Gem::FilePermissionError.new(bindir) unless File.writable? bindir -@@ -416,6 +423,7 @@ class Gem::Installer +@@ -416,6 +426,7 @@ class Gem::Installer :exec_format => false, :force => false, :install_dir => Gem.dir, @@ -35,7 +50,7 @@ Add install_root option for pkgsrc's rubygems support. }.merge options @env_shebang = options[:env_shebang] -@@ -425,6 +433,11 @@ class Gem::Installer +@@ -425,9 +436,16 @@ class Gem::Installer @format_executable = options[:format_executable] @security_policy = options[:security_policy] @wrappers = options[:wrappers] @@ -47,3 +62,32 @@ Add install_root option for pkgsrc's rubygems support. @bin_dir = options[:bin_dir] @development = options[:development] ++ @build_args = options[:build_args] || Gem::Command.build_args ++ + raise "NOTE: Installer option :source_index is dead" if + options[:source_index] + end +@@ -622,5 +640,23 @@ EOF + def dir + gem_dir.to_s + end ++ ++ ## ++ # Writes the file containing the arguments for building this gem's ++ # extensions. ++ ++ def write_build_info_file ++ return if @build_args.empty? ++ ++ build_info_file = spec.build_info_file ++ build_info_dir = File.dirname build_info_file ++ FileUtils.mkdir_p build_info_dir ++ open build_info_file, 'w' do |io| ++ @build_args.each do |arg| ++ io.puts arg ++ end ++ end ++ end ++ + end + diff --git a/lang/ruby193-base/patches/patch-lib_rubygems_specification.rb b/lang/ruby193-base/patches/patch-lib_rubygems_specification.rb index 1c9bf5324bf..6a303770d95 100644 --- a/lang/ruby193-base/patches/patch-lib_rubygems_specification.rb +++ b/lang/ruby193-base/patches/patch-lib_rubygems_specification.rb @@ -1,4 +1,4 @@ -$NetBSD: patch-lib_rubygems_specification.rb,v 1.3 2013/02/02 08:11:53 taca Exp $ +$NetBSD: patch-lib_rubygems_specification.rb,v 1.4 2013/07/07 15:01:01 taca Exp $ Changes for pkgsrc environment: @@ -23,7 +23,40 @@ Rubygem 1.8.25. ###################################################################### # :section: Required gemspec attributes -@@ -1000,7 +1006,7 @@ class Gem::Specification +@@ -934,6 +940,32 @@ class Gem::Specification + end + + ## ++ # Returns the build_args used to install the gem ++ ++ def build_args ++ if File.exists? build_info_file ++ File.readlines(build_info_file).map { |x| x.strip } ++ else ++ [] ++ end ++ end ++ ++ ## ++ # Returns the full path to the build info directory ++ ++ def build_info_dir ++ File.join base_dir, "build_info" ++ end ++ ++ ## ++ # Returns the full path to the file containing the build ++ # information generated when the gem was installed ++ ++ def build_info_file ++ File.join build_info_dir, "#{full_name}.info" ++ end ++ ++ ## + # Returns the full path to the cache directory containing this + # spec's cached gem. + +@@ -1000,7 +1032,7 @@ class Gem::Specification # way to do it. @date = case date when String then @@ -32,7 +65,7 @@ Rubygem 1.8.25. Time.utc($1.to_i, $2.to_i, $3.to_i) # Workaround for where the date format output from psych isn't -@@ -1720,7 +1726,9 @@ class Gem::Specification +@@ -1720,7 +1752,9 @@ class Gem::Specification when Numeric then obj.inspect when true, false, nil then obj.inspect when Gem::Platform then "Gem::Platform.new(#{obj.to_a.inspect})" @@ -43,7 +76,7 @@ Rubygem 1.8.25. else raise Gem::Exception, "ruby_code case not handled: #{obj.class}" end end -@@ -1946,6 +1954,7 @@ class Gem::Specification +@@ -1946,6 +1980,7 @@ class Gem::Specification ast = builder.tree io = StringIO.new @@ -51,7 +84,7 @@ Rubygem 1.8.25. Psych::Visitors::Emitter.new(io).accept(ast) -@@ -1987,7 +1996,24 @@ class Gem::Specification +@@ -1987,7 +2022,24 @@ class Gem::Specification normalize nil_attributes = self.class.non_nil_attributes.find_all do |name| @@ -77,7 +110,7 @@ Rubygem 1.8.25. end unless nil_attributes.empty? then -@@ -2090,10 +2116,15 @@ class Gem::Specification +@@ -2090,10 +2142,15 @@ class Gem::Specification raise Gem::InvalidSpecificationException, "#{lazy} is not a summary" end |