Subject: xsrc/7326: bug in X11.rules which caused biggest breakage of xpkgwedge
To: None <gnats-bugs@gnats.netbsd.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 04/05/1999 22:12:58
>Number:         7326
>Category:       xsrc
>Synopsis:       bug in X11.rules which caused biggest breakage of xpkgwedge
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr  5 20:20:00 1999
>Last-Modified:
>Originator:     John Darrow
>Organization:
	Computing Services
	Wheaton College, Wheaton, IL
>Release:        current from at least the XFree86 3.3.3.1 pullup, and 1.4_ALPHA
>Environment:
System: NetBSD jdarrow.wheaton.edu 1.3K NetBSD 1.3K (JDARROW) #0: Wed Mar 24 17:36:50 CST 1999 jdarrow@jdarrow.wheaton.edu:/var/src/sys/arch/i386/compile/JDARROW i386


>Description:
	Throughout the X config files, which are used by imake to generate
	makefiles for both X itself and various packages, the variable
	'X11ProjectRoot' is used to allow a build to be done outside of
	${X11ROOT}, but using imake and the X includes/libraries.
	However, at one crucial place, the original X11.rules file tests the
	variable 'XProjectRoot' instead of 'X11ProjectRoot'.  This causes
	the TopXInclude definition (and thus the TOP_X_INCLUDES makefile
	variable) to be set to /**/ instead of the proper setting
	(-I${XPROJECTROOT}/include).

	With this fixed, it was rather simple to install xpkgwedge and have
	all of the imake-using packages I tried Just Work without having
	them pollute my /usr/X11R6 tree.

	(Once this is done, it also becomes quite simple to get most of
	the non-imake X-using packages to build outside of /usr/X11R6.
	Patches forthcoming...)

>How-To-Repeat:
	Enable xpkgwedge.  Try to figure out why the settings it puts into
	the imake rules don't work the way they should.  Inspect code.
	Bang head on wall when the solution suddenly becomes apparent :)

>Fix:
Because this basically fixes something that is highly desired by many
users (keeping packages out of /usr/X11R6), I submitted it as critical/high
priority, in hopes that this patch can be put in before the 1.4 X sets go
out (pulling it up into the 1.4 xsrc branch if necessary, if there exists
such a thing...)

Index: /source/NetBSD-current/xsrc/xc/config/cf/X11.rules
===================================================================
RCS file: /source/cvs/netbsd/current/xsrc/xc/config/cf/X11.rules,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -c -r1.1.1.2 -r1.2
*** X11.rules	1999/01/19 02:56:36	1.1.1.2
--- X11.rules	1999/03/25 05:48:53	1.2
***************
*** 75,81 ****
  #elif !UseInstalledX11
  # define TopXInclude	-I$(TOP)/exports/include
  #else
! # ifdef XProjectRoot
  #  define TopXInclude	-I$(XPROJECTROOT)/include
  # else
  #  define TopXInclude	/**/
--- 75,81 ----
  #elif !UseInstalledX11
  # define TopXInclude	-I$(TOP)/exports/include
  #else
! # ifdef X11ProjectRoot
  #  define TopXInclude	-I$(XPROJECTROOT)/include
  # else
  #  define TopXInclude	/**/
>Audit-Trail:
>Unformatted: