[cairo-commit] rcairo/packages/cairo/ext extconf.rb,1.7,1.8

Kouhei Sutou commit at pdx.freedesktop.org
Wed Oct 5 08:52:24 PDT 2005


Committed by: kou

Update of /cvs/cairo/rcairo/packages/cairo/ext
In directory gabe:/tmp/cvs-serv13762/packages/cairo/ext

Modified Files:
	extconf.rb 
Log Message:
* packages/cairo/ext/extconf.rb: Fixed Win32 platform problem.
  Patch from Masao Mutoh <mutoh at highway.ne.jp>. Thanks!


Index: extconf.rb
===================================================================
RCS file: /cvs/cairo/rcairo/packages/cairo/ext/extconf.rb,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- extconf.rb	4 Oct 2005 03:08:41 -0000	1.7
+++ extconf.rb	5 Oct 2005 15:52:21 -0000	1.8
@@ -20,7 +20,8 @@
 def check_win32()
   STDOUT.print("checking for Win32 OS... ")
   STDOUT.flush
-  if /mingw/ =~ RUBY_PLATFORM
+  if /cygwin|mingw|mswin32/ =~ RUBY_PLATFORM
+    $defs << "-DRUBY_CAIRO_PLATFORM_WIN32"
     STDOUT.print "yes\n"
     if $cc_is_gcc
       if /^2\./ =~ `#{Config::CONFIG['CC']} -dumpversion`.chomp
@@ -35,18 +36,22 @@
 end
 
 def set_output_lib(target_name)
-  filename = "libruby-#{target_name}.a"
   if /cygwin|mingw/ =~ RUBY_PLATFORM
-    $defs << "-DRUBY_CAIRO_PLATFORM_WIN32"
+    filename = "libruby-#{target_name}.a"
     if RUBY_VERSION > "1.8.0"
       $DLDFLAGS << ",--out-implib=#{filename}" if filename
     elsif RUBY_VERSION > "1.8"
-      CONFIG["DLDFLAGS"].gsub!(/ -Wl,--out-implib=[^ ]+/, '')
-      CONFIG["DLDFLAGS"] << " -Wl,--out-implib=#{filename}" if filename
+      $DLDFLAGS.gsub!(/ -Wl,--out-implib=[^ ]+/, '')
+      $DLDFLAGS << " -Wl,--out-implib=#{filename}" if filename
     else
-      CONFIG["DLDFLAGS"].gsub!(/ --output-lib\s+[^ ]+/, '')
-      CONFIG["DLDFLAGS"] << " --output-lib #{filename}" if filename
+      $DLDFLAGS.gsub!(/ --output-lib\s+[^ ]+/, '')
+      $DLDFLAGS << " --output-lib #{filename}" if filename
     end
+  elsif /mswin32/ =~ RUBY_PLATFORM
+      filename = "libruby-#{target_name}.lib"
+      $DLDFLAGS.gsub!(/ --output-lib\s+[^ ]+/, '')
+      $DLDFLAGS.gsub!(/ \/IMPLIB:[^ ]+/, '')
+      $DLDFLAGS << " /IMPLIB:#{filename}" if filename    
   end
 end
 



More information about the cairo-commit mailing list