ext_conf_builder.rb: remove circular dependency in install-so

* lib/rubygems/ext/ext_conf_builder.rb
  (Gem::Ext::ExtConfBuilder.hack_for_obsolete_style_gems): remove
  circular dependencies in install-so too.  [ruby-core:52882]
  [Bug #7698]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-03-03 03:17:50 +00:00
Родитель 2a5b45ddc5
Коммит a7a0b3ad52
3 изменённых файлов: 42 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Sun Mar 3 12:17:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rubygems/ext/ext_conf_builder.rb
(Gem::Ext::ExtConfBuilder.hack_for_obsolete_style_gems): remove
circular dependencies in install-so too. [ruby-core:52882]
[Bug #7698]
Sun Mar 3 07:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
* ext/socket/tcpserver.c: Grammar for TCPServer.new from r39554

Просмотреть файл

@ -18,6 +18,9 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
changed |= mf.gsub!(/^(install-rb-default:)(.*)/) {
"#$1#{$2.gsub(/(?:^|\s+)\$\(RUBY(?:ARCH|LIB)DIR\)\/\S+(?=\s|$)/, '')}"
}
changed |= mf.gsub!(/^(install-so:.*DLLIB.*\n)((?:\t.*\n)+)/) {
"#$1#{$2.gsub(/.*INSTALL.*DLLIB.*\n/, '')}"
}
if changed
File.open('Makefile', 'wb') {|f| f.print mf}
end

Просмотреть файл

@ -1038,9 +1038,6 @@ gem 'other', version
RUBY
end
# make sure timestamp file will become newer than the script file.
sleep 2
assert !File.exist?(File.join(@spec.gem_dir, rb))
use_ui @ui do
path = Gem::Package.build @spec
@ -1051,6 +1048,38 @@ gem 'other', version
assert File.exist?(File.join(@spec.gem_dir, rb))
end
def test_install_extension_flat
@spec.require_paths = ["."]
@spec.extensions << "extconf.rb"
write_file File.join(@tempdir, "extconf.rb") do |io|
io.write <<-RUBY
require "mkmf"
CONFIG['CC'] = '$(TOUCH) $@ ||'
CONFIG['LDSHARED'] = '$(TOUCH) $@ ||'
create_makefile("#{@spec.name}")
RUBY
end
# empty depend file for no auto dependencies
@spec.files += %W"depend #{@spec.name}.c".each {|file|
write_file File.join(@tempdir, file)
}
so = File.join(@spec.gem_dir, "#{@spec.name}.#{RbConfig::CONFIG["DLEXT"]}")
assert !File.exist?(so)
use_ui @ui do
path = Gem::Package.build @spec
@installer = Gem::Installer.new path
@installer.install
end
assert File.exist?(so)
end
def test_installation_satisfies_dependency_eh
quick_spec 'a'