pkgsrc/archivers/ruby-xz/patches/patch-lib_xz_lib__lzma.rb
taca 843052ff0b Update ruby-xz to 0.2.1.
0.2.1 (2014-02-08)

* Build the gem properly on Ruby 2.0+ (PR #8 by Nana Sakisaka (saki7))
* Release the GIL when interfacing with liblzma (PR #7 by Lars Christensen
* (larsch))

0.2.0 (2013-06-23)

* Fix #6 (errors on JRuby) by Ben Nagy
* Remove 1.8 compatibility
2015-03-01 12:58:16 +00:00

15 lines
613 B
Ruby

$NetBSD: patch-lib_xz_lib__lzma.rb,v 1.3 2015/03/01 12:58:17 taca Exp $
Use an absolute path for a library to load.
--- lib/xz/lib_lzma.rb.orig 2014-08-15 07:57:40.000000000 +0000
+++ lib/xz/lib_lzma.rb
@@ -71,7 +71,7 @@ module XZ
:lzma_buf_error,
:lzma_prog_error
- ffi_lib ['lzma.so.5', 'lzma.so', 'lzma']
+ ffi_lib ['liblzma.@SHLIB_EXT@.5', 'liblzma.@SHLIB_EXT@', 'liblzma'].map! { |f| File.join('@LOCALBASE@/lib', f) }
attach_function :lzma_easy_encoder, [:pointer, :uint32, :int], :int, :blocking => true
attach_function :lzma_code, [:pointer, :int], :int, :blocking => true