[前][次][番号順一覧][スレッド一覧]

ruby-changes:23680

From: nobu <ko1@a...>
Date: Mon, 21 May 2012 00:58:16 +0900 (JST)
Subject: [ruby-changes:23680] nobu:r35731 (trunk): ext/extmk.rb: workaround for -framework option

nobu	2012-05-21 00:58:03 +0900 (Mon, 21 May 2012)

  New Revision: 35731

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35731

  Log:
    ext/extmk.rb: workaround for -framework option
    
    * ext/extmk.rb (extmake): assume non-option words are arguments.
      workaround for -framework option.

  Modified files:
    trunk/ext/extmk.rb
    trunk/ext/tk/extconf.rb
    trunk/lib/mkmf.rb

Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 35730)
+++ lib/mkmf.rb	(revision 35731)
@@ -1010,7 +1010,7 @@
   def have_framework(fw, &b)
     checking_for fw do
       src = cpp_include("#{fw}/#{fw}.h") << "\n" "int main(void){return 0;}"
-      if try_link(src, opt = "-ObjC -framework=#{fw}", &b)
+      if try_link(src, opt = "-ObjC -framework #{fw}", &b)
         $defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp))
         $LDFLAGS << " " << opt
         true
Index: ext/tk/extconf.rb
===================================================================
--- ext/tk/extconf.rb	(revision 35730)
+++ ext/tk/extconf.rb	(revision 35731)
@@ -1463,7 +1463,7 @@
 def setup_for_macosx_framework(tclver, tkver)
   # use framework, but no tclConfig.sh
   unless $LDFLAGS && $LDFLAGS.include?('-framework')
-    ($LDFLAGS ||= "") << ' -framework=Tk -framework=Tcl'
+    ($LDFLAGS ||= "") << ' -framework Tk -framework Tcl'
   end
 
   if TkLib_Config["tcl-framework-header"]
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 35730)
+++ ext/extmk.rb	(revision 35731)
@@ -260,7 +260,7 @@
       unless $mswin
         $extflags = ($extflags.split | $DLDFLAGS.split | $LDFLAGS.split).join(" ")
       end
-      $extlibs = merge_libs($extlibs, $libs.split, $LOCAL_LIBS.split)
+      $extlibs = merge_libs($extlibs, $libs.split(/\s+(?=-|\z)/), $LOCAL_LIBS.split(/\s+(?=-|\z)/))
       $extpath |= $LIBPATH
     end
   ensure

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]