Move all of the code that sets USE_XPKGWEDGE from bsd.pkg.mk into

bsd.prefs.mk as it's needed in setting X11PREFIX to the correct value,
which is also done in bsd.prefs.mk.  This is the follow-through to the
temporary fix in previous revision (1.141) of bsd.prefs.mk.
This commit is contained in:
jlam 2004-01-23 17:55:17 +00:00
parent b0913f9a1f
commit 018df25438
2 changed files with 43 additions and 45 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.1353 2004/01/23 17:04:55 jmmv Exp $
# $NetBSD: bsd.pkg.mk,v 1.1354 2004/01/23 17:55:17 jlam Exp $
#
# This file is in the public domain.
#
@ -169,28 +169,6 @@ PLIST_SUBST+= IMAKE_MAN_SOURCE_PATH=${IMAKE_MAN_SOURCE_PATH} \
USE_X11?= implied
.endif
# If xpkgwedge.def is found, then we need to require xpkgwedge as
# a build dependency for X11 packages.
#
.if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
USE_XPKGWEDGE= yes
.else
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)
@ -206,6 +184,9 @@ PREFIX= ${DEPOTBASE}/${PKGNAME}
NO_MTREE= yes
.endif
# If USE_XPKGWEDGE is set, then add a build dependency on xpkgwedge for
# X11 packages.
#
.if defined(USE_X11BASE)
. if !empty(USE_XPKGWEDGE:M[yY][eE][sS])
BUILD_DEPENDS+= xpkgwedge>=${_XPKGWEDGE_REQD}:../../pkgtools/xpkgwedge

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.prefs.mk,v 1.141 2004/01/23 16:49:47 agc Exp $
# $NetBSD: bsd.prefs.mk,v 1.142 2004/01/23 17:55:17 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@ -252,6 +252,17 @@ PHASES_AFTER_BUILD= build ${PHASES_AFTER_INSTALL}
PHASES_AFTER_INSTALL= install ${PHASES_AFTER_PACKAGE}
PHASES_AFTER_PACKAGE= package
# Set the style of installation to be performed for the package. The
# funky make variable modifiers just select the first word of the value
# stored in the referenced variable.
#
.for _pref_ in ${PKG_INSTALLATION_PREFS}
. if !empty(PKG_INSTALLATION_TYPES:M${_pref_})
PKG_INSTALLATION_TYPE?= ${PKG_INSTALLATION_TYPES:M${_pref_}:S/^/_pkginsttype_/1:M_pkginsttype_*:S/^_pkginsttype_//}
. endif
.endfor
PKG_INSTALLATION_TYPE?= none
# if the system is IPv6-ready, compile with IPv6 support turned on.
.if defined(USE_INET6)
. if empty(USE_INET6:M[Yy][Ee][Ss]) || defined(USE_SOCKS)
@ -274,6 +285,26 @@ X11BASE?= ${DESTDIR}/usr/X11R6
.endif
CROSSBASE?= ${LOCALBASE}/cross
# If xpkgwedge.def is found, then clearly we're using xpkgwedge.
.if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
USE_XPKGWEDGE= yes
.else
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 X11PREFIX to reflect the install directory of X11 packages.
# Set XMKMF_CMD properly if xpkgwedge is installed.
#
@ -282,10 +313,7 @@ CROSSBASE?= ${LOCALBASE}/cross
#
XMKMF?= ${XMKMF_CMD} ${XMKMF_FLAGS} -a
XMKMF_FLAGS?= # empty
.if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
exists(${X11BASE}/lib/X11/config/xpkgwedge.def) || \
!empty(USE_XPKGWEDGE:M[Yy][Ee][Ss])
HAVE_XPKGWEDGE= yes
.if !empty(USE_XPKGWEDGE:M[Yy][Ee][Ss])
X11PREFIX= ${LOCALBASE}
XMKMF_CMD?= ${X11PREFIX}/bin/pkgxmkmf
.else
@ -323,23 +351,6 @@ DIGEST_VERSION!= ${DIGEST} -V 2>/dev/null
MAKEFLAGS+= DIGEST_VERSION="${DIGEST_VERSION}"
.endif
# Set the style of installation to be performed for the package. The
# funky make variable modifiers just select the first word of the value
# stored in the referenced variable.
#
.for _pref_ in ${PKG_INSTALLATION_PREFS}
. if !empty(PKG_INSTALLATION_TYPES:M${_pref_})
PKG_INSTALLATION_TYPE?= ${PKG_INSTALLATION_TYPES:M${_pref_}:S/^/_pkginsttype_/1:M_pkginsttype_*:S/^_pkginsttype_//}
. endif
.endfor
PKG_INSTALLATION_TYPE?= none
USE_BUILDLINK2?= no # default to not using buildlink2
USE_BUILDLINK3?= no # default to not using buildlink3
.if ${PKG_INSTALLATION_TYPE} == "pkgviews"
USE_BUILDLINK3= yes # pkgviews requires buildlink3
.endif
# This is the package database directory for the default view.
PKG_DBDIR?= ${DESTDIR}/var/db/pkg
@ -397,6 +408,12 @@ _NULL_SUFFIX= -S
_NULL_SUFFIX= -s ""
.endif
USE_BUILDLINK2?= no # default to not using buildlink2
USE_BUILDLINK3?= no # default to not using buildlink3
.if ${PKG_INSTALLATION_TYPE} == "pkgviews"
USE_BUILDLINK3= yes # pkgviews requires buildlink3
.endif
.if (${OPSYS} == SunOS) && !defined(ZOULARIS_VERSION)
. if !exists(${ZOULARISBASE}/share/mk/zoularis.mk)
ZOULARIS_VERSION= 20000522