<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -59,11 +59,37 @@ else
 
         Dir.chdir(&quot;ruby-1.8.6-p286&quot;) do
 
-          puts &quot;** Patch&quot;
+          puts &quot;** Patch Ruby&quot;
           execute(&quot;patch -p0 &lt; '#{source_dir}/ruby.patch'&quot;)
 
           puts &quot;** Configure&quot;
-          execute(&quot;./configure #{Config::CONFIG['configure_args']}&quot;)
+          execute(&quot;./configure #{Config::CONFIG['configure_args']}&quot;.sub(&quot;'--enable-shared'&quot;, &quot;&quot;))
+
+          puts &quot;Patch Makefile&quot;
+          # FIXME Why is this necessary?
+          makefile = File.read('Makefile')
+          %w{arch sitearch sitedir}.each do | key |
+            makefile.gsub!(/#{key} = .*/, &quot;#{key} = #{Config::CONFIG[key]}&quot;)
+          end
+          File.open('Makefile', 'w'){|f| f.puts(makefile)}
+
+          puts &quot;Patch config.h&quot;
+          constants = {
+            'RUBY_LIB' =&gt; 'rubylibdir',
+            'RUBY_SITE_LIB' =&gt; 'sitedir',
+            'RUBY_SITE_LIB2' =&gt; 'sitelibdir',
+            'RUBY_PLATFORM' =&gt; 'arch',
+            'RUBY_ARCHLIB' =&gt; 'topdir',
+            'RUBY_SITE_ARCHLIB' =&gt; 'sitearchdir'
+          }
+          config_h = File.read('config.h')
+          constants.each do | const, key |
+            config_h.gsub!(/#define #{const} .*/, &quot;#define #{const} \&quot;#{Config::CONFIG[key]}\&quot;&quot;)
+          end
+
+          File.open('config.h', 'w') do |f| 
+            f.puts(config_h)
+          end
           
           env = Config::CONFIG.map do |key, value|
             &quot;#{key}=#{value.inspect}&quot; if key.upcase == key and value</diff>
      <filename>ext/build_ruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 
-unless RUBY_PATCHLEVEL &gt; 900
+unless RUBY_PATCHLEVEL &gt;= 903
   raise &quot;This build of Ruby has not been successfully patched for BleakHouse.&quot;
 end
 </diff>
      <filename>lib/bleak_house.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7f735f0a2dc8df327d079ad95e38421ef3ea8466</id>
    </parent>
  </parents>
  <author>
    <name>Evan Weaver</name>
    <email>eweaver@twitter.com</email>
  </author>
  <url>http://github.com/fauna/bleak_house/commit/d95e53fef7e13a314dc7a758a03dc1da04f31873</url>
  <id>d95e53fef7e13a314dc7a758a03dc1da04f31873</id>
  <committed-date>2009-02-20T19:19:06-08:00</committed-date>
  <authored-date>2009-02-20T19:19:06-08:00</authored-date>
  <message>Fix up.</message>
  <tree>37a784c9ebb1ac70b997300986a2831409f4c7e1</tree>
  <committer>
    <name>Evan Weaver</name>
    <email>eweaver@twitter.com</email>
  </committer>
</commit>
