Fri Feb 29 19:23:07 2008 UTC ()
Provide value for BUILDLINK_LDADD.ncursesw that can be used by packages
that need to know how to link against ncursesw.


(jlam)
diff -r1.2 -r1.3 pkgsrc/devel/ncursesw/buildlink3.mk
diff -r1.6 -r1.7 pkgsrc/devel/ncursesw/builtin.mk

cvs diff -r1.2 -r1.3 pkgsrc/devel/ncursesw/buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/devel/ncursesw/buildlink3.mk 2008/02/20 17:17:46 1.2
+++ pkgsrc/devel/ncursesw/buildlink3.mk 2008/02/29 19:23:07 1.3
@@ -1,22 +1,25 @@ @@ -1,22 +1,25 @@
1# $NetBSD: buildlink3.mk,v 1.2 2008/02/20 17:17:46 jlam Exp $ 1# $NetBSD: buildlink3.mk,v 1.3 2008/02/29 19:23:07 jlam Exp $
2 2
3BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ 3BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
4NCURSESW_BUILDLINK3_MK:=${NCURSESW_BUILDLINK3_MK}+ 4NCURSESW_BUILDLINK3_MK:=${NCURSESW_BUILDLINK3_MK}+
5 5
6.if !empty(BUILDLINK_DEPTH:M+) 6.if !empty(BUILDLINK_DEPTH:M+)
7BUILDLINK_DEPENDS+= ncursesw 7BUILDLINK_DEPENDS+= ncursesw
8.endif 8.endif
9 9
10BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nncursesw} 10BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nncursesw}
11BUILDLINK_PACKAGES+= ncursesw 11BUILDLINK_PACKAGES+= ncursesw
12BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}ncursesw 12BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}ncursesw
13 13
14.if !empty(NCURSESW_BUILDLINK3_MK:M+) 14.if !empty(NCURSESW_BUILDLINK3_MK:M+)
15BUILDLINK_API_DEPENDS.ncursesw+= ncursesw>=5.5 15BUILDLINK_API_DEPENDS.ncursesw+= ncursesw>=5.5
16BUILDLINK_ABI_DEPENDS.ncursesw+= ncursesw>=5.5 16BUILDLINK_ABI_DEPENDS.ncursesw+= ncursesw>=5.5
17BUILDLINK_PKGSRCDIR.ncursesw?= ../../devel/ncursesw 17BUILDLINK_PKGSRCDIR.ncursesw?= ../../devel/ncursesw
 18
 19BUILDLINK_LIBNAME.ncursesw= ncursesw
 20BUILDLINK_LDADD.ncursesw= ${BUILDLINK_LIBNAME.ncursesw:S/^/-l/:S/^-l$//}
18.endif # NCURSESW_BUILDLINK3_MK 21.endif # NCURSESW_BUILDLINK3_MK
19 22
20.include "../../devel/ncurses/buildlink3.mk" 23.include "../../devel/ncurses/buildlink3.mk"
21 24
22BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} 25BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}

cvs diff -r1.6 -r1.7 pkgsrc/devel/ncursesw/builtin.mk (expand / switch to unified diff)

--- pkgsrc/devel/ncursesw/builtin.mk 2008/02/22 13:48:21 1.6
+++ pkgsrc/devel/ncursesw/builtin.mk 2008/02/29 19:23:07 1.7
@@ -1,23 +1,23 @@ @@ -1,23 +1,23 @@
1# $NetBSD: builtin.mk,v 1.6 2008/02/22 13:48:21 tron Exp $ 1# $NetBSD: builtin.mk,v 1.7 2008/02/29 19:23:07 jlam Exp $
2 2
3BUILTIN_PKG:= ncursesw 3BUILTIN_PKG:= ncursesw
4 4
5# H_NB_CURSESW searches for NetBSD's <curses.h> that uses HAVE_WCHAR to 5# H_NB_CURSESW searches for NetBSD's <curses.h> that uses HAVE_WCHAR to
6# build with wide curses support. 6# build with wide curses support.
7# 7#
8# XXX Need to deal with Solaris <curses.h> 8# XXX Need to deal with Solaris <curses.h>
9# 9#
10BUILTIN_FIND_LIBS:= ncursesw 10BUILTIN_FIND_LIBS:= ncursesw curses
11BUILTIN_FIND_FILES_VAR:= H_NB_CURSESW H_NCURSESW 11BUILTIN_FIND_FILES_VAR:= H_NB_CURSESW H_NCURSESW
12BUILTIN_FIND_FILES.H_NB_CURSESW= /usr/include/curses.h 12BUILTIN_FIND_FILES.H_NB_CURSESW= /usr/include/curses.h
13BUILTIN_FIND_GREP.H_NB_CURSESW= \#ifdef[ ]*HAVE_WCHAR 13BUILTIN_FIND_GREP.H_NB_CURSESW= \#ifdef[ ]*HAVE_WCHAR
14BUILTIN_FIND_FILES.H_NCURSESW= /usr/include/ncursesw/curses.h \ 14BUILTIN_FIND_FILES.H_NCURSESW= /usr/include/ncursesw/curses.h \
15 /usr/include/curses.h 15 /usr/include/curses.h
16BUILTIN_FIND_GREP.H_NCURSESW= \Id: curses.wide,v 16BUILTIN_FIND_GREP.H_NCURSESW= \Id: curses.wide,v
17 17
18.include "../../mk/buildlink3/bsd.builtin.mk" 18.include "../../mk/buildlink3/bsd.builtin.mk"
19 19
20### 20###
21### Determine if there is a built-in implementation of the package and 21### Determine if there is a built-in implementation of the package and
22### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 22### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
23### 23###
@@ -84,37 +84,45 @@ USE_BUILTIN.ncursesw!= \ @@ -84,37 +84,45 @@ USE_BUILTIN.ncursesw!= \
84USE_BUILTIN.ncursesw= yes 84USE_BUILTIN.ncursesw= yes
85. endif 85. endif
86. endif # PREFER.ncursesw 86. endif # PREFER.ncursesw
87.endif 87.endif
88MAKEVARS+= USE_BUILTIN.ncursesw 88MAKEVARS+= USE_BUILTIN.ncursesw
89 89
90# If USE_NCURSES is defined, then only use the built-in "ncursesw" 90# If USE_NCURSES is defined, then only use the built-in "ncursesw"
91# if it's *actually* ncursesw. 91# if it's *actually* ncursesw.
92# 92#
93.if defined(USE_NCURSES) && !empty(IS_BUILTIN.ncursesw:M[nN][oO]) 93.if defined(USE_NCURSES) && !empty(IS_BUILTIN.ncursesw:M[nN][oO])
94USE_BUILTIN.ncursesw= no 94USE_BUILTIN.ncursesw= no
95.endif 95.endif
96 96
 97# Define BUILTIN_LIBNAME.ncursesw to be the base name of the built-in
 98# ncursesw library.
 99#
 100.if !empty(BUILTIN_LIB_FOUND.ncursesw:M[yY][eE][sS])
 101BUILTIN_LIBNAME.ncursesw= ncursesw
 102.elif !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
 103BUILTIN_LIBNAME.ncursesw= curses
 104.endif
 105
97### 106###
98### The section below only applies if we are not including this file 107### The section below only applies if we are not including this file
99### solely to determine whether a built-in implementation exists. 108### solely to determine whether a built-in implementation exists.
100### 109###
101CHECK_BUILTIN.ncursesw?= no 110CHECK_BUILTIN.ncursesw?= no
102.if !empty(CHECK_BUILTIN.ncursesw:M[nN][oO]) 111.if !empty(CHECK_BUILTIN.ncursesw:M[nN][oO])
103 112
104. if !empty(USE_BUILTIN.ncursesw:M[yY][eE][sS]) 113. if !empty(USE_BUILTIN.ncursesw:M[yY][eE][sS])
105. if !empty(BUILTIN_LIB_FOUND.ncursesw:M[nN][oO]) 114BUILDLINK_LIBNAME.ncursesw= ${BUILTIN_LIBNAME.ncursesw}
106BUILDLINK_TRANSFORM+= l:ncursesw:curses 115BUILDLINK_TRANSFORM+= l:ncursesw:${BUILTIN_LIBNAME.ncursesw}
107. endif 
108. if empty(H_NB_CURSESW:M__nonexistent__) && \ 116. if empty(H_NB_CURSESW:M__nonexistent__) && \
109 empty(H_NB_CURSESW:M${LOCALBASE}/*) 117 empty(H_NB_CURSESW:M${LOCALBASE}/*)
110BUILDLINK_CPPFLAGS.ncursesw+= -DHAVE_WCHAR=1 118BUILDLINK_CPPFLAGS.ncursesw+= -DHAVE_WCHAR=1
111. endif 119. endif
112. endif 120. endif
113 121
114# According to the ncurses(3) manual page, applications that want to use 122# According to the ncurses(3) manual page, applications that want to use
115# the wide curses definitions need to define _XOPEN_SOURCE_EXTENDED. 123# the wide curses definitions need to define _XOPEN_SOURCE_EXTENDED.
116# 124#
117. if !empty(USE_BUILTIN.ncursesw:M[nN][oO]) || \ 125. if !empty(USE_BUILTIN.ncursesw:M[nN][oO]) || \
118 (!empty(USE_BUILTIN.ncursesw:M[yY][eE][sS]) && \ 126 (!empty(USE_BUILTIN.ncursesw:M[yY][eE][sS]) && \
119 !empty(IS_BUILTIN.ncursesw:M[yY][eE][sS])) 127 !empty(IS_BUILTIN.ncursesw:M[yY][eE][sS]))
120USE_NCURSES= yes 128USE_NCURSES= yes