]> git.pld-linux.org Git - packages/ruby-ffi-yajl.git/commitdiff
ffi_yajl/ext: use hardcoded libyajl.so name
authorElan Ruusamäe <glen@delfi.ee>
Thu, 22 Jan 2015 11:57:29 +0000 (13:57 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 22 Jan 2015 11:57:29 +0000 (13:57 +0200)
system-yajl.patch

index 4669d03109eb7ab99968174c493cf57ed34464df..1f441ed475da06386fe78bff81ce487c96fba8d0 100644 (file)
  
    class YajlCallbacks < ::FFI::Struct
      layout :yajl_null, :pointer,
+--- ruby-ffi-yajl-1.3.1/lib/ffi_yajl/ext.rb    2015-01-22 13:55:11.513182150 +0200
++++ ruby-ffi-yajl-1.3.1/lib/ffi_yajl/ext.rb    2015-01-22 13:55:53.882526948 +0200
+@@ -3,18 +3,9 @@
+ require 'ffi_yajl/encoder'
+ require 'ffi_yajl/parser'
+ require 'ffi'
+-require 'libyajl2'
+ module FFI_Yajl
+-  # FIXME: DRY with ffi_yajl/ffi.rb
+-  # FIXME: extract map_library_name from FFI and stop requiring it at the top level
+-  #        so that the C-library can be installed without FFI
+-  libname = ::FFI.map_library_name("yajl")
+-  # awful windows patch, but there is an open issue to entirely replace FFI.map_library_name already
+-  libname = "libyajl.so" if libname == "yajl.dll"
+-  libpath = File.expand_path(File.join(Libyajl2.opt_path, libname))
+-  libpath.gsub!(/dylib/, 'bundle')
+-  libpath = ::FFI.map_library_name("yajl") unless File.exist?(libpath)
++  libpath = 'libyajl.so.2'
+   #
+   # FFS, what exactly was so wrong with DL.dlopen that ruby had to get rid of it???
 --- ffi-yajl-1.2.0/ext/ffi_yajl/ext/encoder/extconf.rb~        2014-11-12 23:19:03.000000000 +0200
 +++ ffi-yajl-1.2.0/ext/ffi_yajl/ext/encoder/extconf.rb 2014-11-12 23:20:13.882893756 +0200
 @@ -1,13 +1,8 @@
This page took 0.082679 seconds and 4 git commands to generate.