void-packages/srcpkgs/ruby/patches/fiddle-libffi-version.patch

15 lines
531 B
Diff

Patch for ruby 2.1.2, upstream for next 2.1.x.
--- ext/fiddle/extconf.rb 2014/06/20 22:48:41 46484
+++ ext/fiddle/extconf.rb 2014/06/21 03:54:19 46485
@@ -7,7 +7,8 @@
pkg_config("libffi")
if ver = pkg_config("libffi", "modversion")
ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
- $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver.split('.') }})
+ ver = (ver.split('.') + [0,0])[0,3]
+ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }})
end
unless have_header('ffi.h')