summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjlam <jlam>2004-02-12 01:59:37 +0000
committerjlam <jlam>2004-02-12 01:59:37 +0000
commitd1197e2dbd26577a4d276890bc662b2a7f93e572 (patch)
treef36bdf155011b2521ad9dfd8a23373398462d265 /devel
parent2645f9642e2b6553e699f80dbfe9905e21c03d99 (diff)
downloadpkgsrc-d1197e2dbd26577a4d276890bc662b2a7f93e572.tar.gz
Reorganize code so that any dependencies are checked as part of deciding
whether the software is built-in or not. This facilitates implementing the forthcoming PKGSRC_NATIVE variable.
Diffstat (limited to 'devel')
-rw-r--r--devel/binutils/buildlink2.mk28
-rw-r--r--devel/binutils/buildlink3.mk27
-rw-r--r--devel/cdk/buildlink2.mk20
-rw-r--r--devel/gettext-lib/buildlink2.mk51
-rw-r--r--devel/gettext-lib/buildlink3.mk57
-rw-r--r--devel/libevent/buildlink2.mk8
-rw-r--r--devel/ncurses/buildlink2.mk76
-rw-r--r--devel/ncurses/buildlink3.mk80
-rw-r--r--devel/readline/buildlink2.mk37
-rw-r--r--devel/readline/buildlink3.mk27
-rw-r--r--devel/zlib/buildlink2.mk39
-rw-r--r--devel/zlib/buildlink3.mk70
12 files changed, 279 insertions, 241 deletions
diff --git a/devel/binutils/buildlink2.mk b/devel/binutils/buildlink2.mk
index 557209477f9..a4e80734cc5 100644
--- a/devel/binutils/buildlink2.mk
+++ b/devel/binutils/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.13 2004/02/05 07:17:14 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.14 2004/02/12 01:59:37 jlam Exp $
.if !defined(BINUTILS_BUILDLINK2_MK)
BINUTILS_BUILDLINK2_MK= # defined
@@ -9,11 +9,6 @@ BUILDLINK_DEPENDS.binutils?= binutils>=2.14.0
BUILDLINK_PKGSRCDIR.binutils?= ../../devel/binutils
BUILDLINK_DEPMETHOD.binutils?= build
-.if defined(USE_BINUTILS)
-_NEED_BINUTILS= YES
-.else
-_NEED_BINUTILS= NO
-#
# These versions of NetBSD didn't have a toolchain that could be used in
# place of modern binutils and will need this package
#
@@ -23,12 +18,17 @@ _INCOMPAT_BINUTILS+= NetBSD-1.5.*-* NetBSD-1.5[A-X]-*
# XXX: _INCOMPAT_BINUTILS settings for other operating systems possibly
# XXX: needed here
#
-INCOMPAT_BINUTILS?= # empty
-. for _pattern_ in ${_INCOMPAT_BINUTILS} ${INCOMPAT_BINUTILS}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
-_NEED_BINUTILS= YES
-. endif
-. endfor
+_BUILTIN_BINUTILS= YES
+.for _pattern_ in ${_INCOMPAT_BINUTILS} ${INCOMPAT_BINUTILS}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_BUILTIN_BINUTILS= NO
+. endif
+.endfor
+
+.if ${_BUILTIN_BINUTILS} == "YES"
+_NEED_BINUTILS= NO
+.else
+_NEED_BINUTILS= YES
.endif
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
@@ -36,6 +36,10 @@ _NEED_BINUTILS= YES
_NEED_BINUTILS= YES
.endif
+.if defined(USE_BINUTILS)
+_NEED_BINUTILS= YES
+.endif
+
.if ${_NEED_BINUTILS} == "YES"
BUILDLINK_PACKAGES+= binutils
BUILDLINK_PREFIX.binutils= ${LOCALBASE}
diff --git a/devel/binutils/buildlink3.mk b/devel/binutils/buildlink3.mk
index f8e98e9fdbd..4dd4af7b804 100644
--- a/devel/binutils/buildlink3.mk
+++ b/devel/binutils/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.10 2004/02/11 11:30:49 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.11 2004/02/12 01:59:37 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
BINUTILS_BUILDLINK3_MK:= ${BINUTILS_BUILDLINK3_MK}+
@@ -16,6 +16,7 @@ BUILDLINK_CHECK_BUILTIN.binutils?= NO
.if !defined(BUILDLINK_IS_BUILTIN.binutils)
BUILDLINK_IS_BUILTIN.binutils= YES
+. if !empty(BUILDLINK_CHECK_BUILTIN.binutils:M[nN][oO])
#
# These versions of NetBSD didn't have a toolchain that was capable of
# replacing binutils.
@@ -27,14 +28,21 @@ _INCOMPAT_BINUTILS+= NetBSD-1.5.*-* NetBSD-1.5[A-X]-*
# XXX: needed here
#
INCOMPAT_BINUTILS?= # empty
-. for _pattern_ in ${_INCOMPAT_BINUTILS} ${INCOMPAT_BINUTILS}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
+. for _pattern_ in ${_INCOMPAT_BINUTILS} ${INCOMPAT_BINUTILS}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
BUILDLINK_IS_BUILTIN.binutils= NO
-. endif
-. endfor
+. endif
+. endfor
+. endif
MAKEFLAGS+= BUILDLINK_IS_BUILTIN.binutils=${BUILDLINK_IS_BUILTIN.binutils}
.endif
+.if !empty(BUILDLINK_IS_BUILTIN.binutils:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.binutils= YES
+.else
+BUILDLINK_USE_BUILTIN.binutils= NO
+.endif
+
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
!empty(PREFER_PKGSRC:Mbinutils)
BUILDLINK_USE_BUILTIN.binutils= NO
@@ -48,15 +56,6 @@ BUILDLINK_USE_BUILTIN.binutils= NO
BUILDLINK_USE_BUILTIN.binutils= YES
.endif
-.if !defined(BUILDLINK_USE_BUILTIN.binutils)
-. if !empty(BUILDLINK_IS_BUILTIN.binutils:M[nN][oO])
-BUILDLINK_USE_BUILTIN.binutils= NO
-. else
-BUILDLINK_USE_BUILTIN.binutils= YES
-. endif
-MAKEFLAGS+= BUILDLINK_USE_BUILTIN.binutils=${BUILDLINK_USE_BUILTIN.binutils}
-.endif
-
.if !empty(BUILDLINK_USE_BUILTIN.binutils:M[nN][oO])
. if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= binutils
diff --git a/devel/cdk/buildlink2.mk b/devel/cdk/buildlink2.mk
index 7277eee1aaf..458a25bc3f0 100644
--- a/devel/cdk/buildlink2.mk
+++ b/devel/cdk/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.8 2004/02/05 07:17:15 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.9 2004/02/12 01:59:37 jlam Exp $
.if !defined(CDK_BUILDLINK2_MK)
CDK_BUILDLINK2_MK= # defined
@@ -8,12 +8,16 @@ CDK_BUILDLINK2_MK= # defined
BUILDLINK_DEPENDS.cdk?= cdk>=4.9.9nb1
BUILDLINK_PKGSRCDIR.cdk?= ../../devel/cdk
-.if defined(USE_CDK)
-_NEED_CDK= YES
-.elif exists(/usr/include/cdk/cdk.h)
-_NEED_CDK= NO
+.if exists(/usr/include/cdk/cdk.h)
+_BUILTIN_CDK= YES
.else
-_NEED_CDK= YES
+_BUILTIN_CDK= NO
+.endif
+
+.if ${_BUILTIN_CDK} == "YES"
+_NEED_CDK= NO
+.else
+_NEED_CDK= YES
.endif
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
@@ -21,6 +25,10 @@ _NEED_CDK= YES
_NEED_CDK= YES
.endif
+.if defined(USE_CDK)
+_NEED_CDK= YES
+.endif
+
.if ${_NEED_CDK} == "YES"
BUILDLINK_PACKAGES+= cdk
EVAL_PREFIX+= BUILDLINK_PREFIX.cdk=cdk
diff --git a/devel/gettext-lib/buildlink2.mk b/devel/gettext-lib/buildlink2.mk
index 729953a4d93..07592619993 100644
--- a/devel/gettext-lib/buildlink2.mk
+++ b/devel/gettext-lib/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.28 2004/02/05 07:17:14 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.29 2004/02/12 01:59:37 jlam Exp $
.if !defined(GETTEXT_BUILDLINK2_MK)
GETTEXT_BUILDLINK2_MK= # defined
@@ -8,42 +8,43 @@ GETTEXT_BUILDLINK2_MK= # defined
BUILDLINK_DEPENDS.gettext?= gettext-lib>=0.10.35nb1
BUILDLINK_PKGSRCDIR.gettext?= ../../devel/gettext-lib
-.if defined(USE_GNU_GETTEXT)
-_NEED_GNU_GETTEXT= YES
-_BLNK_LIBINTL_FOUND= NO
-.else
-_BLNK_LIBINTL_LIST!= ${ECHO} /usr/lib/libintl.*
-. if ${_BLNK_LIBINTL_LIST} != "/usr/lib/libintl.*"
-_BLNK_LIBINTL_FOUND= YES
-. else
-_BLNK_LIBINTL_FOUND= NO
-. endif
-. if exists(/usr/include/libintl.h)
+.if exists(/usr/include/libintl.h)
#
# Consider the base system libintl to be gettext-lib-0.10.35nb1.
#
_GETTEXT_PKG= gettext-lib-0.10.35nb1
_GETTEXT_DEPENDS= ${BUILDLINK_DEPENDS.gettext}
-_NEED_GNU_GETTEXT!= \
+_BUILTIN_GETTEXT!= \
if ${PKG_ADMIN} pmatch '${_GETTEXT_DEPENDS}' ${_GETTEXT_PKG}; then \
- ${ECHO} "NO"; \
- else \
${ECHO} "YES"; \
+ else \
+ ${ECHO} "NO"; \
fi
+_BLNK_LIBINTL_LIST!= ${ECHO} /usr/lib/libintl.*
+. if ${_BLNK_LIBINTL_LIST} != "/usr/lib/libintl.*"
+_BLNK_LIBINTL_FOUND= YES
. else
-_NEED_GNU_GETTEXT= YES
+_BLNK_LIBINTL_FOUND= NO
. endif
+.else
+_BUILTIN_GETTEXT= NO
+_BLNK_LIBINTL_FOUND= NO
+.endif
#
-# Solaris has broken (for the purposes of pkgsrc) version of zlib and
-# gettext.
+# Solaris has broken (for the purposes of pkgsrc) version of gettext.
#
_INCOMPAT_GETTEXT= SunOS-*-*
-INCOMPAT_GETTEXT?= # empty
-. for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
+.for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_BUILTIN_GETTEXT= NO
+_BLNK_LIBINTL_FOUND= NO
+. endif
+.endfor
+
+.if ${_BUILTIN_GETTEXT} == "YES"
+_NEED_GNU_GETTEXT= NO
+.else
_NEED_GNU_GETTEXT= YES
-. endif
-. endfor
.endif
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
@@ -51,6 +52,10 @@ _NEED_GNU_GETTEXT= YES
_NEED_GNU_GETTEXT= YES
.endif
+.if defined(USE_GNU_GETTEXT)
+_NEED_GNU_GETTEXT= YES
+.endif
+
.if ${_NEED_GNU_GETTEXT} == "YES"
BUILDLINK_PACKAGES+= gettext
EVAL_PREFIX+= BUILDLINK_PREFIX.gettext=gettext-lib
diff --git a/devel/gettext-lib/buildlink3.mk b/devel/gettext-lib/buildlink3.mk
index df8e615caa9..9ed24b3d317 100644
--- a/devel/gettext-lib/buildlink3.mk
+++ b/devel/gettext-lib/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.13 2004/02/11 11:30:49 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.14 2004/02/12 01:59:37 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
GETTEXT_BUILDLINK3_MK:= ${GETTEXT_BUILDLINK3_MK}+
@@ -17,21 +17,45 @@ BUILDLINK_CHECK_BUILTIN.gettext?= NO
BUILDLINK_IS_BUILTIN.gettext= NO
. if exists(/usr/include/libintl.h)
BUILDLINK_IS_BUILTIN.gettext= YES
+. if !empty(BUILDLINK_CHECK_BUILTIN.gettext:M[nN][oO])
+#
+# Consider the base system libintl to be gettext-lib-0.10.35nb1.
+#
+_GETTEXT_PKG= gettext-lib-0.10.35nb1
+. for _depend_ in ${BUILDLINK_DEPENDS.gettext}
+. if !empty(BUILDLINK_IS_BUILTIN.gettext:M[yY][eE][sS])
+BUILDLINK_IS_BUILTIN.gettext!= \
+ if ${PKG_ADMIN} pmatch '${_depend_}' ${_GETTEXT_PKG}; then \
+ ${ECHO} "YES"; \
+ else \
+ ${ECHO} "NO"; \
+ fi
+. endif
+. endfor
+. endif
. endif
+. if !empty(BUILDLINK_CHECK_BUILTIN.gettext:M[nN][oO])
#
# The listed platforms have a broken (for the purposes of pkgsrc) version
# of gettext-lib.
#
_INCOMPAT_GETTEXT= SunOS-*-*
INCOMPAT_GETTEXT?= # empty
-. for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
+. for _pattern_ in ${_INCOMPAT_GETTEXT} ${INCOMPAT_GETTEXT}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
BUILDLINK_IS_BUILTIN.gettext= NO
-. endif
-. endfor
+. endif
+. endfor
+. endif
MAKEFLAGS+= BUILDLINK_IS_BUILTIN.gettext=${BUILDLINK_IS_BUILTIN.gettext}
.endif
+.if !empty(BUILDLINK_IS_BUILTIN.gettext:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.gettext= YES
+.else
+BUILDLINK_USE_BUILTIN.gettext= NO
+.endif
+
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
!empty(PREFER_PKGSRC:Mgettext)
BUILDLINK_USE_BUILTIN.gettext= NO
@@ -45,29 +69,6 @@ BUILDLINK_USE_BUILTIN.gettext= NO
BUILDLINK_USE_BUILTIN.gettext= YES
.endif
-.if !defined(BUILDLINK_USE_BUILTIN.gettext)
-. if !empty(BUILDLINK_IS_BUILTIN.gettext:M[nN][oO])
-BUILDLINK_USE_BUILTIN.gettext= NO
-. else
-#
-# Consider the base system libintl to be gettext-lib-0.10.35nb1.
-#
-_GETTEXT_PKG= gettext-lib-0.10.35nb1
-BUILDLINK_USE_BUILTIN.gettext?= YES
-. for _depend_ in ${BUILDLINK_DEPENDS.gettext}
-. if !empty(BUILDLINK_USE_BUILTIN.gettext:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.gettext!= \
- if ${PKG_ADMIN} pmatch '${_depend_}' ${_GETTEXT_PKG}; then \
- ${ECHO} "YES"; \
- else \
- ${ECHO} "NO"; \
- fi
-. endif
-. endfor
-. endif
-MAKEFLAGS+= BUILDLINK_USE_BUILTIN.gettext=${BUILDLINK_USE_BUILTIN.gettext}
-.endif
-
.if !empty(BUILDLINK_USE_BUILTIN.gettext:M[nN][oO])
. if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= gettext
diff --git a/devel/libevent/buildlink2.mk b/devel/libevent/buildlink2.mk
index fdb72dc7477..78634ad0da9 100644
--- a/devel/libevent/buildlink2.mk
+++ b/devel/libevent/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.5 2004/02/05 07:17:15 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.6 2004/02/12 01:59:37 jlam Exp $
#
# This Makefile fragment is included by packages that use libevent.
#
@@ -11,6 +11,12 @@ LIBEVENT_BUILDLINK2_MK= # defined
.include "../../mk/bsd.prefs.mk"
.if exists(/usr/include/event.h)
+_BUILTIN_LIBEVENT= YES
+.else
+_BUILTIN_LIBEVENT= NO
+.endif
+
+.if ${_BUILTIN_LIBEVENT} == "YES"
_NEED_LIBEVENT= NO
.else
_NEED_LIBEVENT= YES
diff --git a/devel/ncurses/buildlink2.mk b/devel/ncurses/buildlink2.mk
index 3f634b65a69..1455fcc4305 100644
--- a/devel/ncurses/buildlink2.mk
+++ b/devel/ncurses/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.18 2004/02/05 07:17:14 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.19 2004/02/12 01:59:37 jlam Exp $
#
# Optionally define:
#
@@ -14,45 +14,62 @@ NCURSES_BUILDLINK2_MK= # defined
BUILDLINK_DEPENDS.ncurses?= ncurses>=5.3nb1
BUILDLINK_PKGSRCDIR.ncurses?= ../../devel/ncurses
-.if defined(USE_NCURSES)
-_NEED_NCURSES= YES
-.else
-_NEED_NCURSES= NO
+.if !defined(_BLNK_LIBNCURSES_FOUND)
+_BLNK_LIBNCURSES_FOUND!= \
+ if [ "`${ECHO} /usr/lib/libncurses.*`" = "/usr/lib/libncurses.*" ]; then \
+ ${ECHO} "NO"; \
+ else \
+ ${ECHO} "YES"; \
+ fi
+MAKEFLAGS+= _BLNK_LIBNCURSES_FOUND=${_BLNK_LIBNCURSES_FOUND}
+.endif
-#
-# Handle the base system not having (n)curses.
-#
-. if !(exists(/usr/include/curses.h) || exists(/usr/include/ncurses.h))
-_NEED_NCURSES= YES
+.if !defined(BUILDLINK_IS_BUILTIN.ncurses)
+BUILDLINK_IS_BUILTIN.ncurses= NO
+. if ${_BLNK_LIBNCURSES_FOUND} == "YES"
+BUILDLINK_IS_BUILTIN.ncurses= YES
+. elif exists(${_NCURSES_H})
+BUILDLINK_IS_BUILTIN.ncurses!= \
+ if ${GREP} -q "\#define[ ]*NCURSES_VERSION" ${_NCURSES_H}; then \
+ ${ECHO} "YES"; \
+ else \
+ ${ECHO} "NO"; \
+ fi
. endif
#
-# These versions of NetBSD didn't have a curses library that was capable of
-# replacing ncurses.
-#
-_INCOMPAT_CURSES= NetBSD-0.*-* NetBSD-1.[0123]*-*
-_INCOMPAT_CURSES+= NetBSD-1.4.*-* NetBSD-1.4[A-X]-*
+# XXX By default, assume that the builtin curses on NetBSD systems
+# XXX supports ncurses.
#
-# This catch-all for SunOS is probably too broad, but better to err on
-# the safe side. We can narrow down the match when we have better
-# information.
+. if ${OPSYS} == "NetBSD"
+BUILDLINK_IS_BUILTIN.ncurses= YES
#
-_INCOMPAT_CURSES+= SunOS-*-*
+# These versions of NetBSD didn't have a curses library that was
+# capable of replacing ncurses.
#
-# Similarly for IRIX and Darwin
+# XXX In reality, no version of NetBSD has a curses library that can
+# XXX completely replace ncurses; however, some version implement
+# XXX enough of ncurses that some packages are happy.
#
-_INCOMPAT_CURSES+= IRIX-*-*
-_INCOMPAT_CURSES+= Darwin-*-*
-INCOMPAT_CURSES?= # empty
-. for _pattern_ in ${_INCOMPAT_CURSES} ${INCOMPAT_CURSES}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_INCOMPAT_CURSES= NetBSD-0.*-* NetBSD-1.[0123]*-*
+_INCOMPAT_CURSES+= NetBSD-1.4.*-* NetBSD-1.4[A-X]-*
+. for _pattern_ in ${_INCOMPAT_CURSES} ${INCOMPAT_CURSES}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+BUILDLINK_IS_BUILTIN.ncurses= NO
+. endif
+. endfor
+. endif
+MAKEFLAGS+= BUILDLINK_IS_BUILTIN.ncurses=${BUILDLINK_IS_BUILTIN.ncurses}
+.endif
+
+.if !empty(BUILDLINK_IS_BUILTIN.ncurses:M[yY][eE][sS])
+_NEED_NCURSES= NO
+.else
_NEED_NCURSES= YES
-. endif
-. endfor
.endif
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
!empty(PREFER_PKGSRC:Mncurses)
-_NEED_NCURSES= YES
+_NEED_NCURSES= YES
.endif
.if ${_NEED_NCURSES} == "YES"
@@ -87,8 +104,7 @@ BUILDLINK_FILES.ncurses+= lib/libncurses.*
BUILDLINK_FILES.ncurses+= lib/libpanel.*
.if ${_NEED_NCURSES} == "NO"
-_BLNK_LIBNCURSES_LIST!= ${ECHO} /usr/lib/libncurses.*
-. if ${_BLNK_LIBNCURSES_LIST} == "/usr/lib/libncurses.*"
+. if !empty(_BLNK_LIBNCURSES_FOUND:M[yY][eE][sS])
BUILDLINK_FILES.ncurses+= lib/libcurses.*
BUILDLINK_TRANSFORM.ncurses+= -e "s|/curses.h|/ncurses.h|g"
BUILDLINK_TRANSFORM+= l:ncurses:curses
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
diff --git a/devel/readline/buildlink2.mk b/devel/readline/buildlink2.mk
index b1b01d8dc5f..f395cbe82c7 100644
--- a/devel/readline/buildlink2.mk
+++ b/devel/readline/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.6 2004/02/05 07:17:14 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.7 2004/02/12 01:59:38 jlam Exp $
#
# Optionally define USE_GNU_READLINE to force use of GNU readline.
#
@@ -13,27 +13,28 @@ READLINE_BUILDLINK2_MK= # defined
BUILDLINK_DEPENDS.readline?= readline>=2.2
BUILDLINK_PKGSRCDIR.readline?= ../../devel/readline
-.if defined(USE_GNU_READLINE)
-_NEED_GNU_READLINE= YES
+.if exists(/usr/include/readline.h) || \
+ exists(/usr/include/readline/readline.h)
+_BUILTIN_READLINE= YES
.else
-. if exists(/usr/include/readline.h) || \
- exists(/usr/include/readline/readline.h)
-_NEED_GNU_READLINE= NO
-. else
-_NEED_GNU_READLINE= YES
-. endif
+_BUILTIN_READLINE= NO
+.endif
#
# This catch-all for SunOS is probably too broad, but better to err on
# the safe side. We can narrow down the match when we have better
# information.
#
_INCOMPAT_READLINE= SunOS-*-*
-INCOMPAT_READLINE?= # empty
-. for _pattern_ in ${_INCOMPAT_READLINE} ${INCOMPAT_READLINE}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
+.for _pattern_ in ${_INCOMPAT_READLINE} ${INCOMPAT_READLINE}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
+_BUILTIN_READLINE= NO
+. endif
+.endfor
+
+.if ${_BUILTIN_READLINE} == "YES"
+_NEED_GNU_READLINE= NO
+.else
_NEED_GNU_READLINE= YES
-. endif
-. endfor
.endif
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
@@ -41,14 +42,18 @@ _NEED_GNU_READLINE= YES
_NEED_GNU_READLINE= YES
.endif
+.if defined(USE_GNU_READLINE)
+_NEED_GNU_READLINE= YES
+.endif
+
.if ${_NEED_GNU_READLINE} == "YES"
BUILDLINK_PACKAGES+= readline
EVAL_PREFIX+= BUILDLINK_PREFIX.readline=readline
BUILDLINK_PREFIX.readline_DEFAULT= ${LOCALBASE}
.else
-BUILDLINK_PREFIX.readline= /usr
+BUILDLINK_PREFIX.readline= /usr
.endif
-BUILDLINK_PREFIX.history= ${BUILDLINK_PREFIX.readline}
+BUILDLINK_PREFIX.history= ${BUILDLINK_PREFIX.readline}
BUILDLINK_FILES.readline= include/readline.h
BUILDLINK_FILES.readline+= include/readline/*
diff --git a/devel/readline/buildlink3.mk b/devel/readline/buildlink3.mk
index d65025a8a43..f64d39b6e48 100644
--- a/devel/readline/buildlink3.mk
+++ b/devel/readline/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.11 2004/02/11 11:30:50 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.12 2004/02/12 01:59:38 jlam Exp $
#
# Optionally define USE_GNU_READLINE to force use of GNU readline.
#
@@ -24,19 +24,27 @@ BUILDLINK_IS_BUILTIN.readline= NO
exists(/usr/include/readline/readline.h)
BUILDLINK_IS_BUILTIN.readline= YES
. endif
+. if !empty(BUILDLINK_CHECK_BUILTIN.readline:M[nN][oO])
#
# These catch-alls are probably too broad, but better to err on the safe
# side. We can narrow down the match when we have better information.
#
_INCOMPAT_READLINE?= SunOS-*-*
-. for _pattern_ in ${_INCOMPAT_READLINE} ${INCOMPAT_READLINE}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
+. for _pattern_ in ${_INCOMPAT_READLINE} ${INCOMPAT_READLINE}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
BUILDLINK_IS_BUILTIN.readline= NO
-. endif
-. endfor
+. endif
+. endfor
+. endif
MAKEFLAGS+= BUILDLINK_IS_BUILTIN.readline=${BUILDLINK_IS_BUILTIN.readline}
.endif
+.if !empty(BUILDLINK_IS_BUILTIN.readline:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.readline= YES
+.else
+BUILDLINK_USE_BUILTIN.readline= NO
+.endif
+
.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
!empty(PREFER_PKGSRC:Mreadline)
BUILDLINK_USE_BUILTIN.readline= NO
@@ -50,15 +58,6 @@ BUILDLINK_USE_BUILTIN.readline= NO
BUILDLINK_USE_BUILTIN.readline= YES
.endif
-.if !defined(BUILDLINK_USE_BUILTIN.readline)
-. if !empty(BUILDLINK_IS_BUILTIN.readline:M[nN][oO])
-BUILDLINK_USE_BUILTIN.readline= NO
-. else
-BUILDLINK_USE_BUILTIN.readline= YES
-. endif
-MAKEFLAGS+= BUILDLINK_USE_BUILTIN.readline=${BUILDLINK_USE_BUILTIN.readline}
-.endif
-
.if !empty(BUILDLINK_USE_BUILTIN.readline:M[nN][oO])
. if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+= readline
diff --git a/devel/zlib/buildlink2.mk b/devel/zlib/buildlink2.mk
index 90cbd93d28c..90bb8cc6efd 100644
--- a/devel/zlib/buildlink2.mk
+++ b/devel/zlib/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.12 2004/02/06 19:04:24 jlam Exp $
+# $NetBSD: buildlink2.mk,v 1.13 2004/02/12 01:59:38 jlam Exp $
.if !defined(ZLIB_BUILDLINK2_MK)
ZLIB_BUILDLINK2_MK= # defined
@@ -13,24 +13,6 @@ _ZLIB_H= /usr/include/zlib.h
.if !defined(BUILDLINK_IS_BUILTIN.zlib)
BUILDLINK_IS_BUILTIN.zlib= NO
. if exists(${_ZLIB_H})
-BUILDLINK_IS_BUILTIN.zlib= YES
-. endif
-.endif
-
-.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
- !empty(PREFER_PKGSRC:Mzlib)
-BUILDLINK_USE_BUILTIN.zlib= NO
-.endif
-
-.if defined(USE_ZLIB)
-BUILDLINK_USE_BUILTIN.zlib= NO
-.endif
-
-.if !defined(BUILDLINK_USE_BUILTIN.zlib)
-. if !empty(BUILDLINK_IS_BUILTIN.zlib:M[nN][oO])
-BUILDLINK_USE_BUILTIN.zlib= NO
-. else
-BUILDLINK_USE_BUILTIN.zlib= YES
#
# Create an appropriate name for the built-in package distributed
# with the system. This package name can be used to check against
@@ -67,14 +49,29 @@ _ZLIB_PKG= zlib-1.1.4nb1
. endif
_ZLIB_DEPENDS= ${BUILDLINK_DEPENDS.zlib}
-BUILDLINK_USE_BUILTIN.zlib!= \
+BUILDLINK_IS_BUILTIN.zlib!= \
if ${PKG_ADMIN} pmatch '${_ZLIB_DEPENDS}' ${_ZLIB_PKG}; then \
${ECHO} "YES"; \
else \
${ECHO} "NO"; \
fi
. endif
-MAKEFLAGS+= BUILDLINK_USE_BUILTIN.zlib=${BUILDLINK_USE_BUILTIN.zlib}
+MAKEFLAGS+= BUILDLINK_IS_BUILTIN.zlib=${BUILDLINK_IS_BUILTIN.zlib}
+.endif
+
+.if !empty(BUILDLINK_IS_BUILTIN.zlib:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.zlib= YES
+.else
+BUILDLINK_USE_BUILTIN.zlib= NO
+.endif
+
+.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
+ !empty(PREFER_PKGSRC:Mzlib)
+BUILDLINK_USE_BUILTIN.zlib= NO
+.endif
+
+.if defined(USE_ZLIB)
+BUILDLINK_USE_BUILTIN.zlib= NO
.endif
.if !empty(BUILDLINK_USE_BUILTIN.zlib:M[nN][oO])
diff --git a/devel/zlib/buildlink3.mk b/devel/zlib/buildlink3.mk
index a8a54e96104..7b6653a13ff 100644
--- a/devel/zlib/buildlink3.mk
+++ b/devel/zlib/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.12 2004/02/06 19:04:24 jlam Exp $
+# $NetBSD: buildlink3.mk,v 1.13 2004/02/12 01:59:38 jlam Exp $
BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
ZLIB_BUILDLINK3_MK:= ${ZLIB_BUILDLINK3_MK}+
@@ -19,27 +19,7 @@ _ZLIB_H= /usr/include/zlib.h
BUILDLINK_IS_BUILTIN.zlib= NO
. if exists(${_ZLIB_H})
BUILDLINK_IS_BUILTIN.zlib= YES
-. endif
-.endif
-
-.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
- !empty(PREFER_PKGSRC:Mzlib)
-BUILDLINK_USE_BUILTIN.zlib= NO
-.endif
-
-.if defined(USE_ZLIB)
-BUILDLINK_USE_BUILTIN.zlib= NO
-.endif
-
-.if !empty(BUILDLINK_CHECK_BUILTIN.zlib:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.zlib= YES
-.endif
-
-.if !defined(BUILDLINK_USE_BUILTIN.zlib)
-. if !empty(BUILDLINK_IS_BUILTIN.zlib:M[nN][oO])
-BUILDLINK_USE_BUILTIN.zlib= NO
-. else
-BUILDLINK_USE_BUILTIN.zlib= YES
+. if !empty(BUILDLINK_CHECK_BUILTIN.zlib:M[nN][oO])
#
# Create an appropriate name for the built-in package distributed
# with the system. This package name can be used to check against
@@ -67,27 +47,45 @@ _HAVE_CAN_2003_0107_FIX+= NetBSD-[2-9]*-* NetBSD-1[0-9]*-*
# XXX zlib-1.1.4.
#
_HAVE_CAN_2003_0107_FIX+= FreeBSD-*-* OpenBSD-*-*
-. if ${_ZLIB_VERSION} == "1.1.4"
-. for _pattern_ in ${_HAVE_CAN_2003_0107_FIX}
-. if !empty(MACHINE_PLATFORM:M${_pattern_})
+. if ${_ZLIB_VERSION} == "1.1.4"
+. for _pattern_ in ${_HAVE_CAN_2003_0107_FIX}
+. if !empty(MACHINE_PLATFORM:M${_pattern_})
_ZLIB_PKG= zlib-1.1.4nb1
-. endif
-. endfor
-. endif
-
-BUILDLINK_USE_BUILTIN.zlib?= YES
-. for _depend_ in ${BUILDLINK_DEPENDS.zlib}
-. if !empty(BUILDLINK_USE_BUILTIN.zlib:M[yY][eE][sS])
-BUILDLINK_USE_BUILTIN.zlib!= \
+. endif
+. endfor
+. endif
+. for _depend_ in ${BUILDLINK_DEPENDS.zlib}
+. if !empty(BUILDLINK_IS_BUILTIN.zlib:M[yY][eE][sS])
+BUILDLINK_IS_BUILTIN.zlib!= \
if ${PKG_ADMIN} pmatch '${_depend_}' ${_ZLIB_PKG}; then \
${ECHO} "YES"; \
else \
${ECHO} "NO"; \
fi
-. endif
-. endfor
+. endif
+. endfor
+. endif
. endif
-MAKEFLAGS+= BUILDLINK_USE_BUILTIN.zlib=${BUILDLINK_USE_BUILTIN.zlib}
+MAKEFLAGS+= BUILDLINK_IS_BUILTIN.zlib=${BUILDLINK_IS_BUILTIN.zlib}
+.endif
+
+.if !empty(BUILDLINK_IS_BUILTIN.zlib:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.zlib= YES
+.else
+BUILDLINK_USE_BUILTIN.zlib= NO
+.endif
+
+.if !empty(PREFER_PKGSRC:M[yY][eE][sS]) || \
+ !empty(PREFER_PKGSRC:Mzlib)
+BUILDLINK_USE_BUILTIN.zlib= NO
+.endif
+
+.if defined(USE_ZLIB)
+BUILDLINK_USE_BUILTIN.zlib= NO
+.endif
+
+.if !empty(BUILDLINK_CHECK_BUILTIN.zlib:M[yY][eE][sS])
+BUILDLINK_USE_BUILTIN.zlib= YES
.endif
.if !empty(BUILDLINK_USE_BUILTIN.zlib:M[nN][oO])