diff options
Diffstat (limited to 'dev-ruby/ffi/files/ffi-0.6.2-genRakefile.patch')
-rw-r--r-- | dev-ruby/ffi/files/ffi-0.6.2-genRakefile.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-ruby/ffi/files/ffi-0.6.2-genRakefile.patch b/dev-ruby/ffi/files/ffi-0.6.2-genRakefile.patch new file mode 100644 index 000000000000..f18eea51aba0 --- /dev/null +++ b/dev-ruby/ffi/files/ffi-0.6.2-genRakefile.patch @@ -0,0 +1,29 @@ +From 1d2ac1eae074af39b447a5bd7fe8a668e60517fd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> +Date: Tue, 16 Feb 2010 11:48:22 +0100 +Subject: [PATCH 1/2] Use the __FILE__ value to find the proper path for the ffi code. + +This replace the old code that relied on the RUBYLIBDIR environment +variable and the position of the current work directory. +--- + gen/Rakefile | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gen/Rakefile b/gen/Rakefile +index f97f845..2f5bdb9 100644 +--- a/gen/Rakefile ++++ b/gen/Rakefile +@@ -1,6 +1,8 @@ + require 'fileutils' +-require "#{File.join(ENV['RUBYLIBDIR'], 'ffi', 'tools', 'types_generator.rb')}" +-types_conf = File.join(ENV['RUBYLIBDIR'], 'ffi', 'types.conf') ++require 'pathname' ++require Pathname.new(__FILE__).dirname + "../lib/ffi/tools/types_generator.rb" ++types_conf = (Pathname.new(__FILE__).dirname + "../lib/ffi/types.conf").to_s ++ + file types_conf do |task| + options = {} + FileUtils.mkdir_p(File.dirname(task.name), { :mode => 0755 }) +-- +1.7.0 + |