blob: dbafc6220dd986c9065abe60768275b014697e5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
commit 98dfabee1c528dd22d82d47f7c3397fb7096b91d
Author: Matthew Schultz <mattsch@gmail.com>
Date: Tue May 27 10:03:34 2014 -0500
Fixed compilation with ruby 2.0 by properly including the CFLAGS in CXXFLAGS.
diff --git a/project/swig/ruby/extconf.rb b/project/swig/ruby/extconf.rb
index 494caa9..68e2920 100644
--- a/project/swig/ruby/extconf.rb
+++ b/project/swig/ruby/extconf.rb
@@ -64,6 +64,8 @@ if RUBY_PLATFORM =~ /linux/
# Make sure the proper version boost libraries are detected first by changing ruby's create_makefile library declaration order
orig_makefile.gsub!(/LIBS = \$\(LIBRUBYARG_SHARED\)(.+)/, "LIBS = \\1 \$\(LIBRUBYARG_SHARED\)");
orig_makefile.gsub!(/(-o \$@ \$\(OBJS\))( \$\(LIBPATH\) \$\(DLDFLAGS\) \$\(LOCAL_LIBS\))( \$\(LIBS\))/, "\\1\\3\\2")
+ # Ruby 2.0 improperly generates CXXFLAGS without including CFLAGS which causes compilation to fail due to missing librets.h
+ orig_makefile.gsub!(/CXXFLAGS = \$\(CCDLFLAGS\)/, "CXXFLAGS = \$\(CFLAGS\)");
end
File.open("Makefile", "w") do |mfile|
mfile << makefile_prefix
|