]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-5.4.9-ruby1.9-fixes.patch
- now db6.1 as an alternative for db5.2
[packages/rpm.git] / rpm-5.4.9-ruby1.9-fixes.patch
1 diff -urN rpm-5.4.9/macros/ruby.in rpm-5.4.9-patched/macros/ruby.in
2 --- rpm-5.4.9/macros/ruby.in    2011-10-15 23:56:57.000000000 +1100
3 +++ rpm-5.4.9-patched/macros/ruby.in    2012-08-30 18:09:09.732009037 +1100
4 @@ -2,7 +2,7 @@
5  # To make use of these macros insert the following line into your spec file:
6  # %{load:%{_usrlibrpm}/macros.d/ruby}
7  
8 -%__ruby                @__RUBY@
9 +%__ruby                /usr/bin/ruby
10  
11  # Path to scripts to autogenerate php package dependencies,
12  #
13 @@ -11,18 +11,18 @@
14  %__ruby_provides       %{_rpmhome}/rubygems.rb --provides
15  %__ruby_requires       %{_rpmhome}/rubygems.rb --requires
16  
17 -%ruby_version          %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["ruby_version"]')
18 +%ruby_version          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["ruby_version"]')
19  
20 -%ruby_archdir          %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["archdir"]')
21 -%ruby_libdir           %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["rubylibdir"]')
22 -%ruby_sitedir          %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["sitedir"]')
23 -%ruby_sitearchdir      %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["sitearchdir"]')
24 -%ruby_sitelibdir       %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["sitelibdir"]')
25 -%ruby_vendordir                %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["vendordir"]')
26 -%ruby_vendorarchdir    %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["vendorarchdir"]')
27 -%ruby_vendorlibdir     %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["vendorlibdir"]')
28 -%ruby_gemdir           %(%{__ruby} -rrbconfig -e 'include Config; print CONFIG["rubylibdir"].sub(CONFIG["ruby_version"], "gems/#{CONFIG["ruby_version"]}")')
29 -%ruby_ridir            %(%{__ruby} -rrbconfig -e 'include Config; print File.join(CONFIG["datadir"], "ri", CONFIG["ruby_version"])')
30 +%ruby_archdir          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["archdir"]')
31 +%ruby_libdir           %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"]')
32 +%ruby_sitedir          %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitedir"]')
33 +%ruby_sitearchdir      %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')
34 +%ruby_sitelibdir       %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')
35 +%ruby_vendordir                %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendordir"]')
36 +%ruby_vendorarchdir    %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorarchdir"]')
37 +%ruby_vendorlibdir     %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorlibdir"]')
38 +%ruby_gemdir           %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"].sub(RbConfig::CONFIG["ruby_version"], "gems/#{RbConfig::CONFIG["ruby_version"]}")')
39 +%ruby_ridir            %(%{__ruby} -rrbconfig -e 'print File.join(RbConfig::CONFIG["datadir"], "ri", RbConfig::CONFIG["ruby_version"])')
40  
41  %__gem_helper %{_usrlibrpm}/gem_helper.rb
42  
43 diff -urN rpm-5.4.9/scripts/gem_helper.rb rpm-5.4.9-patched/scripts/gem_helper.rb
44 --- rpm-5.4.9/scripts/gem_helper.rb     2010-10-16 20:58:48.000000000 +1100
45 +++ rpm-5.4.9-patched/scripts/gem_helper.rb     2012-08-30 18:12:11.233007114 +1100
46 @@ -57,10 +57,13 @@
47      argv.delete_at(0)
48    end
49  
50 -  file_data = Zlib::GzipReader.open("metadata.gz")
51 +  file_data = Zlib::GzipReader.open("metadata.gz") {|io| io.read}
52    header = YAML::load(file_data)
53 -  file_data.close()
54 -  body = header.instance_variable_get :@ivars
55 +  body = {}
56 +  # I don't know any better.. :/
57 +  header.instance_variables.each do |iv|
58 +         body[iv.to_s.gsub(/^@/,'')] = header.instance_variable_get(iv)
59 +  end
60  
61    require 'rubygems'
62    spec = Gem::Specification.from_yaml(YAML.dump(header))
This page took 0.052446 seconds and 3 git commands to generate.