Top Level Namespace
Defined Under Namespace
Modules: FakeFtp, Hashicorp, Plugin, Protostructure, Vagrant, VagrantPlugins Classes: DigestClass, FileChecksum, VagrantLogger
Constant Summary collapse
- NET_SSH_PATCH_REQUIREMENT =
Set the version requirement for when net-ssh should be patched
Gem::Requirement.new(">= 7.0.0", "<= 7.3")
Instance Method Summary collapse
-
#clean_flags! ⇒ Object
Check values defined for CFLAGS, CPPFLAGS, LDFLAGS, and INCFLAGS for unquoted Windows paths and quote them.
-
#flag_cleaner(flags) ⇒ String
Attempt to detect and quote Windos paths found within the given string of flags.
- #vagrant_append_cflags(*args) ⇒ Object (also: #append_cflags)
- #vagrant_append_cppflags(*args) ⇒ Object (also: #append_cppflags)
- #vagrant_append_ldflags(*args) ⇒ Object (also: #append_ldflags)
- #vagrant_cc_config(*args) ⇒ Object (also: #cc_config)
-
#vagrant_create_makefile(*args) ⇒ Object
(also: #create_makefile)
Since mkmf loads the MakeMakefile module directly into the current scope, apply patches directly in the scope.
- #vagrant_link_config(*args) ⇒ Object (also: #link_config)
Instance Method Details
#clean_flags! ⇒ Object
Check values defined for CFLAGS, CPPFLAGS, LDFLAGS, and INCFLAGS for unquoted Windows paths and quote them.
57 58 59 60 61 62 |
# File 'lib/vagrant/patches/builder/mkmf.rb', line 57 def clean_flags! $CFLAGS = flag_cleaner($CFLAGS) $CPPFLAGS = flag_cleaner($CPPFLAGS) $LDFLAGS = flag_cleaner($LDFLAGS) $INCFLAGS = flag_cleaner($INCFLAGS) end |
#flag_cleaner(flags) ⇒ String
Attempt to detect and quote Windos paths found within the given string of flags
39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/vagrant/patches/builder/mkmf.rb', line 39 def flag_cleaner(flags) parts = flags.split(" -") parts.map! do |p| if p !~ %r{[A-Za-z]:(/|\\)} next p elsif p =~ %r{"[A-Za-z]:(/|\\).+"$} next p end p.gsub(%r{([A-Za-z]:(/|\\).+)$}, '"\1"') end parts.join(" -") end |
#vagrant_append_cflags(*args) ⇒ Object Also known as: append_cflags
74 75 76 77 78 |
# File 'lib/vagrant/patches/builder/mkmf.rb', line 74 def vagrant_append_cflags(*args) result = ruby_append_cflags(*args) clean_flags! result end |
#vagrant_append_cppflags(*args) ⇒ Object Also known as: append_cppflags
82 83 84 85 86 |
# File 'lib/vagrant/patches/builder/mkmf.rb', line 82 def vagrant_append_cppflags(*args) result = ruby_append_cppflags(*args) clean_flags! result end |
#vagrant_append_ldflags(*args) ⇒ Object Also known as: append_ldflags
90 91 92 93 94 |
# File 'lib/vagrant/patches/builder/mkmf.rb', line 90 def vagrant_append_ldflags(*args) result = ruby_append_ldflags(*args) clean_flags! result end |
#vagrant_cc_config(*args) ⇒ Object Also known as: cc_config
98 99 100 101 |
# File 'lib/vagrant/patches/builder/mkmf.rb', line 98 def vagrant_cc_config(*args) clean_flags! ruby_cc_config(*args) end |
#vagrant_create_makefile(*args) ⇒ Object Also known as: create_makefile
Since mkmf loads the MakeMakefile module directly into the current scope, apply patches directly in the scope
66 67 68 69 70 |
# File 'lib/vagrant/patches/builder/mkmf.rb', line 66 def vagrant_create_makefile(*args) clean_flags! ruby_create_makefile(*args) end |
#vagrant_link_config(*args) ⇒ Object Also known as: link_config
105 106 107 108 |
# File 'lib/vagrant/patches/builder/mkmf.rb', line 105 def vagrant_link_config(*args) clean_flags! ruby_link_config(*args) end |