ext/libyajl2/extconf.rb in libyajl2-0.1.6 vs ext/libyajl2/extconf.rb in libyajl2-0.1.7
- old
+ new
@@ -48,9 +48,15 @@
def self.makemakefiles
setup_env
dir_config("libyajl")
create_makefile("libyajl")
+
+ # ruby on windows helpfully drops a *.def file to export Init_libyajl which we don't need because this isn't really a ruby extension
+ FileUtils.rm_f("*.def")
+ # and we need to surgically remove it from the LDFLAGS
+ $LDFLAGS.gsub!(/\S+.def/, ' ')
+
# we cheat and build it right away...
system("make V=1")
# ...so we can hack up what install does later and copy over the include files
File.open("Makefile", "w+") do |f|