| @@ -1,18 +1,18 @@ | | | @@ -1,18 +1,18 @@ |
1 | # $NetBSD: builtin.mk,v 1.24 2009/07/07 11:04:55 joerg Exp $ | | 1 | # $NetBSD: builtin.mk,v 1.25 2010/02/23 10:55:07 drochner Exp $ |
2 | | | 2 | |
3 | BUILTIN_PKG:= ncurses | | 3 | BUILTIN_PKG:= ncurses |
4 | | | 4 | |
5 | BUILTIN_FIND_LIBS:= ncurses curses | | 5 | BUILTIN_FIND_LIBS:= ncurses curses terminfo |
6 | BUILTIN_FIND_FILES_VAR:= H_NCURSES H_CURSES | | 6 | BUILTIN_FIND_FILES_VAR:= H_NCURSES H_CURSES |
7 | BUILTIN_FIND_FILES.H_NCURSES= /usr/include/ncurses.h /usr/include/curses.h | | 7 | BUILTIN_FIND_FILES.H_NCURSES= /usr/include/ncurses.h /usr/include/curses.h |
8 | BUILTIN_FIND_GREP.H_NCURSES= \#define[ ]*NCURSES_VERSION | | 8 | BUILTIN_FIND_GREP.H_NCURSES= \#define[ ]*NCURSES_VERSION |
9 | BUILTIN_FIND_FILES.H_CURSES= /usr/include/ncurses.h /usr/include/curses.h | | 9 | BUILTIN_FIND_FILES.H_CURSES= /usr/include/ncurses.h /usr/include/curses.h |
10 | BUILTIN_FIND_GREP.H_CURSES= mvwchgat | | 10 | BUILTIN_FIND_GREP.H_CURSES= mvwchgat |
11 | | | 11 | |
12 | .include "../../mk/buildlink3/bsd.builtin.mk" | | 12 | .include "../../mk/buildlink3/bsd.builtin.mk" |
13 | | | 13 | |
14 | ### | | 14 | ### |
15 | ### Determine if there is a built-in implementation of the package and | | 15 | ### Determine if there is a built-in implementation of the package and |
16 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). | | 16 | ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). |
17 | ### | | 17 | ### |
18 | .if !defined(IS_BUILTIN.ncurses) | | 18 | .if !defined(IS_BUILTIN.ncurses) |
| @@ -96,26 +96,33 @@ MAKEVARS+= USE_BUILTIN.ncurses | | | @@ -96,26 +96,33 @@ MAKEVARS+= USE_BUILTIN.ncurses |
96 | # If USE_NCURSES is set to yes, the use of an ncurses implementation | | 96 | # If USE_NCURSES is set to yes, the use of an ncurses implementation |
97 | # is forced. | | 97 | # is forced. |
98 | # | | 98 | # |
99 | # If it is set to chgat, a curses implementation with chgat(3) support | | 99 | # If it is set to chgat, a curses implementation with chgat(3) support |
100 | # is considered good enough. | | 100 | # is considered good enough. |
101 | .if defined(USE_NCURSES) | | 101 | .if defined(USE_NCURSES) |
102 | . if empty(USE_NCURSES:M[yY][eE][sS]) && !empty(USE_NCURSES:Mchgat) &&\ | | 102 | . if empty(USE_NCURSES:M[yY][eE][sS]) && !empty(USE_NCURSES:Mchgat) &&\ |
103 | empty(H_CURSES:M__nonexistent__) | | 103 | empty(H_CURSES:M__nonexistent__) |
104 | . elif !empty(IS_BUILTIN.ncurses:M[nN][oO]) | | 104 | . elif !empty(IS_BUILTIN.ncurses:M[nN][oO]) |
105 | USE_BUILTIN.ncurses= no | | 105 | USE_BUILTIN.ncurses= no |
106 | . endif | | 106 | . endif |
107 | .endif | | 107 | .endif |
108 | | | 108 | |
| | | 109 | # if terminfo is needed and we don't have it, use pkgsrc ncurses |
| | | 110 | .if defined(USE_TERMINFO) |
| | | 111 | .if !empty(BUILTIN_LIB_FOUND.terminfo:M[nN][oO]) |
| | | 112 | USE_BUILTIN.ncurses= no |
| | | 113 | .endif |
| | | 114 | .endif |
| | | 115 | |
109 | # Define BUILTIN_LIBNAME.ncurses to be the base name of the built-in | | 116 | # Define BUILTIN_LIBNAME.ncurses to be the base name of the built-in |
110 | # ncurses library. | | 117 | # ncurses library. |
111 | # | | 118 | # |
112 | .if !empty(BUILTIN_LIB_FOUND.ncurses:M[yY][eE][sS]) | | 119 | .if !empty(BUILTIN_LIB_FOUND.ncurses:M[yY][eE][sS]) |
113 | BUILTIN_LIBNAME.ncurses= ncurses | | 120 | BUILTIN_LIBNAME.ncurses= ncurses |
114 | .elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) | | 121 | .elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) |
115 | BUILTIN_LIBNAME.ncurses= curses | | 122 | BUILTIN_LIBNAME.ncurses= curses |
116 | .endif | | 123 | .endif |
117 | # | | 124 | # |
118 | # On Interix, there is a libncurses.a and a libcurses.so but strangely, | | 125 | # On Interix, there is a libncurses.a and a libcurses.so but strangely, |
119 | # no libncurses.so. We want to link against the shared library, so | | 126 | # no libncurses.so. We want to link against the shared library, so |
120 | # turn "-lncurses" into "-lcurses". | | 127 | # turn "-lncurses" into "-lcurses". |
121 | # | | 128 | # |