summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
diff options
context:
space:
mode:
authorjlam <jlam>2004-02-13 18:00:29 +0000
committerjlam <jlam>2004-02-13 18:00:29 +0000
commitc151089a5b0668796f4696190ebca247c242d5d9 (patch)
treede790c71ed42d8fa28bd1dfbfa92d7c56cdd10b0 /mk/bsd.prefs.mk
parent5cabe1f16a605a09d5a2d71db87182b4237d2798 (diff)
downloadpkgsrc-c151089a5b0668796f4696190ebca247c242d5d9.tar.gz
Don't use the new pkg_info options unless the the pkg_install tools are
new enough to support them. pkgsrc requires updated pkg_install for older NetBSD releases and will ask the user to install them as the first step to using pkgsrc, but the error messages about pkg_info not supporting the "-K" option were confusing.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r--mk/bsd.prefs.mk31
1 files changed, 19 insertions, 12 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 9a3568c1f85..0bf6c3ee5c7 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.150 2004/02/06 19:04:25 jlam Exp $
+# $NetBSD: bsd.prefs.mk,v 1.151 2004/02/13 18:00:29 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -393,10 +393,22 @@ PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info
PKG_VIEW_CMD?= ${PKG_TOOLS_BIN}/pkg_view
LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm
+.if !defined(PKGTOOLS_VERSION)
+PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302
+MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION}
+.endif
+
# The binary pkg_install tools all need to consistently to refer to the
# correct package database directory.
#
+#.if ${PKGTOOLS_VERSION} < 20030823
+.if ${OPSYS} == "NetBSD"
+PKGTOOLS_ENV?= PKG_DBDIR=${_PKG_DBDIR}
+PKGTOOLS_ARGS?= # empty
+.else
+PKGTOOLS_ENV?= # empty
PKGTOOLS_ARGS?= -K ${_PKG_DBDIR}
+.endif
# Views are rooted in ${LOCALBASE}, all packages are depoted in
# ${DEPOTBASE}, and the package database directory for the default view
@@ -404,12 +416,12 @@ PKGTOOLS_ARGS?= -K ${_PKG_DBDIR}
#
PKG_VIEW_ARGS?= -W ${LOCALBASE} -d ${DEPOTBASE} -k ${PKG_DBDIR}
-PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS}
-PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS}
-PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS}
-PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS}
-PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS}
-PKG_VIEW?= ${PKG_VIEW_CMD} ${PKG_VIEW_ARGS}
+PKG_ADD?= ${PKGTOOLS_ENV} ${PKG_ADD_CMD} ${PKGTOOLS_ARGS}
+PKG_ADMIN?= ${PKGTOOLS_ENV} ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS}
+PKG_CREATE?= ${PKGTOOLS_ENV} ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS}
+PKG_DELETE?= ${PKGTOOLS_ENV} ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS}
+PKG_INFO?= ${PKGTOOLS_ENV} ${PKG_INFO_CMD} ${PKGTOOLS_ARGS}
+PKG_VIEW?= ${PKGTOOLS_ENV} ${PKG_VIEW_CMD} ${PKG_VIEW_ARGS}
LINKFARM?= ${LINKFARM_CMD}
# "${PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed
@@ -419,11 +431,6 @@ LINKFARM?= ${LINKFARM_CMD}
#
PKG_BEST_EXISTS?= ${PKG_ADMIN} -b -d ${_PKG_DBDIR} -S lsbest
-.ifndef PKGTOOLS_VERSION
-PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302
-MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION}
-.endif
-
USE_BUILDLINK2?= no # default to not using buildlink2
USE_BUILDLINK3?= no # default to not using buildlink3
.if ${PKG_INSTALLATION_TYPE} == "pkgviews"