[118728] trunk/dports/lang/ruby21

kimuraw at macports.org kimuraw at macports.org
Wed Apr 9 05:37:34 PDT 2014


Revision: 118728
          https://trac.macports.org/changeset/118728
Author:   kimuraw at macports.org
Date:     2014-04-09 05:37:33 -0700 (Wed, 09 Apr 2014)
Log Message:
-----------
lang/ruby21: fix build error with readline-6.3 (#43296)

Modified Paths:
--------------
    trunk/dports/lang/ruby21/Portfile

Added Paths:
-----------
    trunk/dports/lang/ruby21/files/patch-readline63.diff

Modified: trunk/dports/lang/ruby21/Portfile
===================================================================
--- trunk/dports/lang/ruby21/Portfile	2014-04-09 12:19:51 UTC (rev 118727)
+++ trunk/dports/lang/ruby21/Portfile	2014-04-09 12:37:33 UTC (rev 118728)
@@ -6,7 +6,7 @@
 
 name                ruby21
 version             2.1.1
-revision            0
+revision            1
 
 categories          lang ruby
 maintainers         kimuraw openmaintainer
@@ -55,6 +55,9 @@
                     --program-suffix=2.1 \
                     --with-rubylibprefix="${prefix}/lib/ruby2.1"
 
+# patch-readline63.diff: support readline-6.3 (#43296) from ruby-trunk r45540
+patchfiles          patch-readline63.diff
+
 # Ignore minor version for archdir, like i686-darwin9.
 # Port "ruby" and "ruby19" does the same.
 configure.env-append UNAME_RELEASE=${os.major}

Added: trunk/dports/lang/ruby21/files/patch-readline63.diff
===================================================================
--- trunk/dports/lang/ruby21/files/patch-readline63.diff	                        (rev 0)
+++ trunk/dports/lang/ruby21/files/patch-readline63.diff	2014-04-09 12:37:33 UTC (rev 118728)
@@ -0,0 +1,40 @@
+Index: ext/readline/extconf.rb
+===================================================================
+--- ext/readline/extconf.rb	(revision 45540)
++++ ext/readline/extconf.rb	(working copy)
+@@ -19,6 +19,10 @@
+   return super(func, headers)
+ end
+ 
++def readline.have_type(type)
++  return super(type, headers)
++end
++
+ dir_config('curses')
+ dir_config('ncurses')
+ dir_config('termcap')
+@@ -94,4 +98,11 @@
+ readline.have_func("rl_redisplay")
+ readline.have_func("rl_insert_text")
+ readline.have_func("rl_delete_text")
++unless readline.have_type("rl_hook_func_t*")
++  # rl_hook_func_t is available since readline-4.2 (2001).
++  # Function is removed at readline-6.3 (2014).
++  # However, editline (NetBSD 6.1.3, 2014) doesn't have rl_hook_func_t.
++  $defs << "-Drl_hook_func_t=Function"
++end
++
+ create_makefile("readline")
+Index: ext/readline/readline.c
+===================================================================
+--- ext/readline/readline.c	(revision 45540)
++++ ext/readline/readline.c	(working copy)
+@@ -1974,7 +1974,7 @@
+ 
+     rl_attempted_completion_function = readline_attempted_completion_function;
+ #if defined(HAVE_RL_PRE_INPUT_HOOK)
+-    rl_pre_input_hook = (Function *)readline_pre_input_hook;
++    rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
+ #endif
+ #ifdef HAVE_RL_CATCH_SIGNALS
+     rl_catch_signals = 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140409/379bac70/attachment-0001.html>


More information about the macports-changes mailing list