This commit is contained in:
Arthur Neves 2016-02-08 10:50:51 -05:00
Родитель 26531ee7de
Коммит a00fa5c2da
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -16,12 +16,12 @@ end
task :default => [:compile, :test] task :default => [:compile, :test]
task :swig do task :swig do
run("swig -DLIBMEMCACHED_WITH_SASL_SUPPORT -Iext/libmemcached-0.32 -ruby -autorename -o ext/rlibmemcached_wrap.c.in ext/rlibmemcached.i", "Running SWIG") run("swig -DLIBMEMCACHED_WITH_SASL_SUPPORT -Iext/rlibmemcached/libmemcached-0.32 -ruby -autorename -o ext/rlibmemcached/rlibmemcached_wrap.c.in ext/rlibmemcached/rlibmemcached.i", "Running SWIG")
swig_patches = { swig_patches = {
"#ifndef RUBY_INIT_STACK" => "#ifdef __NEVER__" # Patching SWIG output for JRuby. "#ifndef RUBY_INIT_STACK" => "#ifdef __NEVER__" # Patching SWIG output for JRuby.
}.map{|pair| "s/#{pair.join('/')}/"}.join(';') }.map{|pair| "s/#{pair.join('/')}/"}.join(';')
# sed has different syntax for inplace switch in BSD and GNU version, so using intermediate file # sed has different syntax for inplace switch in BSD and GNU version, so using intermediate file
run("sed '#{swig_patches}' ext/rlibmemcached_wrap.c.in > ext/rlibmemcached_wrap.c", "Apply patches to SWIG output") run("sed '#{swig_patches}' ext/rlibmemcached/rlibmemcached_wrap.c.in > ext/rlibmemcached/rlibmemcached_wrap.c", "Apply patches to SWIG output")
end end
task :exceptions do task :exceptions do