Tue Feb 23 19:50:49 2010 UTC ()
add another optional condition for curses suitability: support
of wsyncup


(drochner)
diff -r1.25 -r1.26 pkgsrc/devel/ncurses/builtin.mk

cvs diff -r1.25 -r1.26 pkgsrc/devel/ncurses/builtin.mk (expand / switch to unified diff)

--- pkgsrc/devel/ncurses/builtin.mk 2010/02/23 10:55:07 1.25
+++ pkgsrc/devel/ncurses/builtin.mk 2010/02/23 19:50:49 1.26
@@ -1,23 +1,25 @@ @@ -1,23 +1,25 @@
1# $NetBSD: builtin.mk,v 1.25 2010/02/23 10:55:07 drochner Exp $ 1# $NetBSD: builtin.mk,v 1.26 2010/02/23 19:50:49 drochner Exp $
2 2
3BUILTIN_PKG:= ncurses 3BUILTIN_PKG:= ncurses
4 4
5BUILTIN_FIND_LIBS:= ncurses curses terminfo 5BUILTIN_FIND_LIBS:= ncurses curses terminfo
6BUILTIN_FIND_FILES_VAR:= H_NCURSES H_CURSES 6BUILTIN_FIND_FILES_VAR:= H_NCURSES H_CURSES H_CURSES1
7BUILTIN_FIND_FILES.H_NCURSES= /usr/include/ncurses.h /usr/include/curses.h 7BUILTIN_FIND_FILES.H_NCURSES= /usr/include/ncurses.h /usr/include/curses.h
8BUILTIN_FIND_GREP.H_NCURSES= \#define[ ]*NCURSES_VERSION 8BUILTIN_FIND_GREP.H_NCURSES= \#define[ ]*NCURSES_VERSION
9BUILTIN_FIND_FILES.H_CURSES= /usr/include/ncurses.h /usr/include/curses.h 9BUILTIN_FIND_FILES.H_CURSES= /usr/include/ncurses.h /usr/include/curses.h
10BUILTIN_FIND_GREP.H_CURSES= mvwchgat 10BUILTIN_FIND_GREP.H_CURSES= mvwchgat
 11BUILTIN_FIND_FILES.H_CURSES1= /usr/include/ncurses.h /usr/include/curses.h
 12BUILTIN_FIND_GREP.H_CURSES1= wsyncup
11 13
12.include "../../mk/buildlink3/bsd.builtin.mk" 14.include "../../mk/buildlink3/bsd.builtin.mk"
13 15
14### 16###
15### Determine if there is a built-in implementation of the package and 17### Determine if there is a built-in implementation of the package and
16### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 18### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
17### 19###
18.if !defined(IS_BUILTIN.ncurses) 20.if !defined(IS_BUILTIN.ncurses)
19IS_BUILTIN.ncurses= no 21IS_BUILTIN.ncurses= no
20. if empty(H_NCURSES:M__nonexistent__) && \ 22. if empty(H_NCURSES:M__nonexistent__) && \
21 empty(H_NCURSES:M${LOCALBASE}/*) && \ 23 empty(H_NCURSES:M${LOCALBASE}/*) && \
22 (!empty(BUILTIN_LIB_FOUND.ncurses:M[yY][eE][sS]) || \ 24 (!empty(BUILTIN_LIB_FOUND.ncurses:M[yY][eE][sS]) || \
23 !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])) 25 !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]))
@@ -88,30 +90,31 @@ _INCOMPAT_CURSES?= NetBSD-0.*-* NetBSD-1 @@ -88,30 +90,31 @@ _INCOMPAT_CURSES?= NetBSD-0.*-* NetBSD-1
88. if !empty(MACHINE_PLATFORM:M${_pattern_}) 90. if !empty(MACHINE_PLATFORM:M${_pattern_})
89USE_BUILTIN.ncurses= no 91USE_BUILTIN.ncurses= no
90. endif 92. endif
91. endfor 93. endfor
92. endif # PREFER.ncurses 94. endif # PREFER.ncurses
93.endif 95.endif
94MAKEVARS+= USE_BUILTIN.ncurses 96MAKEVARS+= USE_BUILTIN.ncurses
95 97
96# If USE_NCURSES is set to yes, the use of an ncurses implementation 98# If USE_NCURSES is set to yes, the use of an ncurses implementation
97# is forced. 99# is forced.
98# 100#
99# If it is set to chgat, a curses implementation with chgat(3) support 101# If it is set to chgat, a curses implementation with chgat(3) support
100# is considered good enough. 102# is considered good enough.
101.if defined(USE_NCURSES) 103.if defined(USE_NCURSES) && empty(USE_NCURSES:M[yY][eE][sS])
102. if empty(USE_NCURSES:M[yY][eE][sS]) && !empty(USE_NCURSES:Mchgat) &&\ 104. if !empty(USE_NCURSES:Mchgat) && !empty(H_CURSES:M__nonexistent__)
103 empty(H_CURSES:M__nonexistent__) 105USE_BUILTIN.ncurses= no
104. elif !empty(IS_BUILTIN.ncurses:M[nN][oO]) 106. endif
 107. if !empty(USE_NCURSES:Mwsyncup) && !empty(H_CURSES1:M__nonexistent__)
105USE_BUILTIN.ncurses= no 108USE_BUILTIN.ncurses= no
106. endif 109. endif
107.endif 110.endif
108 111
109# if terminfo is needed and we don't have it, use pkgsrc ncurses 112# if terminfo is needed and we don't have it, use pkgsrc ncurses
110.if defined(USE_TERMINFO) 113.if defined(USE_TERMINFO)
111.if !empty(BUILTIN_LIB_FOUND.terminfo:M[nN][oO]) 114.if !empty(BUILTIN_LIB_FOUND.terminfo:M[nN][oO])
112USE_BUILTIN.ncurses= no 115USE_BUILTIN.ncurses= no
113.endif 116.endif
114.endif 117.endif
115 118
116# Define BUILTIN_LIBNAME.ncurses to be the base name of the built-in 119# Define BUILTIN_LIBNAME.ncurses to be the base name of the built-in
117# ncurses library. 120# ncurses library.