[MacPorts] #44508: ruby21: fix compilation with libffi (*3.1!) so that module fiddle works
MacPorts
noreply at macports.org
Thu Jul 31 03:04:38 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
Keywords: | Port:
-------------------------+--------------------------------
To confirm:
{{{
ruby2.1 -e 'p require "fiddle"'
}}}
Correctly configured and compiled, the output should be
{{{
true
}}}
NOTE: this patch is only for libffi 3.1, and should be removed once libffi
goes to 3 numbers in its version. It is, of course best fixed upstream,
and I will deal with that and report back once it's solved there. Until
then, this patch will fix things.
{{{
--- ext/fiddle/extconf.rb.orig 2013-05-19 10:42:16.000000000 +0800
+++ ext/fiddle/extconf.rb 2014-07-31 16:26:56.000000000 +0800
@@ -7,7 +7,7 @@
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('.')
}})
+ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d' % ver.split('.') }})
end
unless have_header('ffi.h')
}}}
--
Ticket URL: <https://trac.macports.org/ticket/44508>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list