Subject: Re: xpkgwedge vs. USE_X11 vs. ?
To: Todd Vierling <tv@pobox.com>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-pkg
Date: 07/31/1998 08:41:57
On Thu, 30 Jul 1998, Todd Vierling wrote:
> - New variable to /etc/mk.conf (precludes the existing X11BASE=${LOCALBASE}
>   which is /very/ broken):  USE_LOCALBASE_FOR_X11.  When set, fixes PREFIX
>   at the value of ${LOCALBASE} no matter whether or not
>   USE_{IMAKE,MOTIF,X11} is set.

Ugh, yet another variable.
But I guess that one's really what people are crying for, so... :]


> - the USE_MOTIF stuff will check X11BASE for Xm.h; if not there, a
>   dependency on ${PREFIX}/include/Xm/Xm.h:../../devel/lesstif will be
>   added (as opposed to ${X11BASE}/include/Xm/Xm.h).  That lets motif/lesstif
>   be installed in either location.

No doubt the possibility to do so is a good thing - but I wonder what the
results of that are. Where do we expect lesstif to be installed -
LOCALBASE or X11BASE? Does this matter? 


> - If a pkg is making use of X11 and needs to get to the X11 includes and
>   libraries, it will use ${X11BASE} to get there.

Good thing - should have been done all the time...!
Who'll fix our pkgsrc tree? >:)


> - If a pkg needs to get to pkg-installed includes and libraries, including 
>   Motif, it will use BOTH ${X11BASE} and ${LOCALBASE} to get there.
> 
>   (Note that ${PREFIX} is _not_ used at all, as it may not be Correct in
>   two ambiguous cases--USE_{IMAKE,MOTIF,X11} pkg using regular pkg libs,
>   and a regular pkg using USE_{IMAKE,MOTIF,X11} libs.)

Hum - do we use PREFIX then at all? Or just steer clear of it, and, use
LOCALBASE everywhere, and just use X11BASE when we need to get to X stuff?
Sounds so to me...


> Now, as to USE_X11, that variable needs to be split, as Tim Rightnour
> mentioned a while back.  Many pkgs are happy building for LOCALBASE without
> even xpkgwedge, and those currently do not use USE_X11.  However, a batch
> build will fail on these pkgs on systems that don't have X installed.
> 
> Two different variables would help here - one that just says "uses X11" and
> one that says "needs to be installed with X11 distribution directories," if
> xpkgwedge were not in use.  The latter would probably be needed most for
> pkgs which install includes and libraries.

The latter's what's already in bsd.pkg.mk (but not in pkg_add) to stop
things happening if there's no X installed. 


> USE_X11 for the former and USE_X11BASE for the latter?  (USE_X11 would not
> set PREFIX to X11BASE, whereas USE_X11BASE would--if xpkgwedge were not in 
> use.)

If I understand things right so far, the only thing USE_X11 is left to do
after  all these changes is to switch to the X mtree file. Maybe we should
make this only for USE_X11BASE and nuke off USE_X11 altogether?


 - Hubert

-- 
Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>