pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/readline + Teach the readline buildlink3.mk and ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/bc778498a836
branches: trunk
changeset: 539104:bc778498a836
user: jlam <jlam%pkgsrc.org@localhost>
date: Wed Feb 27 18:16:37 2008 +0000
description:
+ Teach the readline buildlink3.mk and builtin.mk files to determine
the correct terminal library that must be linked along with -lreadline.
On NetBSD, this is -ltermcap. On Linux, this should be either -ltinfo
or -lcurses. On Solaris, this should be -lcurses.
+ Add a "termlib" dependency to the devel/readline package that allows
for linking against -lcurses. Bump the PKGREVISON to 1.
diffstat:
devel/readline/Makefile | 9 ++++++++-
devel/readline/buildlink3.mk | 26 +++++++++++++++-----------
devel/readline/builtin.mk | 21 +++++++++++++--------
3 files changed, 36 insertions(+), 20 deletions(-)
diffs (116 lines):
diff -r 10b6ab43d8d3 -r bc778498a836 devel/readline/Makefile
--- a/devel/readline/Makefile Wed Feb 27 17:36:34 2008 +0000
+++ b/devel/readline/Makefile Wed Feb 27 18:16:37 2008 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.42 2007/11/11 11:35:49 martti Exp $
+# $NetBSD: Makefile,v 1.43 2008/02/27 18:16:37 jlam Exp $
#
DISTNAME= readline-5.2
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=readline/}
@@ -23,4 +24,10 @@
BUILD_TARGET= all-libtool
INSTALL_TARGET= install-libtool
+.include "../../mk/termlib.buildlink3.mk"
+
+.if ${TERMLIB_TYPE} == "curses"
+CONFIGURE_ARGS+= --with-curses
+.endif
+
.include "../../mk/bsd.pkg.mk"
diff -r 10b6ab43d8d3 -r bc778498a836 devel/readline/buildlink3.mk
--- a/devel/readline/buildlink3.mk Wed Feb 27 17:36:34 2008 +0000
+++ b/devel/readline/buildlink3.mk Wed Feb 27 18:16:37 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.28 2007/01/17 03:11:18 rillig Exp $
+# $NetBSD: buildlink3.mk,v 1.29 2008/02/27 18:16:37 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
READLINE_BUILDLINK3_MK:= ${READLINE_BUILDLINK3_MK}+
@@ -12,7 +12,7 @@
BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}readline
.if !empty(READLINE_BUILDLINK3_MK:M+)
-BUILDLINK_API_DEPENDS.readline+= readline>=2.2
+BUILDLINK_API_DEPENDS.readline+= readline>=2.2
BUILDLINK_ABI_DEPENDS.readline+= readline>=5.0
BUILDLINK_PKGSRCDIR.readline?= ../../devel/readline
@@ -23,22 +23,26 @@
-e "s|include/history\.h|include/readline/history.h|g" \
-e "s|include/readline\.h|include/readline/readline.h|g"
-# Many GNU configure scripts don't check for the correct termcap library
+# Many GNU configure scripts don't check for the correct terminal library
# when testing for -lreadline. If BROKEN_READLINE_DETECTION is set to
# "yes", then automatically add the right one.
#
. include "../../mk/bsd.fast.prefs.mk"
BROKEN_READLINE_DETECTION?= no
. if !empty(BROKEN_READLINE_DETECTION:M[yY][eE][sS])
-BUILDLINK_RL_TERMLIB.Linux= curses
-BUILDLINK_RL_TERMLIB.*= termcap
-. if defined(BUILDLINK_RL_TERMLIB.${OPSYS})
-BUILDLINK_RL_TERMLIB?= ${BUILDLINK_RL_TERMLIB.${OPSYS}}
-. else
-BUILDLINK_RL_TERMLIB?= ${BUILDLINK_RL_TERMLIB.*}
-. endif
-BUILDLINK_TRANSFORM+= l:readline:readline:${BUILDLINK_RL_TERMLIB}
+BUILDLINK_TRANSFORM+= l:readline:readline:${BUILDLINK_LIBNAME.termlib}
. endif
.endif # READLINE_BUILDLINK3_MK
+CHECK_BUILTIN.readline:= yes
+.include "../../devel/readline/builtin.mk"
+CHECK_BUILTIN.readline:= no
+
+# A built-in readline is always going to use a built-in termlib.
+.if !empty(USE_BUILTIN.readline:M[yY][eE][sS])
+USE_BUILTIN.termlib= yes
+.endif
+
+.include "../../mk/termlib.buildlink3.mk"
+
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff -r 10b6ab43d8d3 -r bc778498a836 devel/readline/builtin.mk
--- a/devel/readline/builtin.mk Wed Feb 27 17:36:34 2008 +0000
+++ b/devel/readline/builtin.mk Wed Feb 27 18:16:37 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: builtin.mk,v 1.15 2006/12/29 15:11:20 joerg Exp $
+# $NetBSD: builtin.mk,v 1.16 2008/02/27 18:16:37 jlam Exp $
BUILTIN_PKG:= readline
-BUILTIN_FIND_LIBS:= edit readline
+BUILTIN_FIND_LIBS:= edit readline history
BUILTIN_FIND_FILES_VAR:= H_READLINE _BLTN_H_READLINE
BUILTIN_FIND_FILES.H_READLINE= /usr/include/readline/readline.h \
/usr/include/readline.h
@@ -107,12 +107,17 @@
.if !empty(CHECK_BUILTIN.readline:M[nN][oO])
. if !empty(USE_BUILTIN.readline:M[yY][eE][sS])
-. if !empty(BUILTIN_LIB_FOUND.readline:M[Yy][Ee][Ss]) && ${OPSYS} == "OpenBSD"
-BUILDLINK_TRANSFORM+= l:history:readline:termcap
-. elif !empty(BUILTIN_LIB_FOUND.readline:M[nN][oO]) && \
- !empty(BUILTIN_LIB_FOUND.edit:M[yY][eE][sS])
-BUILDLINK_TRANSFORM+= l:history:edit:termcap
-BUILDLINK_TRANSFORM+= l:readline:edit:termcap
+. if !empty(BUILTIN_LIB_FOUND.history:M[Nn][Oo]) && \
+ !empty(BUILTIN_LIB_FOUND.readline:M[Yy][Ee][Ss])
+BUILDLINK_TRANSFORM+= l:history:readline:${BUILTIN_LIBNAME.termlib}
+. endif
+. if !empty(BUILTIN_LIB_FOUND.history:M[nN][oO]) && \
+ !empty(BUILTIN_LIB_FOUND.edit:M[yY][eE][sS])
+BUILDLINK_TRANSFORM+= l:history:edit:${BUILTIN_LIBNAME.termlib}
+. endif
+. if !empty(BUILTIN_LIB_FOUND.readline:M[nN][oO]) && \
+ !empty(BUILTIN_LIB_FOUND.edit:M[yY][eE][sS])
+BUILDLINK_TRANSFORM+= l:readline:edit:${BUILTIN_LIBNAME.termlib}
. endif
. endif
Home |
Main Index |
Thread Index |
Old Index