mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
2a5b45ddc5
commit
a7a0b3ad52
3 changed files with 42 additions and 3 deletions
|
@ -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>
|
Sun Mar 3 07:33:00 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||||
|
|
||||||
* ext/socket/tcpserver.c: Grammar for TCPServer.new from r39554
|
* 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:)(.*)/) {
|
changed |= mf.gsub!(/^(install-rb-default:)(.*)/) {
|
||||||
"#$1#{$2.gsub(/(?:^|\s+)\$\(RUBY(?:ARCH|LIB)DIR\)\/\S+(?=\s|$)/, '')}"
|
"#$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
|
if changed
|
||||||
File.open('Makefile', 'wb') {|f| f.print mf}
|
File.open('Makefile', 'wb') {|f| f.print mf}
|
||||||
end
|
end
|
||||||
|
|
|
@ -1038,9 +1038,6 @@ gem 'other', version
|
||||||
RUBY
|
RUBY
|
||||||
end
|
end
|
||||||
|
|
||||||
# make sure timestamp file will become newer than the script file.
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
assert !File.exist?(File.join(@spec.gem_dir, rb))
|
assert !File.exist?(File.join(@spec.gem_dir, rb))
|
||||||
use_ui @ui do
|
use_ui @ui do
|
||||||
path = Gem::Package.build @spec
|
path = Gem::Package.build @spec
|
||||||
|
@ -1051,6 +1048,38 @@ gem 'other', version
|
||||||
assert File.exist?(File.join(@spec.gem_dir, rb))
|
assert File.exist?(File.join(@spec.gem_dir, rb))
|
||||||
end
|
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
|
def test_installation_satisfies_dependency_eh
|
||||||
quick_spec 'a'
|
quick_spec 'a'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue