| @@ -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 | |
13 | TERMCAP_BUILDLINK3_MK:= ${TERMCAP_BUILDLINK3_MK}+ | | 13 | TERMCAP_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 | |
24 | CHECK_BUILTIN.termcap:= yes | | 24 | CHECK_BUILTIN.termcap:= yes |
25 | . include "termcap.builtin.mk" | | 25 | . include "termcap.builtin.mk" |
26 | CHECK_BUILTIN.termcap:= no | | 26 | CHECK_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) |
30 | TERMCAP_TYPE= ${BUILTIN_LIBNAME.termcap} | | 30 | TERMCAP_TYPE= ${BUILTIN_LIBNAME.termcap} |
31 | . else | | 31 | . else |
32 | TERMCAP_TYPE= none | | 32 | TERMCAP_TYPE= none |
33 | . endif | | 33 | . endif |
34 | .else | | 34 | .else |
35 | TERMCAP_TYPE= curses # pkgsrc termcap is curses | | 35 | TERMCAP_TYPE= curses # pkgsrc termcap is curses |
36 | .endif | | 36 | .endif |
37 | BUILD_DEFS+= TERMCAP_TYPE | | 37 | BUILD_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 | BUILDLINK_TRANSFORM+= rm:-l${_tcap_} | | 47 | BUILDLINK_TRANSFORM+= rm:-l${_tcap_} |
48 | . endif | | 48 | . endif |
49 | . endfor | | 49 | . endfor |
50 | BUILDLINK_TRANSFORM+= l:termcap:${BUILDLINK_LIBNAME.termcap} | | 50 | BUILDLINK_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" |
55 | PKG_FAIL_REASON= "No usable termcap library found on the system." | | 55 | PKG_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") |
59 | BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermcap} | | 59 | BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermcap} |
60 | BUILDLINK_PACKAGES+= termcap | | 60 | BUILDLINK_PACKAGES+= termcap |
61 | BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termcap | | 61 | BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termcap |
62 | BUILDLINK_LIBNAME.termcap?= ${BUILTIN_LIBNAME.termcap} | | 62 | BUILDLINK_LIBNAME.termcap?= ${BUILTIN_LIBNAME.termcap} |
63 | BUILDLINK_LDADD.termcap?= ${BUILDLINK_LIBNAME.termcap:S/^/-l/:S/^-l$//} | | 63 | BUILDLINK_LDADD.termcap?= ${BUILDLINK_LIBNAME.termcap:S/^/-l/:S/^-l$//} |
64 | BUILDLINK_BUILTIN_MK.termcap= ../../mk/termcap.builtin.mk | | 64 | BUILDLINK_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" |
67 | BUILDLINK_PREFIX.termcap?= ${BUILDLINK_PREFIX.curses} | | 67 | BUILDLINK_PREFIX.termcap?= ${BUILDLINK_PREFIX.curses} |
68 | BUILDLINK_LIBNAME.termcap?= ${BUILDLINK_LIBNAME.curses} | | 68 | BUILDLINK_LIBNAME.termcap?= ${BUILDLINK_LIBNAME.curses} |
69 | BUILDLINK_LDADD.termcap?= ${BUILDLINK_LDADD.curses} | | 69 | BUILDLINK_LDADD.termcap?= ${BUILDLINK_LDADD.curses} |
70 | .endif | | 70 | .endif |