mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-04 10:18:09 -04:00
31 lines
967 B
Ruby
31 lines
967 B
Ruby
$NetBSD: patch-ext_readline_extconf.rb,v 1.1 2014/03/30 00:18:09 taca Exp $
|
|
|
|
* Handle rl_hook_func_t old/new GNU readline and editline(3).
|
|
|
|
--- ext/readline/extconf.rb.orig 2013-07-22 00:37:10.000000000 +0000
|
|
+++ ext/readline/extconf.rb
|
|
@@ -19,6 +19,10 @@ def readline.have_func(func)
|
|
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,5 +97,12 @@ readline.have_func("remove_history")
|
|
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
|
|
+
|
|
readline.have_func("rl_delete_text")
|
|
create_makefile("readline")
|