rconf 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -150,11 +150,20 @@ module RightConf
|
|
150
150
|
def install_ruby_darwin(ruby)
|
151
151
|
c_version = `system_profiler SPDeveloperToolsDataType -xml | xpath "//*[text()='_items']/following-sibling::array/dict/child::key[text()='spdevtools_version']/following-sibling::string/text()" 2> /dev/null`
|
152
152
|
env = {}
|
153
|
+
gcc42 = ['/usr/bin/gcc-4.2', '/usr/local/bin/gcc-4.2'].detect { |p| File.executable?(p) }
|
153
154
|
if c_version =~ /^4\.2\.[0-9]+/
|
154
|
-
if !
|
155
|
+
if !gcc42
|
155
156
|
report_fatal("The C compiler included with Xcode #{c_version} produces buggy ruby interpreters, please install the C compilers from https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg or update your version of Xcode and re-run rconf")
|
156
157
|
else
|
157
|
-
env['CC'] =
|
158
|
+
env['CC'] = gcc42
|
159
|
+
end
|
160
|
+
end
|
161
|
+
if ruby =~ /1\.8/
|
162
|
+
if File.directory?('/opt/X11/include')
|
163
|
+
env['CC'] = gcc42
|
164
|
+
env['CPPFLAGS'] = '-I/opt/X11/include'
|
165
|
+
else
|
166
|
+
report_fatal("Installing ruby 1.8 (or ree 1.8) on Mac OS X requires that XQuartz be installed on the machine first, please go to http://xquartz.macosforge.org/landing/, install XQuartz and try again")
|
158
167
|
end
|
159
168
|
end
|
160
169
|
Command.execute('rbenv', 'install', ruby, :abort_on_failure => 'Failed to install ruby', :env => env)
|
@@ -198,6 +207,12 @@ module RightConf
|
|
198
207
|
# === Return
|
199
208
|
# true:: Always return true
|
200
209
|
def install_ruby_prerequisites_darwin(ruby)
|
210
|
+
if ruby =~ /1\.8/
|
211
|
+
report_check("Detected ruby 1.8 install, making sure gcc 4.2 is available")
|
212
|
+
PackageInstaller.install('https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb', :abort_on_failure => "Could not install gcc 4.2")
|
213
|
+
report_success
|
214
|
+
end
|
215
|
+
|
201
216
|
true
|
202
217
|
end
|
203
218
|
|
@@ -32,8 +32,10 @@ module RightConf
|
|
32
32
|
# === Return
|
33
33
|
# true:: Always return true
|
34
34
|
def self.report_to_stdout
|
35
|
+
reporter = StdoutReporter.new
|
36
|
+
reporter.report("rconf v#{RightConf::VERSION} (c)2011-2013 RightScale")
|
35
37
|
@@reporters ||= []
|
36
|
-
@@reporters <<
|
38
|
+
@@reporters << reporter
|
37
39
|
true
|
38
40
|
end
|
39
41
|
|
data/lib/rconf/version.rb
CHANGED