summaryrefslogtreecommitdiff
path: root/mk/termcap.buildlink3.mk
diff options
context:
space:
mode:
authorjlam <jlam>2008-03-02 07:05:28 +0000
committerjlam <jlam>2008-03-02 07:05:28 +0000
commitf22b9846fef13a53d2c903684a00552edb977592 (patch)
tree201d3d5719e91663cf062a3e1d858b99207c7b6a /mk/termcap.buildlink3.mk
parentcd989280f7d2133f950a0bfc48858a914849bea5 (diff)
downloadpkgsrc-f22b9846fef13a53d2c903684a00552edb977592.tar.gz
+ Teach buildlink3.mk to cause GNU configure script to not find any other
terminal library other than the one we specify. + Also look for "termlib" as some systems have that. Note that we need to make the library search more sophisticated to work correctly on more exotic platforms.
Diffstat (limited to 'mk/termcap.buildlink3.mk')
-rw-r--r--mk/termcap.buildlink3.mk21
1 files changed, 18 insertions, 3 deletions
diff --git a/mk/termcap.buildlink3.mk b/mk/termcap.buildlink3.mk
index 29f531c8525..4533ec38e33 100644
--- a/mk/termcap.buildlink3.mk
+++ b/mk/termcap.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: termcap.buildlink3.mk,v 1.1 2008/02/29 22:41:13 jlam Exp $
+# $NetBSD: termcap.buildlink3.mk,v 1.2 2008/03/02 07:05:28 jlam Exp $
#
# This Makefile fragment is meant to be included by packages that require
# a termcap implementation that supports the basic termcap functions:
@@ -16,6 +16,11 @@ TERMCAP_BUILDLINK3_MK:= ${TERMCAP_BUILDLINK3_MK}+
.if !empty(TERMCAP_BUILDLINK3_MK:M+)
+# _TERMCAP_TYPES is an exhaustive list of all of the termcap implementations
+# that may be found.
+#
+_TERMCAP_TYPES?= curses termcap termlib tinfo
+
CHECK_BUILTIN.termcap:= yes
. include "termcap.builtin.mk"
CHECK_BUILTIN.termcap:= no
@@ -29,14 +34,24 @@ TERMCAP_TYPE= none
. else
TERMCAP_TYPE= curses
. endif
-
BUILD_DEFS+= TERMCAP_TYPE
+# Most GNU configure scripts will try finding every termcap implementation,
+# so prevent them from finding any except for the one we decide upon.
+#
+.for _tcap_ in ${_TERMCAP_TYPES:Ntermcap}
+. if empty(TERMCAP_TYPE:M${_tcap_})
+BUILDLINK_TRANSFORM+= rm:-l${_tcap_}
+. endif
+.endfor
+BUILDLINK_TRANSFORM+= l:termcap:${BUILDLINK_LIBNAME.termcap}
+
.endif # TERMCAP_BUILDLINK3_MK
.if ${TERMCAP_TYPE} == "none"
PKG_FAIL_REASON= "No usable termcap library found on the system."
-.elif (${TERMCAP_TYPE} == "termcap") || \
+.elif (${TERMCAP_TYPE} == "termlib") || \
+ (${TERMCAP_TYPE} == "termcap") || \
(${TERMCAP_TYPE} == "tinfo")
BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermcap}
BUILDLINK_PACKAGES+= termcap