Subject: Proposal for xpkgwedge changes
To: None <>
From: Johnny C. Lam <>
List: tech-pkg
Date: 10/06/2000 08:40:42

	First off, apologies to any who've seen this message before.
I realized belatedly that I posted to the wrong list for a discussion
on a packages issue.

	Now for the proposal:

	I've made changes to xpkgwedge in my local pkgsrc tree that
are summed up as follows:

 	* Redefine ImakeCmd to "imake -I$(PREFIX)/lib/X11/config" to
	  pick up X11 config files in $(PREFIX)/lib/X11/config before the
	  ones in the standard X11 tree.

	* Install a program called "pkgxmkmf" that's actually xmkmf, but
	  checks in $(PREFIX)/lib/X11/config before the standard X11 config

	* Create the host.def file in $(PREFIX)/lib/X11/config instead of
	  always in ${X11BASE}/lib/X11/config.

The benefits of this are:

	1) xpkgwedge can now install into $(PREFIX) instead of always into

	2) Keeps the X11 tree "pure", and doesn't affect people who want
	   to run xmkmf and not include all the xpkgwedge stuff, even if
	   it's installed.

	3) Packages that install config files (lesstif, xview-config) can
	   now do so in $(PREFIX).

	4) People only have to use 'pkgxmkmf' instead of 'xmkmf', and
	   (hopefully) no other changes, if they want to use the config
	   files in xpkgwedge'd packages.

I've tested it fairly well, rebuilding most of my X11 packages from
scratch, and seeing that they do indeed build and install correctly.

For anyone who wants to see my xpkgwedge package, it's available at:

and the diffs needed for to work with the new xpkgwedge

	Thanks in advance for your feedback,

     -- Johnny C. Lam <>
        Department of Statistics, Carnegie Mellon University

RCS file: /cvsroot/pkgsrc/mk/,v
retrieving revision 1.581
diff -u -r1.581
---	2000/09/28 10:50:43	1.581
+++	2000/10/06 12:32:17
@@ -88,11 +88,20 @@
-# set X11PREFIX to reflect installed dir of X11 packages
-.if exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
+# Set X11PREFIX to reflect the install directory of X11 packages.
+# The extra checks for the existence of files in explicit paths is to
+# provide backwards-compability for users with xpkgwedge<=0.4.
+.if exists(${LOCALBASE}/lib/X11/config/xpkgwedge.def) || \
+    exists(${X11BASE}/lib/X11/config/xpkgwedge.def)
+.if exists(${LOCALBASE}/bin/pkgxmkmf)
+XMKMF?=			pkgxmkmf -a
+XMKMF?=			xmkmf -a
 .if defined(USE_MOTIF12)
@@ -245,7 +254,6 @@
 # Miscellaneous overridable commands:
 SHCOMMENT?=		${ECHO_MSG} >/dev/null '***'
-XMKMF?=			xmkmf -a
 .if exists(/sbin/md5)
 MD5?=			/sbin/md5
 .elif exists(/bin/md5)