Tue Feb 23 10:55:07 2010 UTC ()
if terminfo is needed and we don't have it, use pkgsrc ncurses


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

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

--- pkgsrc/devel/ncurses/builtin.mk 2009/07/07 11:04:55 1.24
+++ pkgsrc/devel/ncurses/builtin.mk 2010/02/23 10:55:07 1.25
@@ -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
3BUILTIN_PKG:= ncurses 3BUILTIN_PKG:= ncurses
4 4
5BUILTIN_FIND_LIBS:= ncurses curses 5BUILTIN_FIND_LIBS:= ncurses curses terminfo
6BUILTIN_FIND_FILES_VAR:= H_NCURSES H_CURSES 6BUILTIN_FIND_FILES_VAR:= H_NCURSES H_CURSES
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
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])
105USE_BUILTIN.ncurses= no 105USE_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])
 112USE_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])
113BUILTIN_LIBNAME.ncurses= ncurses 120BUILTIN_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])
115BUILTIN_LIBNAME.ncurses= curses 122BUILTIN_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#