$OpenBSD: patch-lib_fileutils_rb,v 1.2 2013/05/17 20:11:43 jeremy Exp $

Make FileUtils.mkdir_p act more like mkdir(1) -p, by not attempting
to create directories that already exist.  This fixes systrace
warnings when building ports.

--- lib/fileutils.rb.orig	Thu Apr 11 10:00:49 2013
+++ lib/fileutils.rb	Tue May 14 08:45:49 2013
@@ -203,7 +203,7 @@ module FileUtils
     list.map {|path| path.chomp(?/) }.each do |path|
       # optimize for the most common case
       begin
-        fu_mkdir path, options[:mode]
+        fu_mkdir path, options[:mode] unless File.directory?(path)
         next
       rescue SystemCallError
         next if File.directory?(path)
@@ -216,7 +216,7 @@ module FileUtils
       end
       stack.reverse_each do |dir|
         begin
-          fu_mkdir dir, options[:mode]
+          fu_mkdir dir, options[:mode] unless File.directory?(dir)
         rescue SystemCallError
           raise unless File.directory?(dir)
         end
