<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 
-v4.2. Harden patch/build process. Fix bug.
+v4.2.1. Harden patch/build process. Fix bug.
 
 v4.1.1. Update bundled Ruby to patchlevel 230.
 </diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,6 @@ else
   # Build
   Dir.chdir(tmp) do
     build_dir = &quot;bleak_house&quot;
-    binary_dir = File.dirname(`which ruby`)
 
     FileUtils.rm_rf(build_dir) rescue nil
     if File.exist? build_dir
@@ -60,17 +59,18 @@ else
         Dir.chdir(&quot;ruby-1.8.6-p286&quot;) do
 
           puts &quot;Patch, configure, and build&quot;
-          execute(&quot;patch -p0 &lt; \'#{source_dir}/ruby.patch\'&quot;)
+          execute(&quot;patch -p0 &lt; '#{source_dir}/ruby.patch'&quot;)
 
-          execute(&quot;./configure --prefix=#{binary_dir[0..-5]}&quot;) # --with-static-linked-ext
+          execute(&quot;./configure #{Config::CONFIG['configure_args']}&quot;)
 
           puts &quot;Patch the makefile for arch/sitedir&quot;
           makefile = File.read('Makefile')
-          %w{arch sitearch sitedir}.each do | key |
+          %w{arch sitearch sitedir CFLAGS CPPFLAGS ARCH_FLAG}.each do | key |
             makefile.gsub!(/#{key} = .*/, &quot;#{key} = #{Config::CONFIG[key]}&quot;)
           end
           File.open('Makefile', 'w'){|f| f.puts(makefile)}
 
+          # FIXME Is this necessary now with line 64?
           puts &quot;Patch the config.h for constants&quot;
           constants = {
             'RUBY_LIB' =&gt; 'rubylibdir',          #define RUBY_LIB &quot;/usr/lib/ruby/1.8&quot;
@@ -84,11 +84,14 @@ else
           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'){|f| f.puts(config_h)}
+
+          File.open('config.h', 'w') do |f| 
+            f.puts(config_h)
+          end
 
           execute(&quot;make&quot;)
 
-          binary = &quot;#{binary_dir}/ruby-bleak-house&quot;
+          binary = &quot;#{Config::CONFIG[&quot;bindir&quot;]}/ruby-bleak-house&quot;
 
           puts &quot;Install binary&quot;
           if File.exist? &quot;ruby&quot;</diff>
      <filename>ext/build_ruby.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e854c9d9620da9116ee06502ae8323ee2a7a2b02</id>
    </parent>
  </parents>
  <author>
    <name>Evan Weaver</name>
    <email>eweaver@twitter.com</email>
  </author>
  <url>http://github.com/fauna/bleak_house/commit/319a5a52a9577255627762fe5d9aa8a6e141887d</url>
  <id>319a5a52a9577255627762fe5d9aa8a6e141887d</id>
  <committed-date>2009-02-20T18:46:15-08:00</committed-date>
  <authored-date>2009-02-20T18:46:15-08:00</authored-date>
  <message>Use all the config and CFLAGS.</message>
  <tree>6d07a336a704149e464d6c9ee000640d357fcf70</tree>
  <committer>
    <name>Evan Weaver</name>
    <email>eweaver@twitter.com</email>
  </committer>
</commit>
