Sat Oct 19 19:12:41 2013 UTC ()
Fix for older bmake


(roy)
diff -r1.9 -r1.10 pkgsrc/mk/termcap.buildlink3.mk

cvs diff -r1.9 -r1.10 pkgsrc/mk/termcap.buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/mk/termcap.buildlink3.mk 2013/10/16 16:51:28 1.9
+++ pkgsrc/mk/termcap.buildlink3.mk 2013/10/19 19:12:41 1.10
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: termcap.buildlink3.mk,v 1.9 2013/10/16 16:51:28 roy Exp $ 1# $NetBSD: termcap.buildlink3.mk,v 1.10 2013/10/19 19:12:41 roy 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
@@ -34,28 +34,28 @@ TERMCAP_TYPE= none @@ -34,28 +34,28 @@ TERMCAP_TYPE= none
34.else 34.else
35TERMCAP_TYPE= curses # pkgsrc termcap is curses 35TERMCAP_TYPE= curses # pkgsrc termcap is curses
36.endif 36.endif
37BUILD_DEFS_EFFECTS+= 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_}) \
47 && empty(TERMINFO_TYPE:M${_tcap_}) \ 47 && (!defined(TERMINFO_TYPE) || empty(TERMINFO_TYPE:M${_tcap_})) \
48 && empty(CURSES_TYPE:M${_tcap_}) 48 && (!defined(CURSES_TYPE) || empty(CURSES_TYPE:M${_tcap_}))
49BUILDLINK_TRANSFORM+= rm:-l${_tcap_} 49BUILDLINK_TRANSFORM+= rm:-l${_tcap_}
50. endif 50. endif
51. endfor 51. endfor
52BUILDLINK_TRANSFORM+= l:termcap:${BUILDLINK_LIBNAME.termcap} 52BUILDLINK_TRANSFORM+= l:termcap:${BUILDLINK_LIBNAME.termcap}
53 53
54.endif # TERMCAP_BUILDLINK3_MK 54.endif # TERMCAP_BUILDLINK3_MK
55 55
56.if ${TERMCAP_TYPE} == "none" 56.if ${TERMCAP_TYPE} == "none"
57PKG_FAIL_REASON= "No usable termcap library found on the system." 57PKG_FAIL_REASON= "No usable termcap library found on the system."
58.elif (${TERMCAP_TYPE} == "terminfo") || \ 58.elif (${TERMCAP_TYPE} == "terminfo") || \
59 (${TERMCAP_TYPE} == "termlib") || \ 59 (${TERMCAP_TYPE} == "termlib") || \
60 (${TERMCAP_TYPE} == "termcap") || \ 60 (${TERMCAP_TYPE} == "termcap") || \
61 (${TERMCAP_TYPE} == "tinfo") 61 (${TERMCAP_TYPE} == "tinfo")