summaryrefslogtreecommitdiff
path: root/devel/ncurses/buildlink3.mk
diff options
context:
space:
mode:
Diffstat (limited to 'devel/ncurses/buildlink3.mk')
-rw-r--r--devel/ncurses/buildlink3.mk80
1 files changed, 40 insertions, 40 deletions
diff --git a/devel/ncurses/buildlink3.mk b/devel/ncurses/buildlink3.mk
index a50c9b6b663..d3f3df47188 100644
--- a/devel/ncurses/buildlink3.mk
+++ b/devel/ncurses/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.16 2004/02/11 11:30:50 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.17 2004/02/12 01:59:37 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
NCURSES_BUILDLINK3_MK:= ${NCURSES_BUILDLINK3_MK}+
@@ -30,25 +30,54 @@ BUILDLINK_IS_BUILTIN.ncurses= NO
. if ${_BLNK_LIBNCURSES_FOUND} == "YES"
BUILDLINK_IS_BUILTIN.ncurses= YES
. elif exists(${_NCURSES_H})
-BUILDLINK_IS_BUILTIN.ncurses!= \
+_IS_BUILTIN.ncurses!= \
if ${GREP} -q "\#define[ ]*NCURSES_VERSION" ${_NCURSES_H}; then \
${ECHO} "YES"; \
else \
${ECHO} "NO"; \
fi
+BUILDLINK_IS_BUILTIN.ncurses= ${_IS_BUILTIN.ncurses}
+. if !empty(BUILDLINK_CHECK_BUILTIN.ncurses:M[nN][oO]) && \
+ !empty(_IS_BUILTIN.ncurses:M[yY][eE][sS])
+#
+# Create an appropriate name for the built-in package distributed
+# with the system. This package name can be used to check against
+# BUILDLINK_DEPENDS.<pkg> to see if we need to install the pkgsrc
+# version or if the built-in one is sufficient.
+#
+_NCURSES_VERSION!= \
+ ${AWK} '/\#define[ ]*NCURSES_VERSION[ ]/ { \
+ vers = $$3; \
+ gsub("\"", "", vers); \
+ print vers; \
+ } \
+ ' ${_NCURSES_H}
+_NCURSES_PKG= ncurses-${_NCURSES_VERSION}
+BUILDLINK_IS_BUILTIN.ncurses= YES
+. for _depend_ in ${BUILDLINK_DEPENDS.ncurses}
+. if !empty(BUILDLINK_IS_BUILTIN.ncurses:M[yY][eE][sS])
+BUILDLINK_IS_BUILTIN.ncurses!= \
+ if ${PKG_ADMIN} pmatch '${_depend_}' ${_NCURSES_PKG}; then \
+ ${ECHO} "YES"; \
+ else \
+ ${ECHO} "NO"; \
+ fi
+. endif
+. endfor
+. endif
. endif
#
-# XXX By default, assume that the builtin curses on NetBSD systems
+# XXX By default, assume that the native curses on NetBSD systems
# XXX supports ncurses.
#
. if ${OPSYS} == "NetBSD"
-BUILDLINK_USE_BUILTIN.ncurses= YES
+BUILDLINK_IS_BUILTIN.ncurses= YES
#
# These versions of NetBSD didn't have a curses library that was
# capable of replacing ncurses.
#
# XXX In reality, no version of NetBSD has a curses library that can
-# XXX completely replace ncurses; however, some version implement
+# XXX completely replace ncurses; however, some versions implement
# XXX enough of ncurses that some packages are happy.
#
_INCOMPAT_CURSES= NetBSD-0.*-* NetBSD-1.[0123]*-*
@@ -62,6 +91,12 @@ BUILDLINK_IS_BUILTIN.ncurses= NO
MAKEFLAGS+= BUILDLINK_IS_BUILTIN.ncurses=${BUILDLINK_IS_BUILTIN.ncurses}
.endif
+.if !empty(BUILDLINK_IS_BUILTIN.ncurses:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.ncurses= YES
+.else
+BUILDLINK_USE_BUILTIN.ncurses= NO
+.endif
+
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
!empty(PREFER_PKGSRC:Mncurses)
BUILDLINK_USE_BUILTIN.ncurses= NO
@@ -75,41 +110,6 @@ BUILDLINK_USE_BUILTIN.ncurses= NO
BUILDLINK_USE_BUILTIN.ncurses= YES
.endif
-.if !defined(BUILDLINK_USE_BUILTIN.ncurses)
-. if !empty(BUILDLINK_IS_BUILTIN.ncurses:M[nN][oO])
-BUILDLINK_USE_BUILTIN.ncurses= NO
-. else
-BUILDLINK_USE_BUILTIN.ncurses= YES
-#
-# Create an appropriate name for the built-in package distributed
-# with the system. This package name can be used to check against
-# BUILDLINK_DEPENDS.<pkg> to see if we need to install the pkgsrc
-# version or if the built-in one is sufficient.
-#
-_NCURSES_VERSION!= \
- ${AWK} '/\#define[ ]*NCURSES_VERSION[ ]/ { \
- vers = $$3; \
- gsub("\"", "", vers); \
- print vers; \
- } \
- ' ${_NCURSES_H}
-_NCURSES_PKG= ncurses-${_NCURSES_VERSION}
-BUILDLINK_USE_BUILTIN.ncurses?= YES
-. for _depend_ in ${BUILDLINK_DEPENDS.ncurses}
-. if !empty(BUILDLINK_USE_BUILTIN.ncurses:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.ncurses!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${_NCURSES_PKG}; then \
- ${ECHO} "YES"; \
- else \
- ${ECHO} "NO"; \
- fi
-. endif
-. endfor
-. endif
-MAKEFLAGS+= \
- BUILDLINK_USE_BUILTIN.ncurses=${BUILDLINK_USE_BUILTIN.ncurses}
-.endif
-
.if !empty(BUILDLINK_USE_BUILTIN.ncurses:M[nN][oO])
. if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= ncurses