pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Fix non-editline builtin case.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4552829a7535
branches:  trunk
changeset: 621826:4552829a7535
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Thu Jul 18 14:59:04 2013 +0000

description:
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:

 mk/readline.buildlink3.mk |  18 ++++++++++--------
 mk/readline.builtin.mk    |   6 ++++--
 2 files changed, 14 insertions(+), 10 deletions(-)

diffs (60 lines):

diff -r 5a6c5e8cd831 -r 4552829a7535 mk/readline.buildlink3.mk
--- a/mk/readline.buildlink3.mk Thu Jul 18 13:10:03 2013 +0000
+++ b/mk/readline.buildlink3.mk Thu Jul 18 14:59:04 2013 +0000
@@ -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 @@
 # Set the value of READLINE_DEFAULT depending on the platform and what's
 # available in the base system.
 #
-READLINE_DEFAULT?=     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=    # empty
-.if defined(USE_BUILTIN.editlinereadline) && \
-       !empty(USE_BUILTIN.editlinereadline:M[yY][eE][sS])
-_READLINE_ACCEPTED+=   editline        # system editline exists or pkgsrc editline
-.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 -r 5a6c5e8cd831 -r 4552829a7535 mk/readline.builtin.mk
--- a/mk/readline.builtin.mk    Thu Jul 18 13:10:03 2013 +0000
+++ b/mk/readline.builtin.mk    Thu Jul 18 14:59:04 2013 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index