summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-bb
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ruby18-base/patches/patch-bb')
-rw-r--r--lang/ruby18-base/patches/patch-bb41
1 files changed, 41 insertions, 0 deletions
diff --git a/lang/ruby18-base/patches/patch-bb b/lang/ruby18-base/patches/patch-bb
new file mode 100644
index 00000000000..3f7805ebb6a
--- /dev/null
+++ b/lang/ruby18-base/patches/patch-bb
@@ -0,0 +1,41 @@
+$NetBSD: patch-bb,v 1.1 2005/11/02 08:56:40 taca Exp $
+
+--- ext/extmk.rb.orig 2005-08-05 00:20:10.000000000 +0900
++++ ext/extmk.rb
+@@ -350,12 +350,30 @@ end unless $extstatic
+
+ ext_prefix = "#{$top_srcdir}/ext"
+ exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
+-exts |= $extension if $extension
+-exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
+- d = File.dirname(d)
+- d.slice!(0, ext_prefix.length + 1)
+- d
+-}.sort unless $extension
++if $extension
++ exts |= $extension.select {|d| File.directory?("#{ext_prefix}/#{d}")}
++else
++ withes, withouts = %w[--with --without].collect {|w|
++ if not (w = %w[-extensions -ext].collect {|opt|arg_config(w+opt)}).any?
++ proc {false}
++ elsif (w = w.grep(String)).empty?
++ proc {true}
++ else
++ w.collect {|opt| opt.split(/,/)}.flatten.method(:any?)
++ end
++ }
++ cond = proc {|ext|
++ cond1 = proc {|n| File.fnmatch(n, ext, File::FNM_PATHNAME)}
++ withes.call(&cond1) or !withouts.call(&cond1)
++ }
++ exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
++ d = File.dirname(d)
++ d.slice!(0, ext_prefix.length + 1)
++ d
++ }.find_all {|ext|
++ with_config(ext, &cond)
++ }.sort
++end
+
+ if $extout
+ Config.expand(extout = "#$extout", Config::CONFIG.merge("topdir"=>$topdir))