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

ruby-changes:30471

From: usa <ko1@a...>
Date: Wed, 14 Aug 2013 09:59:21 +0900 (JST)
Subject: [ruby-changes:30471] usa:r42550 (ruby_1_9_3): merge revision(s) 36948, 41777, 41779 [Backport #8593]

usa	2013-08-14 09:59:08 +0900 (Wed, 14 Aug 2013)

  New Revision: 42550

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

  Log:
    merge revision(s) 36948,41777,41779 [Backport #8593]
    
    * lib/mkmf.rb (have_framework): insert a space between options.
      add just one -ObjC option.
    
    * lib/mkmf.rb (have_framework): allow header file to check.
      [ruby-core:55745] [Bug #8593]

  Modified files:
    branches/ruby_1_9_3/ChangeLog
    branches/ruby_1_9_3/lib/mkmf.rb
    branches/ruby_1_9_3/version.h
Index: ruby_1_9_3/ChangeLog
===================================================================
--- ruby_1_9_3/ChangeLog	(revision 42549)
+++ ruby_1_9_3/ChangeLog	(revision 42550)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/ChangeLog#L1
+Wed Aug 14 09:56:55 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/mkmf.rb (have_framework): allow header file to check.
+	  [ruby-core:55745] [Bug #8593]
+
 Fri Aug  9 16:29:22 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/mkmf.rb (xsystem): expand environment variable in all macros not
Index: ruby_1_9_3/lib/mkmf.rb
===================================================================
--- ruby_1_9_3/lib/mkmf.rb	(revision 42549)
+++ ruby_1_9_3/lib/mkmf.rb	(revision 42550)
@@ -938,18 +938,31 @@ def have_header(header, preheaders = nil https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/lib/mkmf.rb#L938
 end
 
 # Returns whether or not the given +framework+ can be found on your system.
-# If found, a macro is passed as a preprocessor constant to the compiler using
-# the framework name, in uppercase, prepended with 'HAVE_FRAMEWORK_'.
+# If found, a macro is passed as a preprocessor constant to the compiler
+# using the framework name, in uppercase, prepended with +HAVE_FRAMEWORK_+.
 #
-# For example, if have_framework('Ruby') returned true, then the HAVE_FRAMEWORK_RUBY
-# preprocessor macro would be passed to the compiler.
+# For example, if <code>have_framework('Ruby')</code> returned true, then
+# the +HAVE_FRAMEWORK_RUBY+ preprocessor macro would be passed to the
+# compiler.
 #
+# If +fw+ is a pair of the framework name and its header file name
+# that header file is checked, instead of the normally used header
+# file which is named same as the framework.
 def have_framework(fw, &b)
+  if Array === fw
+    fw, header = *fw
+  else
+    header = "#{fw}.h"
+  end
   checking_for fw do
-    src = cpp_include("#{fw}/#{fw}.h") << "\n" "int main(void){return 0;}"
-    if try_link(src, opt = "-framework #{fw}", &b)
+    src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}"
+    opt = " -framework #{fw}"
+    if try_link(src, "-ObjC#{opt}", &b)
       $defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp))
-      $LDFLAGS << " " << opt
+      # TODO: non-worse way than this hack, to get rid of separating
+      # option and its argument.
+      $LDFLAGS << " -ObjC" unless /(\A|\s)-ObjC(\s|\z)/ =~ $LDFLAGS
+      $LDFLAGS << opt
       true
     else
       false
Index: ruby_1_9_3/version.h
===================================================================
--- ruby_1_9_3/version.h	(revision 42549)
+++ ruby_1_9_3/version.h	(revision 42550)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_1_9_3/version.h#L1
 #define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 464
+#define RUBY_PATCHLEVEL 465
 
-#define RUBY_RELEASE_DATE "2013-08-09"
+#define RUBY_RELEASE_DATE "2013-08-14"
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 9
+#define RUBY_RELEASE_DAY 14
 
 #include "ruby/version.h"
 

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

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