diff options
author | jlam <jlam@pkgsrc.org> | 2008-02-29 22:41:13 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2008-02-29 22:41:13 +0000 |
commit | 9d8755394f406bd276215434bfa51cf265528983 (patch) | |
tree | 4c09730700480e5537329192a8145629c5512c5e /mk/termcap.buildlink3.mk | |
parent | 8ed0c8a489ceca32f2b62b55b78aafe11ff03241 (diff) | |
download | pkgsrc-9d8755394f406bd276215434bfa51cf265528983.tar.gz |
Rename termlib.* to termcap.* to better document exactly what packages
are trying to use (the termcap t*() API).
Diffstat (limited to 'mk/termcap.buildlink3.mk')
-rw-r--r-- | mk/termcap.buildlink3.mk | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/mk/termcap.buildlink3.mk b/mk/termcap.buildlink3.mk new file mode 100644 index 00000000000..29f531c8525 --- /dev/null +++ b/mk/termcap.buildlink3.mk @@ -0,0 +1,52 @@ +# $NetBSD: termcap.buildlink3.mk,v 1.1 2008/02/29 22:41:13 jlam Exp $ +# +# This Makefile fragment is meant to be included by packages that require +# a termcap implementation that supports the basic termcap functions: +# +# tgetent, tgetstr, tgetflag, tgetnum, tgoto, tputs +# +# === Variables set by this file === +# +# TERMCAP_TYPE +# The name of the selected termcap implementation. + +TERMCAP_BUILDLINK3_MK:= ${TERMCAP_BUILDLINK3_MK}+ + +.include "bsd.fast.prefs.mk" + +.if !empty(TERMCAP_BUILDLINK3_MK:M+) + +CHECK_BUILTIN.termcap:= yes +. include "termcap.builtin.mk" +CHECK_BUILTIN.termcap:= no + +. if !empty(USE_BUILTIN.termcap:M[yY][eE][sS]) +. if defined(BUILTIN_LIBNAME.termcap) +TERMCAP_TYPE= ${BUILTIN_LIBNAME.termcap} +. else +TERMCAP_TYPE= none +. endif +. else +TERMCAP_TYPE= curses +. endif + +BUILD_DEFS+= TERMCAP_TYPE + +.endif # TERMCAP_BUILDLINK3_MK + +.if ${TERMCAP_TYPE} == "none" +PKG_FAIL_REASON= "No usable termcap library found on the system." +.elif (${TERMCAP_TYPE} == "termcap") || \ + (${TERMCAP_TYPE} == "tinfo") +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermcap} +BUILDLINK_PACKAGES+= termcap +BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termcap +BUILDLINK_LIBNAME.termcap?= ${BUILTIN_LIBNAME.termcap} +BUILDLINK_LDADD.termcap?= ${BUILDLINK_LIBNAME.termcap:S/^/-l/:S/^-l$//} +BUILDLINK_BUILTIN_MK.termcap= ../../mk/termcap.builtin.mk +.elif ${TERMCAP_TYPE} == "curses" +. include "../../mk/curses.buildlink3.mk" +BUILDLINK_PREFIX.termcap?= ${BUILDLINK_PREFIX.curses} +BUILDLINK_LIBNAME.termcap?= ${BUILDLINK_LIBNAME.curses} +BUILDLINK_LDADD.termcap?= ${BUILDLINK_LDADD.curses} +.endif |