blob: 2901e2e9ea7e718b26d175961bc8be86b303f9ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Upstream patch to allow the ruby extension to compile when multiple versions of boost are installed
Index: project/swig/ruby/extconf.rb
===================================================================
--- project/swig/ruby/extconf.rb (revision 1547)
+++ project/swig/ruby/extconf.rb (revision 1549)
@@ -60,6 +60,11 @@
create_makefile('librets_native')
orig_makefile = IO::read("Makefile")
+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")
+end
File.open("Makefile", "w") do |mfile|
mfile << makefile_prefix
mfile << orig_makefile
|