Mon Jul 26 06:49:30 2010 UTC ()
The change in -r1.27 of this file failed to restore the old logic
completely; rectify that. Now setting USE_NCURSES=yes won't install
pkgsrc ncurses on e.g. Linux where it's really built in.

Not sure if a version bump is wanted, but since I just did one we'll
ride that.


(dholland)
diff -r1.27 -r1.28 pkgsrc/devel/ncurses/builtin.mk

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

--- pkgsrc/devel/ncurses/builtin.mk 2010/02/24 12:08:07 1.27
+++ pkgsrc/devel/ncurses/builtin.mk 2010/07/26 06:49:30 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: builtin.mk,v 1.27 2010/02/24 12:08:07 drochner Exp $ 1# $NetBSD: builtin.mk,v 1.28 2010/07/26 06:49:30 dholland 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 H_CURSES1 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 11BUILTIN_FIND_FILES.H_CURSES1= /usr/include/ncurses.h /usr/include/curses.h
12BUILTIN_FIND_GREP.H_CURSES1= wsyncup 12BUILTIN_FIND_GREP.H_CURSES1= wsyncup
13 13
14.include "../../mk/buildlink3/bsd.builtin.mk" 14.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -87,27 +87,28 @@ H_NCURSES= /usr/include/curses.h @@ -87,27 +87,28 @@ H_NCURSES= /usr/include/curses.h
87_INCOMPAT_CURSES?= NetBSD-0.*-* NetBSD-1.[0123]*-* \ 87_INCOMPAT_CURSES?= NetBSD-0.*-* NetBSD-1.[0123]*-* \
88 NetBSD-1.4.*-* NetBSD-1.4[A-X]-* 88 NetBSD-1.4.*-* NetBSD-1.4[A-X]-*
89. for _pattern_ in ${_INCOMPAT_CURSES} ${INCOMPAT_CURSES} 89. for _pattern_ in ${_INCOMPAT_CURSES} ${INCOMPAT_CURSES}
90. if !empty(MACHINE_PLATFORM:M${_pattern_}) 90. if !empty(MACHINE_PLATFORM:M${_pattern_})
91USE_BUILTIN.ncurses= no 91USE_BUILTIN.ncurses= no
92. endif 92. endif
93. endfor 93. endfor
94. endif # PREFER.ncurses 94. endif # PREFER.ncurses
95.endif 95.endif
96MAKEVARS+= USE_BUILTIN.ncurses 96MAKEVARS+= USE_BUILTIN.ncurses
97 97
98# 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
99# is forced. 99# is forced.
100.if defined(USE_NCURSES) && !empty(USE_NCURSES:M[yY][eE][sS]) 100.if defined(USE_NCURSES) && !empty(USE_NCURSES:M[yY][eE][sS]) \
 101 && !empty(IS_BUILTIN.ncurses:M[nN][oO])
101USE_BUILTIN.ncurses= no 102USE_BUILTIN.ncurses= no
102.endif 103.endif
103# If it is set to chgat, a curses implementation with chgat(3) support 104# If it is set to chgat, a curses implementation with chgat(3) support
104# is considered good enough. 105# is considered good enough.
105.if defined(USE_NCURSES) && empty(USE_NCURSES:M[yY][eE][sS]) 106.if defined(USE_NCURSES) && empty(USE_NCURSES:M[yY][eE][sS])
106. if !empty(USE_NCURSES:Mchgat) && !empty(H_CURSES:M__nonexistent__) 107. if !empty(USE_NCURSES:Mchgat) && !empty(H_CURSES:M__nonexistent__)
107USE_BUILTIN.ncurses= no 108USE_BUILTIN.ncurses= no
108. endif 109. endif
109# same for wsyncup(3) 110# same for wsyncup(3)
110. if !empty(USE_NCURSES:Mwsyncup) && !empty(H_CURSES1:M__nonexistent__) 111. if !empty(USE_NCURSES:Mwsyncup) && !empty(H_CURSES1:M__nonexistent__)
111USE_BUILTIN.ncurses= no 112USE_BUILTIN.ncurses= no
112. endif 113. endif
113.endif 114.endif