Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > c4ada2abb911051e9edce89195240ad9 > files > 2

ruby-game-2.1.0-5.1mdv2009.0.src.rpm

--- Rakefile.link	2007-11-20 01:57:04.000000000 +0100
+++ Rakefile	2009-02-01 17:30:10.000000000 +0100
@@ -175,13 +175,13 @@
           ("-g" if $options.debug) ].join(" ")
 
 LINK_FLAGS = [from_env_or_config("LIBRUBYARG_SHARED"),
-              from_env_or_config("LDFLAGS"),
-              try_sdl_config("--libs")].join(" ")
+              from_env_or_config("LDFLAGS")].join(" ")
+LIBS = [try_sdl_config("--libs")].join(" ")
 
 DEFALUT_EXTDIR = File.join('ext','rubygame','')
 
 class ExtensionModule
-  @@libflag = " -l%s " # compiler flag for giving linked libraries
+  @@libs = " -l%s " # compiler flag for giving linked libraries
   attr_accessor :dynlib, :objs, :libs, :cflags, :lflags, :directory
   def initialize(&block)
     @directory = DEFALUT_EXTDIR
@@ -193,7 +193,7 @@
   end
 
   def add_lib( lib )
-    @lflags << @@libflag%lib
+    @libs << @@libs%lib
   end
 
   def add_header( header )
@@ -229,7 +229,7 @@
 
     desc "Compile the #{@dynlib} extension"
     task taskname => objs_full do |task|
-      link_command = "#{from_env_or_config('LDSHARED')} #{LINK_FLAGS} #{@lflags} -o #{dynlib_full} #{task.prerequisites.join(' ')}"
+      link_command = "#{from_env_or_config('LDSHARED')} #{LINK_FLAGS} #{@lflags} -o #{dynlib_full} #{task.prerequisites.join(' ')} #{@libs}"
       if( $options.verbose )
         sh link_command
       else
@@ -296,6 +296,7 @@
 
 rubygame_core = ExtensionModule.new do |core|
   core.dynlib = 'rubygame_core'
+  core.add_lib( 'SDL' )
   core.objs = ['rubygame_main',
                'rubygame_shared',
                'rubygame_event',