Wed Mar 5 17:38:58 2008 UTC ()
TERMCAP_TYPE isn't really a variable that you can set, so add it to
BUILD_DEFS_EFFECTS instead of BUILD_DEFS.


(jlam)
diff -r1.5 -r1.6 pkgsrc/mk/termcap.buildlink3.mk

cvs diff -r1.5 -r1.6 pkgsrc/mk/termcap.buildlink3.mk (switch to unified diff)

--- pkgsrc/mk/termcap.buildlink3.mk 2008/03/05 16:23:52 1.5
+++ pkgsrc/mk/termcap.buildlink3.mk 2008/03/05 17:38:58 1.6
@@ -1,70 +1,70 @@ @@ -1,70 +1,70 @@
1# $NetBSD: termcap.buildlink3.mk,v 1.5 2008/03/05 16:23:52 jlam Exp $ 1# $NetBSD: termcap.buildlink3.mk,v 1.6 2008/03/05 17:38:58 jlam Exp $
2# 2#
3# This Makefile fragment is meant to be included by packages that require 3# This Makefile fragment is meant to be included by packages that require
4# a termcap implementation that supports the basic termcap functions: 4# a termcap implementation that supports the basic termcap functions:
5# 5#
6# tgetent, tgetstr, tgetflag, tgetnum, tgoto, tputs 6# tgetent, tgetstr, tgetflag, tgetnum, tgoto, tputs
7# 7#
8# === Variables set by this file === 8# === Variables set by this file ===
9# 9#
10# TERMCAP_TYPE 10# TERMCAP_TYPE
11# The name of the selected termcap implementation. 11# The name of the selected termcap implementation.
12 12
13TERMCAP_BUILDLINK3_MK:= ${TERMCAP_BUILDLINK3_MK}+ 13TERMCAP_BUILDLINK3_MK:= ${TERMCAP_BUILDLINK3_MK}+
14 14
15.include "bsd.fast.prefs.mk" 15.include "bsd.fast.prefs.mk"
16 16
17.if !empty(TERMCAP_BUILDLINK3_MK:M+) 17.if !empty(TERMCAP_BUILDLINK3_MK:M+)
18 18
19# _TERMCAP_TYPES is an exhaustive list of all of the termcap 19# _TERMCAP_TYPES is an exhaustive list of all of the termcap
20# implementations that may be found. 20# implementations that may be found.
21# 21#
22_TERMCAP_TYPES?= curses termcap termlib tinfo 22_TERMCAP_TYPES?= curses termcap termlib tinfo
23 23
24CHECK_BUILTIN.termcap:= yes 24CHECK_BUILTIN.termcap:= yes
25. include "termcap.builtin.mk" 25. include "termcap.builtin.mk"
26CHECK_BUILTIN.termcap:= no 26CHECK_BUILTIN.termcap:= no
27 27
28.if !empty(USE_BUILTIN.termcap:M[yY][eE][sS]) 28.if !empty(USE_BUILTIN.termcap:M[yY][eE][sS])
29. if defined(BUILTIN_LIBNAME.termcap) 29. if defined(BUILTIN_LIBNAME.termcap)
30TERMCAP_TYPE= ${BUILTIN_LIBNAME.termcap} 30TERMCAP_TYPE= ${BUILTIN_LIBNAME.termcap}
31. else 31. else
32TERMCAP_TYPE= none 32TERMCAP_TYPE= none
33. endif 33. endif
34.else 34.else
35TERMCAP_TYPE= curses # pkgsrc termcap is curses 35TERMCAP_TYPE= curses # pkgsrc termcap is curses
36.endif 36.endif
37BUILD_DEFS+= TERMCAP_TYPE 37BUILD_DEFS_EFFECTS+= TERMCAP_TYPE
38 38
39# Most GNU configure scripts will try finding every termcap implementation, 39# Most GNU configure scripts will try finding every termcap implementation,
40# so prevent them from finding any except for the one we decide upon. 40# so prevent them from finding any except for the one we decide upon.
41# 41#
42# There is special handling for packages that can be provided by pkgsrc, 42# There is special handling for packages that can be provided by pkgsrc,
43# e.g. curses -- see termcap.builtin.mk for details. 43# e.g. curses -- see termcap.builtin.mk for details.
44# 44#
45. for _tcap_ in ${_TERMCAP_TYPES:Ntermcap:Ncurses} 45. for _tcap_ in ${_TERMCAP_TYPES:Ntermcap:Ncurses}
46. if empty(TERMCAP_TYPE:M${_tcap_}) 46. if empty(TERMCAP_TYPE:M${_tcap_})
47BUILDLINK_TRANSFORM+= rm:-l${_tcap_} 47BUILDLINK_TRANSFORM+= rm:-l${_tcap_}
48. endif 48. endif
49. endfor 49. endfor
50BUILDLINK_TRANSFORM+= l:termcap:${BUILDLINK_LIBNAME.termcap} 50BUILDLINK_TRANSFORM+= l:termcap:${BUILDLINK_LIBNAME.termcap}
51 51
52.endif # TERMCAP_BUILDLINK3_MK 52.endif # TERMCAP_BUILDLINK3_MK
53 53
54.if ${TERMCAP_TYPE} == "none" 54.if ${TERMCAP_TYPE} == "none"
55PKG_FAIL_REASON= "No usable termcap library found on the system." 55PKG_FAIL_REASON= "No usable termcap library found on the system."
56.elif (${TERMCAP_TYPE} == "termlib") || \ 56.elif (${TERMCAP_TYPE} == "termlib") || \
57 (${TERMCAP_TYPE} == "termcap") || \ 57 (${TERMCAP_TYPE} == "termcap") || \
58 (${TERMCAP_TYPE} == "tinfo") 58 (${TERMCAP_TYPE} == "tinfo")
59BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermcap} 59BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermcap}
60BUILDLINK_PACKAGES+= termcap 60BUILDLINK_PACKAGES+= termcap
61BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termcap 61BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termcap
62BUILDLINK_LIBNAME.termcap?= ${BUILTIN_LIBNAME.termcap} 62BUILDLINK_LIBNAME.termcap?= ${BUILTIN_LIBNAME.termcap}
63BUILDLINK_LDADD.termcap?= ${BUILDLINK_LIBNAME.termcap:S/^/-l/:S/^-l$//} 63BUILDLINK_LDADD.termcap?= ${BUILDLINK_LIBNAME.termcap:S/^/-l/:S/^-l$//}
64BUILDLINK_BUILTIN_MK.termcap= ../../mk/termcap.builtin.mk 64BUILDLINK_BUILTIN_MK.termcap= ../../mk/termcap.builtin.mk
65.elif ${TERMCAP_TYPE} == "curses" 65.elif ${TERMCAP_TYPE} == "curses"
66. include "../../mk/curses.buildlink3.mk" 66. include "../../mk/curses.buildlink3.mk"
67BUILDLINK_PREFIX.termcap?= ${BUILDLINK_PREFIX.curses} 67BUILDLINK_PREFIX.termcap?= ${BUILDLINK_PREFIX.curses}
68BUILDLINK_LIBNAME.termcap?= ${BUILDLINK_LIBNAME.curses} 68BUILDLINK_LIBNAME.termcap?= ${BUILDLINK_LIBNAME.curses}
69BUILDLINK_LDADD.termcap?= ${BUILDLINK_LDADD.curses} 69BUILDLINK_LDADD.termcap?= ${BUILDLINK_LDADD.curses}
70.endif 70.endif