summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2013-07-18 14:59:04 +0000
committerryoon <ryoon@pkgsrc.org>2013-07-18 14:59:04 +0000
commit41b6110d10fb4fb3e6adae4a96c71739898b8366 (patch)
treeb04d75cb5f921daf7e0a9fc9511f97058df7873a /mk
parent5f9ca499bd7f496ffa2dfdeffd5fe866fe058556 (diff)
downloadpkgsrc-41b6110d10fb4fb3e6adae4a96c71739898b8366.tar.gz
Fix non-editline builtin case.
Many thanks for obache@. * READLINE_DEFAULT is depends on builtin editline/readline type if possible. * _READLINE_ACCEPTED is always "editline readline", both are provided. Tested on OmniOS (builtin readline-6.2; with some modifications) and NetBSD. XXX If buitin readline is incompatible, READLINE_DEFAULT is set as readline. According to devel/readline/builtin.mk, SunOS, Darwin, and Interix's readline is incompatible with GNU readline. This behavior should be fixed.
Diffstat (limited to 'mk')
-rw-r--r--mk/readline.buildlink3.mk18
-rw-r--r--mk/readline.builtin.mk6
2 files changed, 14 insertions, 10 deletions
diff --git a/mk/readline.buildlink3.mk b/mk/readline.buildlink3.mk
index 584722c14f8..a687f80c2bc 100644
--- a/mk/readline.buildlink3.mk
+++ b/mk/readline.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: readline.buildlink3.mk,v 1.1 2013/07/15 01:54:25 ryoon Exp $
+# $NetBSD: readline.buildlink3.mk,v 1.2 2013/07/18 14:59:04 ryoon Exp $
#
# This Makefile fragment is meant to be included by packages that require
# any readline implementation instead of one particular one. The available
@@ -41,14 +41,16 @@ CHECK_BUILTIN.editlinereadline:= no
# Set the value of READLINE_DEFAULT depending on the platform and what's
# available in the base system.
#
-READLINE_DEFAULT?= editline
-
-_READLINE_ACCEPTED= # empty
-.if defined(USE_BUILTIN.editlinereadline) && \
- !empty(USE_BUILTIN.editlinereadline:M[yY][eE][sS])
-_READLINE_ACCEPTED+= editline # system editline exists or pkgsrc editline
+.if defined(IS_BUILTIN.editline) && \
+ !empty(IS_BUILTIN.editline:M[Yy][Ee][Ss])
+READLINE_DEFAULT= editline
+.else if defined(IS_BUILTIN.readline) && \
+ !empty(IS_BUILTIN.readline:M[Yy][Ee][Ss])
+READLINE_DEFAULT= readline
.endif
-_READLINE_ACCEPTED+= readline # pkgsrc readline
+
+
+_READLINE_ACCEPTED= ${_READLINE_PKGS} # both are provided by pkgsrc.
_READLINE_TYPE= ${READLINE_DEFAULT}
. if !empty(_READLINE_ACCEPTED:M${_READLINE_TYPE})
diff --git a/mk/readline.builtin.mk b/mk/readline.builtin.mk
index e9093aae90e..226eb80e70f 100644
--- a/mk/readline.builtin.mk
+++ b/mk/readline.builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: readline.builtin.mk,v 1.1 2013/07/15 01:54:25 ryoon Exp $
+# $NetBSD: readline.builtin.mk,v 1.2 2013/07/18 14:59:04 ryoon Exp $
#
BUILTIN_PKG:= editlinereadline
@@ -15,14 +15,16 @@ BUILTIN_FIND_GREP.H_READLINE= \#define[ ]*RL_VERSION_MAJOR
.include "../../mk/buildlink3/bsd.builtin.mk"
.if !defined(IS_BUILTIN.editlinereadline)
-IS_BUILTIN.readline= no
+IS_BUILTIN.editlinereadline= no
. if empty(H_READLINE:M__nonexistent__) && \
empty(H_READLINE:M${LOCALBASE}/*) && \
!empty(BUILTIN_LIB_FOUND.readline:M[yY][eE][sS])
+IS_BUILTIN.readline= yes
IS_BUILTIN.editlinereadline= yes
. else if empty(_BLTN_H_READLINE:M__nonexistent__) && \
!empty(BUILTIN_LIB_FOUND.readline:M[nN][oO]) && \
!empty(BUILTIN_LIB_FOUND.edit:M[yY][eE][sS])
+IS_BUILTIN.editline= yes
IS_BUILTIN.editlinereadline= yes
. endif
.endif