summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <hans@degraaff.org>2018-02-16 15:39:41 +0100
committerHans de Graaff <hans@degraaff.org>2018-02-16 15:39:41 +0100
commit8161c1cf0cd986cfefdda9e5ef0d8752a33c9d30 (patch)
treef4cf0261599e60b69fac435ae27e87f925499406
parentupdate stats scripts for ruby25 (diff)
downloadruby-scripts-8161c1cf0cd986cfefdda9e5ef0d8752a33c9d30.tar.gz
ruby-scripts-8161c1cf0cd986cfefdda9e5ef0d8752a33c9d30.tar.bz2
ruby-scripts-8161c1cf0cd986cfefdda9e5ef0d8752a33c9d30.zip
add patchset for 2.5.0
-rw-r--r--patchsets/patches-2.5.0/005_no-undefined-ext.patch11
-rw-r--r--patchsets/patches-2.5.0/009_no-gems.patch95
2 files changed, 106 insertions, 0 deletions
diff --git a/patchsets/patches-2.5.0/005_no-undefined-ext.patch b/patchsets/patches-2.5.0/005_no-undefined-ext.patch
new file mode 100644
index 0000000..a6e1ebb
--- /dev/null
+++ b/patchsets/patches-2.5.0/005_no-undefined-ext.patch
@@ -0,0 +1,11 @@
+--- configure.ac.~1~ 2017-12-15 10:43:40.000000000 +0100
++++ configure.ac 2017-12-25 11:02:19.099076831 +0100
+@@ -3233,7 +3233,7 @@
+ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku*], [
+ : ${LDSHARED='$(CC) -shared'}
+ AS_IF([test "$rb_cv_binary_elf" = yes], [
+- LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
++ LDFLAGS="$LDFLAGS -Wl,-export-dynamic -Wl,--no-undefined"
+ ])
+ rb_cv_dlopen=yes],
+ [interix*], [ : ${LDSHARED='$(CC) -shared'}
diff --git a/patchsets/patches-2.5.0/009_no-gems.patch b/patchsets/patches-2.5.0/009_no-gems.patch
new file mode 100644
index 0000000..6e942cb
--- /dev/null
+++ b/patchsets/patches-2.5.0/009_no-gems.patch
@@ -0,0 +1,95 @@
+--- tool/rbinstall.rb.~1~ 2017-10-30 06:45:20.000000000 +0100
++++ tool/rbinstall.rb 2017-12-25 11:06:53.340432435 +0100
+@@ -700,20 +700,10 @@
+ # :startdoc:
+
+ install?(:ext, :comm, :gem, :'default-gems', :'default-gems-comm') do
+- install_default_gem('lib', srcdir)
++ # Gems are unbundled in Gentoo
+ end
+ install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do
+- install_default_gem('ext', srcdir) do |path|
+- # assume that gemspec and extconf.rb are placed in the same directory
+- success = false
+- begin
+- IO.foreach(File.dirname(path[(srcdir.size+1)..-1]) + "/Makefile") do |l|
+- break success = true if /^TARGET\s*=/ =~ l
+- end
+- rescue Errno::ENOENT
+- end
+- success
+- end
++ # Gems are unbundled in Gentoo
+ end
+
+ def load_gemspec(file)
+@@ -765,68 +755,7 @@
+ end
+
+ install?(:ext, :comm, :gem, :'bundled-gems') do
+- gem_dir = Gem.default_dir
+- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+- prepare "bundled gems", gem_dir, directories
+- install_dir = with_destdir(gem_dir)
+- installed_gems = {}
+- options = {
+- :install_dir => install_dir,
+- :bin_dir => with_destdir(bindir),
+- :domain => :local,
+- :ignore_dependencies => true,
+- :dir_mode => $dir_mode,
+- :data_mode => $data_mode,
+- :prog_mode => $prog_mode,
+- :wrappers => true,
+- :format_executable => true,
+- }
+- gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}"
+- extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir
+- Gem::Specification.each_gemspec([srcdir+'/gems/*']) do |path|
+- spec = load_gemspec(path)
+- next unless spec.platform == Gem::Platform::RUBY
+- next unless spec.full_name == path[srcdir.size..-1][/\A\/gems\/([^\/]+)/, 1]
+- spec.extension_dir = "#{extensions_dir}/#{spec.full_name}"
+- if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}")
+- spec.extensions[0] ||= "-"
+- end
+- ins = RbInstall::UnpackedInstaller.new(spec, options)
+- puts "#{INDENT}#{spec.name} #{spec.version}"
+- ins.install
+- File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec"))
+- unless spec.extensions.empty?
+- install_recursive(ext, spec.extension_dir)
+- end
+- installed_gems[spec.full_name] = true
+- end
+- installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| installed_gems.key?(File.basename(gem, '.gem'))}
+- unless installed_gems.empty?
+- install installed_gems, gem_dir+"/cache"
+- end
+- next if gems.empty?
+- if defined?(Zlib)
+- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name)))
+- silent = Gem::SilentUI.new
+- gems.each do |gem|
+- inst = Gem::Installer.new(gem, options)
+- inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
+- begin
+- Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
+- rescue Gem::InstallError => e
+- next
+- end
+- gemname = File.basename(gem)
+- puts "#{INDENT}#{gemname}"
+- end
+- # fix directory permissions
+- # TODO: Gem.install should accept :dir_mode option or something
+- File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
+- # fix .gemspec permissions
+- File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
+- else
+- puts "skip installing bundled gems because of lacking zlib"
+- end
++ # Gems are unbundled in Gentoo
+ end
+
+ parse_args()