Subject: Re: CVS commit: pkgsrc/mk/defaults
To: None <pkgsrc-changes@NetBSD.org>
From: Joerg Sonnenberger <joerg@britannica.bec.de>
List: pkgsrc-changes
Date: 12/20/2006 15:01:13
--Boundary_(ID_FpFhn1FkYwvEQYr4vaG/mQ)
Content-type: text/plain; charset="us-ascii"
Content-transfer-encoding: 7BIT
Content-disposition: inline

On Wed, Dec 20, 2006 at 07:48:59AM +0000, Martti Kuparinen wrote:
> 
> Module Name:	pkgsrc
> Committed By:	martti
> Date:		Wed Dec 20 07:48:59 UTC 2006
> 
> Modified Files:
> 	pkgsrc/mk/defaults: mk.conf
> 
> Log Message:
> Make sure X11_TYPE is defined before checking it.

Sorry for this and I was the person which uncomment X11_TYPE :-(
It is the real fix as the order of definition is intentional.

Does the attached patch break anything for you? It moves the definition
of USE_XPKGWEDGE down to bsd.prefs.mk where it belongs and cleans it up
at the same time. It also handles the X11BASE definition for modular
Xorg.

Joerg

--Boundary_(ID_FpFhn1FkYwvEQYr4vaG/mQ)
Content-type: text/plain; charset=us-ascii; NAME="x11type.diff"
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename="x11type.diff"

Index: bsd.prefs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.prefs.mk,v
retrieving revision 1.242
diff -u -r1.242 bsd.prefs.mk
--- bsd.prefs.mk	20 Dec 2006 01:04:46 -0000	1.242
+++ bsd.prefs.mk	20 Dec 2006 13:57:01 -0000
@@ -421,17 +421,15 @@
 .if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
     exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
 USE_XPKGWEDGE=  yes
-.else
-USE_XPKGWEDGE?=	yes
-.endif
-
-.if defined(_OPSYS_NEEDS_XPKGWEDGE) && \
+.elif defined(_OPSYS_NEEDS_XPKGWEDGE) && \
     !empty(_OPSYS_NEEDS_XPKGWEDGE:M[yY][eE][sS])
 USE_XPKGWEDGE=	yes
-.endif
-
-.if ${PKG_INSTALLATION_TYPE} == "pkgviews"
+.elif ${PKG_INSTALLATION_TYPE} == "pkgviews"
 USE_XPKGWEDGE=		yes
+.elif ${X11_TYPE} == "modular"
+USE_XPKGWEDGE=	no
+.else
+USE_XPKGWEDGE?=	yes
 .endif
 
 # Default installation prefix for meta-pkgs/xorg.
@@ -441,9 +439,10 @@
 X11ROOT_PREFIX?=	# empty
 .endif
 
-.if (defined(X11_TYPE) && !empty(X11_TYPE:Mxorg)) && \
-    (defined(X11_TYPE) && empty(X11_TYPE:Mnative))
+.if ${X11_TYPE} == "xorg"
 X11BASE?=		${LOCALBASE}/${X11ROOT_PREFIX}
+.elif ${X11_TYPE} == "modular"
+X11BASE=		${LOCALBASE}
 .endif
 
 .if !empty(USE_XPKGWEDGE:M[Yy][Ee][Ss])
Index: defaults/mk.conf
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defaults/mk.conf,v
retrieving revision 1.141
diff -u -r1.141 mk.conf
--- defaults/mk.conf	20 Dec 2006 07:48:59 -0000	1.141
+++ defaults/mk.conf	20 Dec 2006 13:57:02 -0000
@@ -236,16 +236,6 @@
 # Default: man (i.e. /usr/pkg/man)
 # NOTE: the support for custom setting (not "man") is not complete.
 
-.if defined(X11_TYPE) && ${X11_TYPE} == "modular"
-USE_XPKGWEDGE?=	no
-.else
-USE_XPKGWEDGE?=	yes
-.endif
-# Whether we should use xpkgwedge or not to install all packages into
-# ${LOCALBASE}.
-# Possible: yes, no
-# Default: yes
-
 BSDSRCDIR?=	/usr/src
 # Where the NetBSD src module source tree is located
 #  used in the emulators/plex86, emulators/vmware-module{,3}, net/arla,

--Boundary_(ID_FpFhn1FkYwvEQYr4vaG/mQ)--