summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-01-06 23:00:51 +0000
committerjlam <jlam@pkgsrc.org>2004-01-06 23:00:51 +0000
commite9a249e705e88d6fc216a8f00944caaab97fbc4d (patch)
tree73b77be7d67ac9e09d82bc7e950df0e1c15f55ec
parent967ed9725266fbed5078a75b2541701a51f35b77 (diff)
downloadpkgsrc-e9a249e705e88d6fc216a8f00944caaab97fbc4d.tar.gz
Create a variable USE_XPKGWEDGE that determines whether or not pkgsrc will
use xpkgwedge to install X11 packages into ${LOCALBASE}. It defaults to "no" to preserve the current behaviour. Also make pkgviews imply USE_XPKGWEDGE=yes, as xpkgwedge is a requirement for making X11 packages install properly using pkgviews.
-rw-r--r--mk/bsd.pkg.defaults.mk8
-rw-r--r--mk/bsd.pkg.mk27
2 files changed, 28 insertions, 7 deletions
diff --git a/mk/bsd.pkg.defaults.mk b/mk/bsd.pkg.defaults.mk
index 14fc05ee6a5..f39e98421d4 100644
--- a/mk/bsd.pkg.defaults.mk
+++ b/mk/bsd.pkg.defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.defaults.mk,v 1.197 2004/01/02 18:45:44 ben Exp $
+# $NetBSD: bsd.pkg.defaults.mk,v 1.198 2004/01/06 23:00:51 jlam Exp $
#
# A file providing defaults for pkgsrc and the packages collection.
@@ -140,6 +140,12 @@ CROSSBASE?= ${LOCALBASE}/cross
# Possible: any path
# Default: ${X11PREFIX} or where lesstif12 is installed
+USE_XPKGWEDGE?= no
+# Whether we should use xpkgwedge or not to install all packages into
+# ${LOCALBASE}.
+# Possible: yes, no
+# Default: no
+
BSDSRCDIR?= /usr/src
# Where the NetBSD src module source tree is located
# used in the emulators/plex86, emulators/vmware-module{,3}, net/arla,
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index e0b526e492c..ec7be14b58f 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1338 2004/01/06 14:43:02 wiz Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1339 2004/01/06 23:00:51 jlam Exp $
#
# This file is in the public domain.
#
@@ -174,17 +174,26 @@ USE_X11?= implied
#
.if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
-_OPSYS_NEEDS_XPKGWEDGE= yes
+USE_XPKGWEDGE= yes
.else
-_OPSYS_NEEDS_XPKGWEDGE?= no
+USE_XPKGWEDGE?= no
+.endif
+
+.if defined(_OPSYS_NEEDS_XPKGWEDGE) && \
+ !empty(_OPSYS_NEEDS_XPKGWEDGE:M[yY][eE][sS])
+USE_XPKGWEDGE= yes
+.endif
+
+.if ${PKG_INSTALLATION_TYPE} == "pkgviews"
+USE_XPKGWEDGE= yes
+_XPKGWEDGE_REQD= 1.9
+.else
+_XPKGWEDGE_REQD= 1.5
.endif
# Set the PREFIX appropriately.
.if ${PKG_INSTALLATION_TYPE} == "overwrite"
. if defined(USE_X11BASE)
-. if !empty(_OPSYS_NEEDS_XPKGWEDGE:M[yY][eE][sS])
-BUILD_DEPENDS+= xpkgwedge>=1.5:../../pkgtools/xpkgwedge
-. endif
PREFIX= ${X11PREFIX}
. elif defined(USE_CROSSBASE)
PREFIX= ${CROSSBASE}
@@ -197,6 +206,12 @@ PREFIX= ${DEPOTBASE}/${PKGNAME}
NO_MTREE= yes
.endif
+.if defined(USE_X11BASE)
+. if !empty(USE_XPKGWEDGE:M[yY][eE][sS])
+BUILD_DEPENDS+= xpkgwedge>=${_XPKGWEDGE_REQD}:../../pkgtools/xpkgwedge
+. endif
+.endif
+
.if empty(DEPOT_SUBDIR)
PKG_FAIL_REASON+= "DEPOT_SUBDIR may not be empty."
.endif