make.conf no x option

Ulrich Spörlein uqs at spoerlein.net
Sun May 31 11:51:55 UTC 2009


On Wed, 27.05.2009 at 05:01:31 +0900, Randy Bush wrote:
> >> i think this whole thing is worth a few days to settle in our heads.
> >> essentially, if we believe that freebsd is used extensively in
> >> headless server deployments, we should make that easy and smooth.
> > But even a headless server can run X clients with the display being on
> > some other (presumably non-headless) machine. That is on of the
> > beauties of the X Windowing System.
> 
> [ thanks, but i am overly-familiar with the beauties and the some of the
> warts of x. ]
> 
> someone installing a server may or may not want the x client version of
> a package as opposed to readline or curses.  but, imiho, it would be
> good to make such decisions centralized, somewhat strong, and pretty
> clear.
> 
> > The only part that would make no sense to install on a headless
> > machine is the X server itself
> 
> and the support for it and the toys it occasionally seems to drag in.
> 
> i really do not want the x client versions of emacs, cvsup, ...
> actually, i can not think of any ports i run on headless machines that i
> want spawning windows on my glass.  ymmv, of course.
> 
> i think that i would like to be able to say headless install and have to
> ack any port which wants to drag in x.

First of all, try figuring out which ports got you into the X11 mess. On
my server I got:

% pkg_info -R libX11-1.2.1,1
Information for libX11-1.2.1,1:

Required by:
jabber-pyicq-transport-0.8.1.3,1
jdk-1.6.0.3p4_9
libXext-1.0.5,1
libXi-1.2.1,1
libXtst-1.0.3_1
py25-imaging-1.1.6_2
py25-tkinter-2.5.4_3
tk-8.4.19_2,2

Then, adjust their flags and options to not get there again. Then,
instead of patch bsd.port.mk you could try something like this in your
/etc/make.conf

.if ${.CURDIR:M*/x11/libX11}
.error "me no want X11"
.endif

Which will work only when building the packages by yourself. To not
break 'make index' you should wrap the error in .if
target(do-build)/.endif or other suitable make targets.

I cannot test the idiom right now, but there's little need to change the
WITHOUT_X11 meaning globally for all users. Besides, the approach above
can also be used to "break" other ports and keep them from installing.

Cheers,
Ulrich Spörlein
-- 
http://www.dubistterrorist.de/


More information about the freebsd-ports mailing list