Fri Feb 29 16:14:09 2008 UTC ()
+ Always ensure that BUILTIN_LIBNAME.ncurses is defined (this should have
  been the case before, but wasn't due to a missing default vaule.

+ Move the BUILDLINK_TRANSFORM remapping of -lncurses into the section
  which only applies if we're using the built-in ncurses, and map it to
  -l${BUILTIN_LIBNAME.ncurses}.

This should fix the issue reported for Mac OS X where "-lncurses" was
being mapped to nothing by the wrapper scripts.


(jlam)
diff -r1.21 -r1.22 pkgsrc/devel/ncurses/builtin.mk

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

--- pkgsrc/devel/ncurses/builtin.mk 2008/02/29 16:04:55 1.21
+++ pkgsrc/devel/ncurses/builtin.mk 2008/02/29 16:14:09 1.22
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: builtin.mk,v 1.21 2008/02/29 16:04:55 tron Exp $ 1# $NetBSD: builtin.mk,v 1.22 2008/02/29 16:14:09 jlam Exp $
2 2
3BUILTIN_PKG:= ncurses 3BUILTIN_PKG:= ncurses
4 4
5BUILTIN_FIND_LIBS:= ncurses curses 5BUILTIN_FIND_LIBS:= ncurses curses
6BUILTIN_FIND_FILES_VAR:= H_NCURSES 6BUILTIN_FIND_FILES_VAR:= H_NCURSES
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
9 9
10.include "../../mk/buildlink3/bsd.builtin.mk" 10.include "../../mk/buildlink3/bsd.builtin.mk"
11 11
12### 12###
13### Determine if there is a built-in implementation of the package and 13### Determine if there is a built-in implementation of the package and
14### set IS_BUILTIN.<pkg> appropriately ("yes" or "no"). 14### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
@@ -93,50 +93,51 @@ MAKEVARS+= USE_BUILTIN.ncurses @@ -93,50 +93,51 @@ MAKEVARS+= USE_BUILTIN.ncurses
93 93
94# If USE_NCURSES is defined, then force the use of an ncurses 94# If USE_NCURSES is defined, then force the use of an ncurses
95# implementation. 95# implementation.
96# 96#
97.if defined(USE_NCURSES) 97.if defined(USE_NCURSES)
98. if !empty(IS_BUILTIN.ncurses:M[nN][oO]) 98. if !empty(IS_BUILTIN.ncurses:M[nN][oO])
99USE_BUILTIN.ncurses= no 99USE_BUILTIN.ncurses= no
100. endif 100. endif
101.endif 101.endif
102 102
103# Define BUILTIN_LIBNAME.ncurses to be the base name of the built-in 103# Define BUILTIN_LIBNAME.ncurses to be the base name of the built-in
104# ncurses library. 104# ncurses library.
105# 105#
 106BUILTIN_LIBNAME.ncurses= ncurses
106.if !empty(BUILTIN_LIB_FOUND.ncurses:M[nN][oO]) && \ 107.if !empty(BUILTIN_LIB_FOUND.ncurses:M[nN][oO]) && \
107 !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) 108 !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
108BUILTIN_LIBNAME.ncurses= curses 109BUILTIN_LIBNAME.ncurses= curses
109.endif 110.endif
110# 111#
111# On Interix, there is a libncurses.a and a libcurses.so but strangely, 112# On Interix, there is a libncurses.a and a libcurses.so but strangely,
112# no libncurses.so. We want to link against the shared library, so 113# no libncurses.so. We want to link against the shared library, so
113# turn "-lncurses" into "-lcurses". 114# turn "-lncurses" into "-lcurses".
114# 115#
115.if (${OPSYS} == "Interix") && \ 116.if (${OPSYS} == "Interix") && \
116 !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) 117 !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS])
117BUILTIN_LIBNAME.ncurses= curses 118BUILTIN_LIBNAME.ncurses= curses
118.endif 119.endif
119 120
120### 121###
121### The section below only applies if we are not including this file 122### The section below only applies if we are not including this file
122### solely to determine whether a built-in implementation exists. 123### solely to determine whether a built-in implementation exists.
123### 124###
124CHECK_BUILTIN.ncurses?= no 125CHECK_BUILTIN.ncurses?= no
125.if !empty(CHECK_BUILTIN.ncurses:M[nN][oO]) 126.if !empty(CHECK_BUILTIN.ncurses:M[nN][oO])
126 127
127BUILDLINK_TRANSFORM+= l:ncurses:${BUILDLINK_LIBNAME.ncurses} 
128. if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS]) 128. if !empty(USE_BUILTIN.ncurses:M[yY][eE][sS])
129BUILDLINK_LIBNAME.ncurses= ${BUILTIN_LIBNAME.ncurses} 129BUILDLINK_LIBNAME.ncurses= ${BUILTIN_LIBNAME.ncurses}
 130BUILDLINK_TRANSFORM+= l:ncurses:${BUILTIN_LIBNAME.ncurses}
130BUILDLINK_TARGETS+= buildlink-curses-ncurses-h 131BUILDLINK_TARGETS+= buildlink-curses-ncurses-h
131BUILDLINK_TARGETS+= buildlink-ncurses-extra-includes 132BUILDLINK_TARGETS+= buildlink-ncurses-extra-includes
132. endif 133. endif
133 134
134# A full ncurses implementation provides more headers than some curses 135# A full ncurses implementation provides more headers than some curses
135# implementations. Touch empty replacements for those headers so that 136# implementations. Touch empty replacements for those headers so that
136# packages can continue to use the familiar ncurses header names. 137# packages can continue to use the familiar ncurses header names.
137# 138#
138. if !target(buildlink-ncurses-extra-includes) 139. if !target(buildlink-ncurses-extra-includes)
139.PHONY: buildlink-ncurses-extra-includes 140.PHONY: buildlink-ncurses-extra-includes
140buildlink-ncurses-extra-includes: 141buildlink-ncurses-extra-includes:
141 ${RUN} \ 142 ${RUN} \
142 extra_includes="include/term.h"; \ 143 extra_includes="include/term.h"; \