[csw-devel] SF.net SVN: gar:[13543] csw/mgar/pkg/ruby18/trunk

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Thu Mar 3 02:17:18 CET 2011


Revision: 13543
          http://gar.svn.sourceforge.net/gar/?rev=13543&view=rev
Author:   bdwalton
Date:     2011-03-03 01:17:18 +0000 (Thu, 03 Mar 2011)

Log Message:
-----------
ruby18/trunk: correct another usr/local reference in mkmf.rb

Modified Paths:
--------------
    csw/mgar/pkg/ruby18/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/ruby18/trunk/files/0005-Correct-a-usr-local-reference-in-mkmf.rb.patch

Modified: csw/mgar/pkg/ruby18/trunk/Makefile
===================================================================
--- csw/mgar/pkg/ruby18/trunk/Makefile	2011-03-02 22:42:22 UTC (rev 13542)
+++ csw/mgar/pkg/ruby18/trunk/Makefile	2011-03-03 01:17:18 UTC (rev 13543)
@@ -89,6 +89,7 @@
 PATCHFILES += 0002-Correct-potential-segfault-caused-during-garbage-col.patch
 PATCHFILES += 0003-Force-ld-to-embed-the-proper-SONAME-for-libruby.patch
 PATCHFILES += 0004-Patch-a-few-more-usr-local-references.patch
+PATCHFILES += 0005-Correct-a-usr-local-reference-in-mkmf.rb.patch
 
 CONFIGURE_ARGS  = $(DIRPATHS)
 CONFIGURE_ARGS += --enable-pthread

Added: csw/mgar/pkg/ruby18/trunk/files/0005-Correct-a-usr-local-reference-in-mkmf.rb.patch
===================================================================
--- csw/mgar/pkg/ruby18/trunk/files/0005-Correct-a-usr-local-reference-in-mkmf.rb.patch	                        (rev 0)
+++ csw/mgar/pkg/ruby18/trunk/files/0005-Correct-a-usr-local-reference-in-mkmf.rb.patch	2011-03-03 01:17:18 UTC (rev 13543)
@@ -0,0 +1,297 @@
+From fc861227d558b35ca1c8736e6dd431ce650f1379 Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at opencsw.org>
+Date: Thu, 3 Mar 2011 02:13:32 +0100
+Subject: [PATCH] Correct a usr/local reference in mkmf.rb
+
+The default path setting (only used when ENV["PATH"] isn't set)
+included usr/local.  Replace this with csw/gnu and csw/bin.
+
+Signed-off-by: Ben Walton <bwalton at opencsw.org>
+---
+ lib/mkmf.rb |  148 +++++++++++++++++++++++++++++-----------------------------
+ 1 files changed, 74 insertions(+), 74 deletions(-)
+
+diff --git a/lib/mkmf.rb b/lib/mkmf.rb
+index c9e738a..eb7fb82 100644
+--- a/lib/mkmf.rb
++++ b/lib/mkmf.rb
+@@ -231,7 +231,7 @@ module Logging
+       @log = nil
+     end
+   end
+-  
++
+   def self::postpone
+     tmplog = "mkmftmp#{@postpone += 1}.log"
+     open do
+@@ -326,13 +326,13 @@ end
+ def cc_command(opt="")
+   conf = Config::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)
+   Config::expand("$(CC) #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}",
+-		 conf)
++     conf)
+ end
+ 
+ def cpp_command(outfile, opt="")
+   conf = Config::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote)
+   Config::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}",
+-		 conf)
++     conf)
+ end
+ 
+ def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
+@@ -492,18 +492,18 @@ def egrep_cpp(pat, src, opt = "", &b)
+     if Regexp === pat
+       puts("    ruby -ne 'print if #{pat.inspect}'")
+       f.grep(pat) {|l|
+-	puts "#{f.lineno}: #{l}"
+-	return true
++  puts "#{f.lineno}: #{l}"
++  return true
+       }
+       false
+     else
+       puts("    egrep '#{pat}'")
+       begin
+-	stdin = $stdin.dup
+-	$stdin.reopen(f)
+-	system("egrep", pat)
++  stdin = $stdin.dup
++  $stdin.reopen(f)
++  system("egrep", pat)
+       ensure
+-	$stdin.reopen(stdin)
++  $stdin.reopen(stdin)
+       end
+     end
+   end
+@@ -683,11 +683,11 @@ def find_library(lib, func, *paths, &b)
+     libs = append_library($libs, lib)
+     begin
+       until r = try_func(func, libs, &b) or paths.empty?
+-	$LIBPATH = libpath | [paths.shift]
++  $LIBPATH = libpath | [paths.shift]
+       end
+       if r
+-	$libs = libs
+-	libpath = nil
++  $libs = libs
++  libpath = nil
+       end
+     ensure
+       $LIBPATH = libpath if libpath
+@@ -789,7 +789,7 @@ end
+ #
+ # For example, if have_struct_member('struct foo', 'bar') returned true, then the
+ # HAVE_ST_BAR preprocessor macro would be passed to the compiler.
+-# 
++#
+ def have_struct_member(type, member, headers = nil, &b)
+   checking_for checking_message("#{type}.#{member}", headers) do
+     if try_compile(<<"SRC", &b)
+@@ -997,7 +997,7 @@ def find_executable0(bin, path = nil)
+   if path ||= ENV['PATH']
+     path = path.split(File::PATH_SEPARATOR)
+   else
+-    path = %w[/usr/local/bin /usr/ucb /usr/bin /bin]
++    path = %w[/opt/csw/gnu /opt/csw/bin /usr/ucb /usr/bin /bin]
+   end
+   file = nil
+   path.each do |dir|
+@@ -1011,7 +1011,7 @@ end
+ 
+ # Searches for the executable +bin+ on +path+. The default path is your
+ # PATH environment variable. If that isn't defined, it will resort to
+-# searching /usr/local/bin, /usr/ucb, /usr/bin and /bin.
++# searching /opt/csw/gnu, /opt/csw/bin, /usr/ucb, /usr/bin and /bin.
+ #
+ # If found, it will return the full path, including the executable name,
+ # of where it was found.
+@@ -1097,7 +1097,7 @@ end
+ # 'extconf.h'.
+ #
+ # For example:
+-# 
++#
+ #    # extconf.rb
+ #    require 'mkmf'
+ #    have_func('realpath')
+@@ -1192,7 +1192,7 @@ def pkg_config(pkg)
+   if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
+     # iff package specific config command is given
+     get = proc {|opt| `#{pkgconfig} --#{opt}`.chomp}
+-  elsif ($PKGCONFIG ||= 
++  elsif ($PKGCONFIG ||=
+          (pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) &&
+          find_executable0(pkgconfig) && pkgconfig) and
+       system("#{$PKGCONFIG} --exists #{pkg}")
+@@ -1349,7 +1349,7 @@ preload = #{$preload ? $preload.join(' ') : ''}
+       x.gsub!(/^(MAKEDIRS|INSTALL_(?:PROG|DATA))+\s*=.*\n/) do
+         "!ifndef " + $1 + "\n" +
+         $& +
+-	"!endif\n"
++  "!endif\n"
+       end
+     end
+   end
+@@ -1510,8 +1510,8 @@ TARGET_SO     = #{($extout ? '$(RUBYARCHDIR)/' : '')}$(DLLIB)
+ CLEANLIBS     = #{n}#{CONFIG['DLEXT']} #{n}il? #{n}tds #{n}map
+ CLEANOBJS     = *.#{$OBJEXT} *.#{$LIBEXT} *.s[ol] *.pdb *.exp *.bak
+ 
+-all:		#{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
+-static:		$(STATIC_LIB)#{$extout ? " install-rb" : ""}
++all:    #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
++static:   $(STATIC_LIB)#{$extout ? " install-rb" : ""}
+ "
+   mfile.print CLEANINGS
+   dirs = []
+@@ -1535,7 +1535,7 @@ static:		$(STATIC_LIB)#{$extout ? " install-rb" : ""}
+       end
+       mfile.print "\t$(INSTALL_PROG) #{f} #{dir}\n"
+       if defined?($installed_list)
+-	mfile.print "\t at echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n"
++  mfile.print "\t at echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n"
+       end
+     end
+   else
+@@ -1549,26 +1549,26 @@ static:		$(STATIC_LIB)#{$extout ? " install-rb" : ""}
+     files = install_files(mfile, i, nil, srcprefix) or next
+     for dir, *files in files
+       unless dirs.include?(dir)
+-	dirs << dir
+-	mfile.print "pre-install-rb#{sfx}: #{dir}\n"
++  dirs << dir
++  mfile.print "pre-install-rb#{sfx}: #{dir}\n"
+       end
+       files.each do |f|
+-	dest = "#{dir}/#{File.basename(f)}"
+-	mfile.print("install-rb#{sfx}: #{dest}\n")
+-	mfile.print("#{dest}: #{f} #{dir}\n\t$(#{$extout ? 'COPY' : 'INSTALL_DATA'}) ")
+-	sep = config_string('BUILD_FILE_SEPARATOR')
+-	if sep
+-	  f = f.gsub("/", sep)
+-	  sep = ":/="+sep
+-	  f = f.gsub(/(\$\(\w+)(\))/) {$1+sep+$2}
+-	  f = f.gsub(/(\$\{\w+)(\})/) {$1+sep+$2}
+-	else
+-	  sep = ""
+-	end
+-	mfile.print("#{f} $(@D#{sep})\n")
+-	if defined?($installed_list) and !$extout
+-	  mfile.print("\t at echo #{dest}>>$(INSTALLED_LIST)\n")
+-	end
++  dest = "#{dir}/#{File.basename(f)}"
++  mfile.print("install-rb#{sfx}: #{dest}\n")
++  mfile.print("#{dest}: #{f} #{dir}\n\t$(#{$extout ? 'COPY' : 'INSTALL_DATA'}) ")
++  sep = config_string('BUILD_FILE_SEPARATOR')
++  if sep
++    f = f.gsub("/", sep)
++    sep = ":/="+sep
++    f = f.gsub(/(\$\(\w+)(\))/) {$1+sep+$2}
++    f = f.gsub(/(\$\{\w+)(\})/) {$1+sep+$2}
++  else
++    sep = ""
++  end
++  mfile.print("#{f} $(@D#{sep})\n")
++  if defined?($installed_list) and !$extout
++    mfile.print("\t at echo #{dest}>>$(INSTALLED_LIST)\n")
++  end
+       end
+     end
+   end
+@@ -1631,43 +1631,43 @@ site-install-rb: install-rb
+       mfile.printf "###\n"
+       cont = implicit = nil
+       impconv = proc do
+-	COMPILE_RULES.each {|rule| depout << (rule % implicit[0]) << implicit[1]}
+-	implicit = nil
++  COMPILE_RULES.each {|rule| depout << (rule % implicit[0]) << implicit[1]}
++  implicit = nil
+       end
+       ruleconv = proc do |line|
+-	if implicit
+-	  if /\A\t/ =~ line
+-	    implicit[1] << line
+-	    next
+-	  else
+-	    impconv[]
+-	  end
+-	end
+-	if m = /\A\.(\w+)\.(\w+)(?:\s*:)/.match(line)
+-	  suffixes << m[1] << m[2]
+-	  implicit = [[m[1], m[2]], [m.post_match]]
+-	  next
+-	elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
+-	  line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
+-	end
+-	depout << line
++  if implicit
++    if /\A\t/ =~ line
++      implicit[1] << line
++      next
++    else
++      impconv[]
++    end
++  end
++  if m = /\A\.(\w+)\.(\w+)(?:\s*:)/.match(line)
++    suffixes << m[1] << m[2]
++    implicit = [[m[1], m[2]], [m.post_match]]
++    next
++  elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
++    line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
++  end
++  depout << line
+       end
+       while line = dfile.gets()
+-	line.gsub!(/\.o\b/, ".#{$OBJEXT}")
+-	line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h) if $config_h
+-	if /(?:^|[^\\])(?:\\\\)*\\$/ =~ line
+-	  (cont ||= []) << line
+-	  next
+-	elsif cont
+-	  line = (cont << line).join
+-	  cont = nil
+-	end
+-	ruleconv.call(line)
++  line.gsub!(/\.o\b/, ".#{$OBJEXT}")
++  line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h) if $config_h
++  if /(?:^|[^\\])(?:\\\\)*\\$/ =~ line
++    (cont ||= []) << line
++    next
++  elsif cont
++    line = (cont << line).join
++    cont = nil
++  end
++  ruleconv.call(line)
+       end
+       if cont
+-	ruleconv.call(cont.join)
++  ruleconv.call(cont.join)
+       elsif implicit
+-	impconv.call
++  impconv.call
+       end
+     end
+     unless suffixes.empty?
+@@ -1822,13 +1822,13 @@ LIBARG = config_string('LIBARG') || '-l%s'
+ sep = config_string('BUILD_FILE_SEPARATOR') {|sep| ":/=#{sep}" if sep != "/"} || ""
+ CLEANINGS = "
+ clean:
+-		@-$(RM) $(CLEANLIBS#{sep}) $(CLEANOBJS#{sep}) $(CLEANFILES#{sep})
++    @-$(RM) $(CLEANLIBS#{sep}) $(CLEANOBJS#{sep}) $(CLEANFILES#{sep})
+ 
+-distclean:	clean
+-		@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
+-		@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})
++distclean:  clean
++    @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
++    @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})
+ 
+-realclean:	distclean
++realclean:  distclean
+ "
+ 
+ if not $extmk and /\A(extconf|makefile).rb\z/ =~ File.basename($0)
+-- 
+1.7.3.2
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list