[118730] trunk/dports/lang/ruby20
kimuraw at macports.org
kimuraw at macports.org
Wed Apr 9 06:00:52 PDT 2014
Revision: 118730
https://trac.macports.org/changeset/118730
Author: kimuraw at macports.org
Date: 2014-04-09 06:00:52 -0700 (Wed, 09 Apr 2014)
Log Message:
-----------
lang/ruby20: fix build error with readline-6.3 (#43296)
Modified Paths:
--------------
trunk/dports/lang/ruby20/Portfile
Added Paths:
-----------
trunk/dports/lang/ruby20/files/patch-readline63.diff
Modified: trunk/dports/lang/ruby20/Portfile
===================================================================
--- trunk/dports/lang/ruby20/Portfile 2014-04-09 13:00:21 UTC (rev 118729)
+++ trunk/dports/lang/ruby20/Portfile 2014-04-09 13:00:52 UTC (rev 118730)
@@ -60,7 +60,9 @@
configure.env-append UNAME_RELEASE=${os.major}
# ext/tk/extconf.rb: fix build error with tk variant
-patchfiles patch-ext-tk-extconf.rb.diff
+# patch-readline63.diff: support readline-6.3 (#43296) from ruby-trunk r45540
+patchfiles patch-readline63.diff \
+ patch-ext-tk-extconf.rb.diff
# Add the architecture flag as required
if {[info exists build_arch] && ${build_arch} ne ""} {
Added: trunk/dports/lang/ruby20/files/patch-readline63.diff
===================================================================
--- trunk/dports/lang/ruby20/files/patch-readline63.diff (rev 0)
+++ trunk/dports/lang/ruby20/files/patch-readline63.diff 2014-04-09 13:00:52 UTC (rev 118730)
@@ -0,0 +1,39 @@
+Index: ext/readline/extconf.rb
+===================================================================
+--- ext/readline/extconf.rb (revision 45167)
++++ 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')
+@@ -93,4 +97,10 @@
+ readline.have_func("clear_history")
+ readline.have_func("rl_redisplay")
+ readline.have_func("rl_insert_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 45167)
++++ ext/readline/readline.c (working copy)
+@@ -1883,7 +1883,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/bb466488/attachment.html>
More information about the macports-changes
mailing list