diff options
author | jlam <jlam@pkgsrc.org> | 2002-08-22 19:43:10 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-08-22 19:43:10 +0000 |
commit | 688f0ce7cf7d525ce034a171c81244a04f05abdf (patch) | |
tree | d70fea24240ae30b71a60c9a6814cb4365d0685b | |
parent | 96660762e3069a92e487287604fa3e4d53f3e428 (diff) | |
download | pkgsrc-688f0ce7cf7d525ce034a171c81244a04f05abdf.tar.gz |
Mirror changes in buildlink.mk to support more precisely specifying when
the system readline/editline routines may be used in place of GNU readline.
-rw-r--r-- | devel/readline/buildlink2.mk | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/devel/readline/buildlink2.mk b/devel/readline/buildlink2.mk index f9f14ff8b0c..79f433377ca 100644 --- a/devel/readline/buildlink2.mk +++ b/devel/readline/buildlink2.mk @@ -1,6 +1,9 @@ -# $NetBSD: buildlink2.mk,v 1.1.2.3 2002/06/21 23:00:29 jlam Exp $ +# $NetBSD: buildlink2.mk,v 1.1.2.4 2002/08/22 19:43:10 jlam Exp $ # # Optionally define USE_GNU_READLINE to force use of GNU readline. +# +# NOTE: You may need to do some more work to get libedit recognized over +# libreadline, especially by GNU configure scripts. .if !defined(READLINE_BUILDLINK2_MK) READLINE_BUILDLINK2_MK= # defined @@ -12,50 +15,54 @@ BUILDLINK_PKGSRCDIR.readline?= ../../devel/readline .if defined(USE_GNU_READLINE) _NEED_GNU_READLINE= YES -.elif exists(/usr/include/readline.h) || \ +.else +. if exists(/usr/include/readline.h) || \ exists(/usr/include/readline/readline.h) _NEED_GNU_READLINE= NO -.else +. else +_NEED_GNU_READLINE= YES +. endif +# +# This catch-all for SunOS is probably too broad, but better to err on +# the safe side. We can narrow down the match when we have better +# information. +# +_INCOMPAT_READLINE= SunOS-*-* +INCOMPAT_READLINE?= # empty +. for _pattern_ in ${_INCOMPAT_READLINE} ${INCOMPAT_READLINE} +. if !empty(MACHINE_PLATFORM:M${_pattern_}) _NEED_GNU_READLINE= YES +. endif +. endfor .endif .if ${_NEED_GNU_READLINE} == "YES" BUILDLINK_PACKAGES+= readline -EVAL_PREFIX+= BUILDLINK_PREFIX.readline=readline +EVAL_PREFIX+= BUILDLINK_PREFIX.readline=readline BUILDLINK_PREFIX.readline_DEFAULT= ${LOCALBASE} -BUILDLINK_FILES.readline= include/readline/* -BUILDLINK_FILES.readline+= lib/libreadline.* +.else +BUILDLINK_PREFIX.readline= /usr +.endif +BUILDLINK_PREFIX.history= ${BUILDLINK_PREFIX.readline} -BUILDLINK_PREFIX.history= ${BUILDLINK_PREFIX.readline} -BUILDLINK_FILES.history+= lib/libhistory.* -.elif ${OPSYS} == "Linux" -BUILDLINK_PREFIX.readline= /usr -BUILDLINK_FILES.readline= include/readline/* +BUILDLINK_FILES.readline= include/readline.h +BUILDLINK_FILES.readline+= include/readline/* BUILDLINK_FILES.readline+= lib/libreadline.* -BUILDLINK_PREFIX.history= /usr +BUILDLINK_FILES.history= include/history.h BUILDLINK_FILES.history+= lib/libhistory.* -.elif exists(/usr/include/readline.h) -BUILDLINK_PREFIX.readline= /usr -BUILDLINK_FILES.readline= include/readline.h + +.if ${_NEED_GNU_READLINE} == "NO" +_BLNK_LIBEDIT_LIST!= ${ECHO} /usr/lib/libedit.* +. if ${_BLNK_LIBEDIT_LIST} != "/usr/lib/libedit.*" BUILDLINK_FILES.readline+= lib/libedit.* BUILDLINK_TRANSFORM.readline= -e "s|/readline.h|/readline/readline.h|g" BUILDLINK_TRANSFORM+= l:readline:edit -BUILDLINK_PREFIX.history= /usr -BUILDLINK_FILES.history= include/history.h BUILDLINK_FILES.history+= lib/libedit.* BUILDLINK_TRANSFORM.history= -e "s|/history.h|/readline/history.h|g" BUILDLINK_TRANSFORM+= l:history:edit -.else # exists(/usr/include/readline/readline.h) -BUILDLINK_PREFIX.readline= /usr -BUILDLINK_FILES.readline= include/readline/* -BUILDLINK_FILES.readline+= lib/libedit.* -BUILDLINK_TRANSFORM+= l:readline:edit - -BUILDLINK_PREFIX.history= /usr -BUILDLINK_FILES.history+= lib/libedit.* -BUILDLINK_TRANSFORM+= l:history:edit +. endif .endif BUILDLINK_TARGETS+= readline-buildlink |