Diff
Modified: trunk/dports/lang/ruby21/Portfile (122862 => 122863)
--- trunk/dports/lang/ruby21/Portfile 2014-08-01 04:44:40 UTC (rev 122862)
+++ trunk/dports/lang/ruby21/Portfile 2014-08-01 11:33:02 UTC (rev 122863)
@@ -6,7 +6,7 @@
name ruby21
version 2.1.2
-revision 0
+revision 1
categories lang ruby
maintainers kimuraw openmaintainer
@@ -59,6 +59,11 @@
# Port "ruby" and "ruby19" does the same.
configure.env-append UNAME_RELEASE=${os.major}
+# patch-ext-fiddle-extconf.rb.diff: https://bugs.ruby-lang.org/issues/9897
+# patch-ext-dl-extconf.rb.diff: https://bugs.ruby-lang.org/issues/9656
+patchfiles patch-ext-dl-extconf.rb.diff \
+ patch-ext-fiddle-extconf.rb.diff
+
# Add the architecture flag as required
if {[info exists build_arch] && ${build_arch} != ""} {
configure.args-append "--with-arch=${build_arch}"
Added: trunk/dports/lang/ruby21/files/patch-ext-dl-extconf.rb.diff (0 => 122863)
--- trunk/dports/lang/ruby21/files/patch-ext-dl-extconf.rb.diff (rev 0)
+++ trunk/dports/lang/ruby21/files/patch-ext-dl-extconf.rb.diff 2014-08-01 11:33:02 UTC (rev 122863)
@@ -0,0 +1,18 @@
+Index: ext/dl/extconf.rb
+===================================================================
+--- ext/dl/extconf.rb (revision 46302)
++++ ext/dl/extconf.rb (revision 46303)
+@@ -1,7 +1,12 @@
+ require 'mkmf'
+
+ if RbConfig::CONFIG['GCC'] == 'yes'
+- (have_macro("__clang__") ? $LDFLAGS : $CFLAGS) << " -fno-defer-pop"
++ flag = " -fno-defer-pop"
++ if have_macro("__clang__")
++ $LDFLAGS << flag if try_ldflags(flag)
++ else
++ $CFLAGS << flag
++ end
+ $CFLAGS << " -fno-omit-frame-pointer"
+ end
+
Added: trunk/dports/lang/ruby21/files/patch-ext-fiddle-extconf.rb.diff (0 => 122863)
--- trunk/dports/lang/ruby21/files/patch-ext-fiddle-extconf.rb.diff (rev 0)
+++ trunk/dports/lang/ruby21/files/patch-ext-fiddle-extconf.rb.diff 2014-08-01 11:33:02 UTC (rev 122863)
@@ -0,0 +1,14 @@
+Index: ext/fiddle/extconf.rb
+===================================================================
+--- ext/fiddle/extconf.rb (revision 46608)
++++ ext/fiddle/extconf.rb (revision 47020)
+@@ -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')