[MacPorts] #44508: ruby21: fix compilation with libffi (*3.1!) so that module fiddle works
MacPorts
noreply at macports.org
Thu Jul 31 08:44:28 PDT 2014
#44508: ruby21: fix compilation with libffi (*3.1!) so that module fiddle works
--------------------------+--------------------------------
Reporter: jfs.world@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.1
Resolution: | Keywords:
Port: |
--------------------------+--------------------------------
Comment (by jfs.world@…):
Ok sorry, the patch should be this instead (ext/fiddle/closure.c relies on
RUBY_LIBFFI_MODVERSION being generated off of a 3-digit 'ver')!
{{{
--- ext/fiddle/extconf.rb.orig 2013-05-19 10:42:16.000000000 +0800
+++ ext/fiddle/extconf.rb 2014-07-31 23:39:34.000000000 +0800
@@ -7,7 +7,9 @@
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_split = ver.split('.')
+ ver_split.push '0' if ver_split.length == 2
+ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver_split }})
end
unless have_header('ffi.h')
}}}
--
Ticket URL: <https://trac.macports.org/ticket/44508#comment:1>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list